Skip to content

Commit

Permalink
Fixed comparison between CPU and GPU results.
Browse files Browse the repository at this point in the history
  • Loading branch information
maddyscientist committed Mar 11, 2014
1 parent 23c61ea commit de8253f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cpu_util.c
Expand Up @@ -152,6 +152,12 @@ void xgpuCheckResult(Complex *gpu, Complex *cpu, int verbose, ComplexInput *arra
for(f=0; f<NFREQUENCY; f++){
int k = f*(NSTATION+1)*(NSTATION/2) + i*(i+1)/2 + j;
int index = (k*NPOL+pol1)*NPOL+pol2;

#ifdef FIXED_POINT
gpu[index].real = round(gpu[index].real);
gpu[index].imag = round(gpu[index].imag);
#endif

if(zabs(cpu[index]) == 0) {
error = zabs(gpu[index]);
} else {
Expand Down

0 comments on commit de8253f

Please sign in to comment.