FK20 CUDA
fk20_hext_fft2h_fft.cu
Go to the documentation of this file.
1 // bls12_381: Arithmetic for BLS12-381
2 // Copyright 2022-2023 Dag Arne Osvik
3 // Copyright 2022-2023 Luan Cardoso dos Santos
4 
5 #include <stdio.h>
6 
7 #include "fr.cuh"
8 #include "g1.cuh"
9 #include "fk20.cuh"
10 
21 __global__ void fk20_hext_fft2h_fft(g1p_t *h_fft, const g1p_t *hext_fft){
22  if (gridDim.y != 1) return;
23  if (gridDim.z != 1) return;
24  if (blockDim.x != 256) return;
25  if (blockDim.y != 1) return;
26  if (blockDim.z != 1) return;
27 
28  unsigned tid = threadIdx.x; // Thread number
29  unsigned bid = blockIdx.x; // Block number
30 
31  hext_fft += 512*bid;
32  h_fft += 512*bid;
33 
34  // hext_fft -> h -> h_fft
35 
36  // h = ift hext_fft
38  __syncthreads();
39 
40  // Zero second half of h
41  g1p_inf(h_fft[256+tid]);
42  __syncthreads();
43 
44  // h_fft = fft h
46 }
47 
48 // vim: ts=4 et sw=4 si
__managed__ g1p_t hext_fft[512 *512]
__managed__ g1p_t h_fft[512 *512]
__global__ void fk20_hext_fft2h_fft(g1p_t *h_fft, const g1p_t *hext_fft)
hext_fft -> h_fft
__device__ void g1p_ift(g1p_t *output, const g1p_t *input)
Inverse FFT of size 512 over G1 with projective coordinates. Input and output arrays may overlap....
Definition: g1p_fft.cu:178
__device__ __host__ void g1p_inf(g1p_t &p)
Set p to the point-at-infinity (0,1,0)
Definition: g1p.cu:93
__device__ void g1p_fft(g1p_t *output, const g1p_t *input)
FFT of size 512 over G1 with projective coordinates. Input and output arrays may overlap....
Definition: g1p_fft.cu:24
G1 point in projective coordinates.
Definition: g1.cuh:27