Mercurial > hg > Game > Cerium
view example/fft/cuda/transpose.cu @ 2048:6796d85f3d6b draft
remove error
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 28 Jan 2016 00:05:49 +0900 |
parents | 4cf85b48ab9e |
children |
line wrap: on
line source
extern "C" { __global__ void transpose(long* param, float* src, float* dst) { unsigned long xgid = blockIdx.x*blockDim.x+threadIdx.x; // (unsigned long)s->get_param(0); unsigned long ygid = blockIdx.y*blockDim.y*threadIdx.y; // (unsigned long)s->get_param(1); long n = param[0]; unsigned int iid = ygid * n + xgid; unsigned int oid = xgid * n + ygid; dst[2*oid] = src[2*iid]; dst[2*oid+1] = src[2*iid+1]; } }