Mercurial > hg > Game > Cerium
view example/fft/gpu/norm.cl @ 2069:26aa08c9a1de draft default tip
cuda example fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 12 Feb 2017 10:04:55 +0900 |
parents | 144e573b030b |
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; }