Mercurial > hg > Game > Cerium
annotate example/fft/gpu/norm.cl @ 1673:2c3adce7eb40 draft
fix fft on gpu
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 18 Jul 2013 17:16:43 +0900 |
parents | |
children | 144e573b030b |
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 | |
7 long n = param[3]; | |
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 } |