spectral

Variables access lock, is it possible in OpenCL ?

Discussion created by spectral on Dec 4, 2009
Latest reply on Dec 6, 2009 by spectral
Variables access lock, is it possible in OpenCL ?

Hi,

I have a program that test several 3D triangle intersections, I need to update one variable, I've called it Hit

kernel void Intersect( .... global float Hit ... )
{...}

I must insure that this variable is not accessed by several CPU/GPU at a time... in general I write something like that :

AcquireLock();
Hit = ...
ReleaseLock();

How can I do this with OpenCL... I have take a look at barrier... but not sure it can help ?

Thanks 

Outcomes