I need a way to create an memory object which can be accessed parallelly both in CPU and GPU, this memory will be read only. How can I do it?
OpenCL 2.0 supports memory coherence, and that is supported by the Bifrost & Valhall series of Arm Mali GPUs.
Details on its use here: https://developer.arm.com/documentation/101574/0400/OpenCL-2-0/Shared-virtual-memory
and here: https://developer.arm.com/documentation/101574/0400/Optimizing-OpenCL-for-Mali-GPUs/Optimizing-memory-allocation