JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL20_nclEnqueueSVMUnmap(JNIEnv *__env, jclass clazz, jlong command_queueAddress, jlong svm_ptrAddress, jint num_events_in_wait_list, jlong event_wait_listAddress, jlong eventAddress, jlong __functionAddress) { cl_command_queue command_queue = (cl_command_queue)(intptr_t)command_queueAddress; void *svm_ptr = (void *)(intptr_t)svm_ptrAddress; const cl_event *event_wait_list = (const cl_event *)(intptr_t)event_wait_listAddress; cl_event *event = (cl_event *)(intptr_t)eventAddress; clEnqueueSVMUnmapPROC clEnqueueSVMUnmap = (clEnqueueSVMUnmapPROC)(intptr_t)__functionAddress; UNUSED_PARAMS(__env, clazz) return (jint)clEnqueueSVMUnmap(command_queue, svm_ptr, num_events_in_wait_list, event_wait_list, event); }
/// Enqueues a command to unmap \p svm_ptr from the host memory space. /// /// \opencl_version_warning{2,0} /// /// \see_opencl2_ref{clEnqueueSVMUnmap} event enqueue_svm_unmap(void *svm_ptr, const wait_list &events = wait_list()) { event event_; cl_int ret = clEnqueueSVMUnmap( m_queue, svm_ptr, events.size(), events.get_event_ptr(), &event_.get() ); if(ret != CL_SUCCESS){ BOOST_THROW_EXCEPTION(opencl_error(ret)); } return event_; }
void operator()(T* p) const { cl_int ret = clEnqueueSVMUnmap(q(), p, 0, NULL, NULL); if (ret != CL_SUCCESS) throw cl::Error(ret, "clEnqueueSVMUnmap"); }