Skip to content
Snippets Groups Projects
Commit 16b7ad41 authored by Yichao Yu's avatar Yichao Yu
Browse files

cleanup

parent 1aded80a
No related branches found
No related tags found
No related merge requests found
......@@ -76,93 +76,6 @@ enqueue_gl_objects(clEnqueueGLObjectFunc func, const char *name,
enqueue_gl_objects(clEnqueue##what##GLObjects, \
"clEnqueue" #what "GLObjects", args)
// #if defined(cl_khr_gl_sharing) && (cl_khr_gl_sharing >= 1)
// PYOPENCL_INLINE
// py::object get_gl_context_info_khr(
// py::object py_properties,
// cl_gl_context_info param_name,
// py::object py_platform
// )
// {
// std::vector<cl_context_properties> props
// = parse_context_properties(py_properties);
// typedef CL_API_ENTRY cl_int (CL_API_CALL
// *func_ptr_type)(const cl_context_properties * /* properties */,
// cl_gl_context_info /* param_name */,
// size_t /* param_value_size */,
// void * /* param_value */,
// size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
// func_ptr_type func_ptr;
// #if PYOPENCL_CL_VERSION >= 0x1020
// if (py_platform.ptr() != Py_None)
// {
// platform &plat = py::extract<platform &>(py_platform);
// func_ptr = (func_ptr_type) clGetExtensionFunctionAddressForPlatform(
// plat.data(), "clGetGLContextInfoKHR");
// }
// else
// {
// PYOPENCL_DEPRECATED("get_gl_context_info_khr with platform=None", "2013.1", );
// func_ptr = (func_ptr_type) clGetExtensionFunctionAddress(
// "clGetGLContextInfoKHR");
// }
// #else
// func_ptr = (func_ptr_type) clGetExtensionFunctionAddress(
// "clGetGLContextInfoKHR");
// #endif
// if (!func_ptr)
// throw error("Context.get_info", CL_INVALID_PLATFORM,
// "clGetGLContextInfoKHR extension function not present");
// cl_context_properties *props_ptr
// = props.empty( ) ? nullptr : &props.front();
// switch (param_name)
// {
// case CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR:
// {
// cl_device_id param_value;
// PYOPENCL_CALL_GUARDED(func_ptr,
// (props_ptr, param_name, sizeof(param_value), &param_value, 0));
// return py::object(handle_from_new_ptr( new device(param_value, /*retain*/ true)));
// }
// case CL_DEVICES_FOR_GL_CONTEXT_KHR:
// {
// size_t size;
// PYOPENCL_CALL_GUARDED(func_ptr,
// (props_ptr, param_name, 0, 0, &size));
// std::vector<cl_device_id> devices;
// devices.resize(size / sizeof(devices.front()));
// PYOPENCL_CALL_GUARDED(func_ptr,
// (props_ptr, param_name, size,
// devices.empty( ) ? nullptr : &devices.front(), &size));
// py::list result;
// BOOST_FOREACH(cl_device_id did, devices)
// result.append(handle_from_new_ptr(
// new device(did)));
// return result;
// }
// default:
// throw error("get_gl_context_info_khr", CL_INVALID_VALUE);
// }
// }
// #endif
}
// c wrapper
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment