! * Create a new default device command queue for the default device, * in the default context and of the default size. * If there is already a default queue for the specified device this * function will return the pre-existing queue. */
| 8988 | * function will return the pre-existing queue. |
| 8989 | */ |
| 8990 | static DeviceCommandQueue makeDefault( |
| 8991 | cl_int *err = nullptr) |
| 8992 | { |
| 8993 | cl_int error; |
| 8994 | cl::Context context = cl::Context::getDefault(); |
| 8995 | cl::Device device = cl::Device::getDefault(); |
| 8996 | |
| 8997 | cl_command_queue_properties properties = |
| 8998 | CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_ON_DEVICE | CL_QUEUE_ON_DEVICE_DEFAULT; |
| 8999 | cl_queue_properties queue_properties[] = { |
| 9000 | CL_QUEUE_PROPERTIES, properties, |
| 9001 | 0 }; |
| 9002 | DeviceCommandQueue deviceQueue( |
| 9003 | ::clCreateCommandQueueWithProperties( |
| 9004 | context(), device(), queue_properties, &error)); |
| 9005 | |
| 9006 | detail::errHandler(error, __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR); |
| 9007 | if (err != nullptr) { |
| 9008 | *err = error; |
| 9009 | } |
| 9010 | |
| 9011 | return deviceQueue; |
| 9012 | } |
| 9013 | |
| 9014 | /*! |
| 9015 | * Create a new default device command queue for the specified device |
nothing calls this directly
no test coverage detected