| 506 | } |
| 507 | |
| 508 | int OpenCL::getAlignment() |
| 509 | { |
| 510 | #ifdef USE_OPENCL |
| 511 | cl::Device& device = this->getDevice(); |
| 512 | cl_uint mem_align; |
| 513 | clGetDeviceInfo(device.get(), CL_DEVICE_MEM_BASE_ADDR_ALIGN, sizeof(mem_align), &mem_align, nullptr); |
| 514 | return mem_align; |
| 515 | #else |
| 516 | error("OpenPose must be compiled with the `USE_OPENCL` macro definition in order to use this" |
| 517 | " functionality.", __LINE__, __FUNCTION__, __FILE__); |
| 518 | return 0; |
| 519 | #endif |
| 520 | } |
| 521 | |
| 522 | template void OpenCL::getBufferRegion<float>(cl_buffer_region& region, const int origin, const int size); |
| 523 | template void OpenCL::getBufferRegion<double>(cl_buffer_region& region, const int origin, const int size); |