I want to allocate an array in GPU memory initialized (all the positions) with a given value (for instance 0).
I tried by creating a cpu array pointer with zeros and create the buffer with the CL_MEM_COPY_HOST_PTR flag.
I also tried by running a kernel with one thread per position of the array an inside the kernel just assign the given value.
The array is huge, by the way.
I wonder if there is some way more efficient of doing this.