Mercurial > hg > Game > Cerium
view 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 |
line wrap: on
line source
__kernel void norm(__constant long *param, __global float2 *in_x, __global float2 *out_x) { unsigned long gid = (unsigned long)get_global_id(0); unsigned long nid = (unsigned long)get_global_id(1); long n = param[0]; out_x[nid*n+gid].x = in_x[nid*n+gid].x / (float)n; out_x[nid*n+gid].y = in_x[nid*n+gid].y / (float)n; }