cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

akphysics
Adept I

double3 bug?

This (distilled) kernel produces {9.0, 8.0, 6.0, garbage, 9.0, 8.0, 6.0, garbage, ...  repeats} like it's using a double4 with "w" coordinate uninitialized...  Am I doing something wrong?  This is causing premature hair loss...

#pragma OPENCL EXTENSION cl_khr_fp64 : enable

__kernel void

rk4_test( __global double3*  out)

{

  int obj1 = get_global_id(0);

  obj_acceleration_exp[obj1] = (double3)(9.0, 8.0, 6.0);

}

My system is Linux with a Radeon 6970 running OpenCL 1.1 AMD-APP (898.1).

Thanks for your time.

- Beau V.C. Bellamy

0 Likes
1 Solution

Please refer to the folllowing post:

http://devgurus.amd.com/message/1279719#1279719

In general, when using double3 the memory access is aligned as double4, this is not a bug.

View solution in original post

0 Likes
3 Replies
akphysics
Adept I

Sorry,  That was a miswrite..

  obj_acceleration_exp[obj1] = (double3)(9.0, 8.0, 6.0); 

should read as

  out[obj1] = (double3)(9.0, 8.0, 6.0);

0 Likes

Please refer to the folllowing post:

http://devgurus.amd.com/message/1279719#1279719

In general, when using double3 the memory access is aligned as double4, this is not a bug.

0 Likes

Thank you very much for clarifying that.

0 Likes