__kernel void generateStreamlines (__global float3* flowData, __global float3* seeds, __global float3* streamlineVertex, __global float3* streamlineTangent,__global uint* streamlineVertexNum, GenerationParameters generationParameters, UniformGridInfo gridInfo)
typedef struct {float3 lowBound;float3 upBound;float initStepSize;float maxLength; //max streamline lengthfloat terminationSpeed;float adaptiveUpBound;//if >adaptiveUpBound, enlarge step sizefloat adaptiveLowBound;//if < adaptiveLowBound, reduce step sizeuint maxStepNum;} GenerationParameters;typedef struct {float3 origin;int3 extentLow;int3 extentUp;float3 spacing;float3 reciprocalSpacing;float reciprocalSpacingXY;float reciprocalSpacingYZ;float reciprocalSpacingZX;float reciprocalSpacingXYZ;} UniformGridInfo;
Link Copied
Hi,
float3 needs to be aligned to 16byte boundary. I am guessing that your data was not aligned. The times it worked, the data was aligned by chance so you didn't see the crash.
Make sure you align the data to a float4 boundary and let me know if you still see the crash.
Thanks,
Raghu
The OpenCL compiler is responsible for aligning data items to the appropriate alignment asrequired by the data type. For arguments to a __kernel function declared to be a pointer to adata type, the OpenCL compiler can assume that the pointee is always appropriately aligned asrequired by the data type.
For more complete information about compiler optimizations, see our Optimization Notice.