Frees a shared virtual memory buffer allocated using clSVMAlloc.
void clSVMFree(cl_context context, void *svm_pointer)
A valid OpenCL context used to create the SVM buffer.
Must be the value returned by a call to
clSVMAlloc. If a NULL pointer is passed in
svm_pointer, no action occurs.
clSVMFree does not wait for previously enqueued commands that may be using
svm_pointer to finish before freeing
It is the responsibility of the application to make sure that enqueued commands that use
svm_pointer have finished before freeing
This can be done by enqueuing a blocking operation such as
clEnqueueReadBuffer or by registering a callback with the events associated with enqueued commands and when the last enqueued comamnd has finished freeing
The behavior of using
svm_pointer after it has been freed is undefined.
In addition, if a buffer object is created using
svm_pointer, the buffer object must first be released before the
svm_pointer is freed.