comparison example/fft/ppe/butterfly.cc @ 1835:144e573b030b draft

fix fft
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Fri, 20 Dec 2013 03:00:32 +0900
parents b0376e1c51e9
children
comparison
equal deleted inserted replaced
1834:9f5dbb845689 1835:144e573b030b
16 cl_float2* x_out = (cl_float2*)s->get_output(wbuf,0); 16 cl_float2* x_out = (cl_float2*)s->get_output(wbuf,0);
17 17
18 unsigned long gid = s->x; // (unsigned long)s->get_param(0); 18 unsigned long gid = s->x; // (unsigned long)s->get_param(0);
19 unsigned long nid = s->y; // (unsigned long)s->get_param(1); 19 unsigned long nid = s->y; // (unsigned long)s->get_param(1);
20 20
21 long n = (long)s->get_param(3); 21 long n = (long)s->get_param(0);
22 unsigned long direction_flag = (unsigned long)s->get_param(4); 22 unsigned long direction_flag = (unsigned long)s->get_param(1);
23 long iter = (long)s->get_param(5); 23 long iter = (long)s->get_param(2);
24 24
25 int butterflySize = 1 << (iter-1); 25 int butterflySize = 1 << (iter-1);
26 int butterflyGrpDist = 1 << iter; 26 int butterflyGrpDist = 1 << iter;
27 int butterflyGrpNum = n >> iter; 27 int butterflyGrpNum = n >> iter;
28 int butterflyGrpBase = (gid >> (iter-1))*(butterflyGrpDist); 28 int butterflyGrpBase = (gid >> (iter-1))*(butterflyGrpDist);