Mercurial > hg > Game > Cerium
annotate example/fft/gpu/norm.cl @ 1835:144e573b030b draft
fix fft
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 20 Dec 2013 03:00:32 +0900 |
parents | 2c3adce7eb40 |
children |
rev | line source |
---|---|
1673 | 1 __kernel void |
2 norm(__constant long *param, __global float2 *in_x, __global float2 *out_x) | |
3 { | |
4 unsigned long gid = (unsigned long)get_global_id(0); | |
5 unsigned long nid = (unsigned long)get_global_id(1); | |
6 | |
1835 | 7 long n = param[0]; |
1673 | 8 |
9 out_x[nid*n+gid].x = in_x[nid*n+gid].x / (float)n; | |
10 out_x[nid*n+gid].y = in_x[nid*n+gid].y / (float)n; | |
11 } |