* Enqueues a command to indicate with which device a set of memory objects * should be associated. */
| 6294 | * should be associated. |
| 6295 | */ |
| 6296 | cl_int enqueueMigrateMemObjects( |
| 6297 | const VECTOR_CLASS<Memory> &memObjects, |
| 6298 | cl_mem_migration_flags flags, |
| 6299 | const VECTOR_CLASS<Event>* events = NULL, |
| 6300 | Event* event = NULL |
| 6301 | ) |
| 6302 | { |
| 6303 | cl_event tmp; |
| 6304 | |
| 6305 | cl_mem* localMemObjects = static_cast<cl_mem*>(alloca(memObjects.size() * sizeof(cl_mem))); |
| 6306 | for( int i = 0; i < (int)memObjects.size(); ++i ) { |
| 6307 | localMemObjects[i] = memObjects[i](); |
| 6308 | } |
| 6309 | |
| 6310 | |
| 6311 | cl_int err = detail::errHandler( |
| 6312 | ::clEnqueueMigrateMemObjects( |
| 6313 | object_, |
| 6314 | (cl_uint)memObjects.size(), |
| 6315 | static_cast<const cl_mem*>(localMemObjects), |
| 6316 | flags, |
| 6317 | (events != NULL) ? (cl_uint) events->size() : 0, |
| 6318 | (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, |
| 6319 | (event != NULL) ? &tmp : NULL), |
| 6320 | __ENQUEUE_UNMAP_MEM_OBJECT_ERR); |
| 6321 | |
| 6322 | if (event != NULL && err == CL_SUCCESS) |
| 6323 | *event = tmp; |
| 6324 | |
| 6325 | return err; |
| 6326 | } |
| 6327 | #endif // #if defined(CL_VERSION_1_2) |
| 6328 | |
| 6329 | cl_int enqueueNDRangeKernel( |
nothing calls this directly
no test coverage detected