\brief Wrapper for clCreateSubDevicesEXT().
| 2108 | #if defined(CL_VERSION_1_2) |
| 2109 | //! \brief Wrapper for clCreateSubDevicesEXT(). |
| 2110 | cl_int createSubDevices( |
| 2111 | const cl_device_partition_property * properties, |
| 2112 | VECTOR_CLASS<Device>* devices) |
| 2113 | { |
| 2114 | cl_uint n = 0; |
| 2115 | cl_int err = clCreateSubDevices(object_, properties, 0, NULL, &n); |
| 2116 | if (err != CL_SUCCESS) { |
| 2117 | return detail::errHandler(err, __CREATE_SUB_DEVICES); |
| 2118 | } |
| 2119 | |
| 2120 | cl_device_id* ids = (cl_device_id*) alloca(n * sizeof(cl_device_id)); |
| 2121 | err = clCreateSubDevices(object_, properties, n, ids, NULL); |
| 2122 | if (err != CL_SUCCESS) { |
| 2123 | return detail::errHandler(err, __CREATE_SUB_DEVICES); |
| 2124 | } |
| 2125 | |
| 2126 | devices->assign(&ids[0], &ids[n]); |
| 2127 | return CL_SUCCESS; |
| 2128 | } |
| 2129 | #endif // #if defined(CL_VERSION_1_2) |
| 2130 | |
| 2131 | /** |
nothing calls this directly
no test coverage detected