Hi all,
I am trying to create a buffer of size 2*10^6*sizeof(int) from a dynamically allocated array in my program using clEnqueueWriteBuffer, and instead of any predefined error like out of resources etc. as a return value, I get segmentation fault in allocating buffer. Please help.
Thank You.
clEnqueueWriteBuffer reads data from the supplied array, most probably your array is shorter than provided size and that's why you are experiencing segmentation fault.
Try post your code.
karbous might be right.Please post a test case.
Thank karbous. With your suggestion I was able to remove the error, by changing the way in which the memory was being dynamically allocated to the array.
Thanks again