Mercurial > hg > Game > Cerium
changeset 1741:e0560291611b draft
fix fft
author | kkn |
---|---|
date | Tue, 12 Nov 2013 17:41:02 +0900 |
parents | dfeeb2f681db |
children | a35a2780a060 |
files | example/fft/gpu/spinFact.cl example/fft/gpu/spinFact.o example/fft/output.pgm |
diffstat | 3 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/example/fft/gpu/spinFact.cl Tue Nov 12 13:53:29 2013 +0900 +++ b/example/fft/gpu/spinFact.cl Tue Nov 12 17:41:02 2013 +0900 @@ -7,9 +7,10 @@ unsigned long i = (unsigned long)get_global_id(0); long n =param[3]; - float2 angle; - angle.x = (float)(2*i*PI/(float)n); - angle.y = (float)((2*i*PI/(float)n) + PI_2); - w[i].x = cos(angle.x); - w[i].y = cos(angle.y); + double2 angle; + angle.x = (double)(2*i*PI/(double)n); + angle.y = (double)((2*i*PI/(double)n) + PI_2); + + w[i].x = cos((float)angle.x); + w[i].y = cos((float)angle.y); }