Révision 277
ETSN/MyDFT_9.py (revision 277) | ||
---|---|---|
136 | 136 |
|
137 | 137 |
return(A_ocl,B_ocl) |
138 | 138 |
|
139 |
# CUDA Silly complete operation
|
|
140 |
def CUDADFT(a_np,b_np,Device,THreads):
|
|
139 |
# CUDA complete operation |
|
140 |
def CUDADFT(a_np,b_np,Device,Threads):
|
|
141 | 141 |
# import pycuda.autoinit |
142 | 142 |
import pycuda.driver as drv |
143 | 143 |
from pycuda.compiler import SourceModule |
... | ... | |
166 | 166 |
|
167 | 167 |
__global__ void MyDFT(float *A_g, float *B_g, const float *a_g,const float *b_g) |
168 | 168 |
{ |
169 |
const int gid = blockIdx.x; |
|
170 |
uint size = gridDim.x; |
|
169 |
const int gid = blockIdx.x*blockDim.x+threadIdx.x;
|
|
170 |
uint size = gridDim.x*blockDim.x;
|
|
171 | 171 |
float A=0.,B=0.; |
172 | 172 |
for (uint i=0; i<size;i++) |
173 | 173 |
{ |
Formats disponibles : Unified diff