OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1663 Discussions

Common buffer allocation for efficient OpenMP and OpenCL performance.


I am building a library which will simultaneously perform different compute intensive operations on a vector on the CPU side and GPU side using OpenMP and OpenCL. The problem is when I override a vector's allocator for proper alignment to enable zero-copy, the OpenMP performance suffers as the vector stops being optimized for sse and avx instructions. Hence, How to write a custom allocator for a stl vector such that it can be utilised both by OpenMP/ SSE/AVX2 for CPU side work and OpenCL / zero-copy for GPU side work ?

0 Kudos
0 Replies