From 38f720958d850fe55a06660b2da9262e881287f6 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 22 Feb 2010 18:02:40 +0100 Subject: OpenCL strictness --- data/diffraction.cl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/diffraction.cl b/data/diffraction.cl index 5ca7d571..892ec2db 100644 --- a/data/diffraction.cl +++ b/data/diffraction.cl @@ -11,7 +11,7 @@ #include - +#define M_PI ((float)(3.14159265)) float4 quat_rot(float4 q, float4 z) { @@ -54,7 +54,7 @@ float4 get_q(int x, int y, float cx, float cy, float res, float clen, float k, rx = ((float)x - sampling*cx)/(res*sampling); ry = ((float)y - sampling*cy)/(res*sampling); - r = sqrt(pow(rx, 2.0) + pow(ry, 2.0)); + r = sqrt(pow(rx, 2.0f) + pow(ry, 2.0f)); tt = atan2(r, clen); *ttp = tt; @@ -161,12 +161,12 @@ kernel void diffraction(global float2 *diff, global float *tt, float klow, if ( lx + ly + lb == 0 ) { int i; - float2 sum = (0.0, 0.0); + float2 sum = (float2)(0.0, 0.0); for ( i=0; i