I wanna use arrayfire in CPU mode (mkl) only to be able to access data without transmission, as it may happen for GPU data.
Is there a way to have direct access to arrayfire's data memory (only CPU blackened will be used)?
I wanna use arrayfire in CPU mode (mkl) only to be able to access data without transmission, as it may happen for GPU data.
Is there a way to have direct access to arrayfire's data memory (only CPU blackened will be used)?
You can access the data of an
af::arrayobject by calling the device() member function. This will give you direct access to the data unless it is being referenced by anotheraf::arrayor it is a sub-array/view into another array. In those cases the data will be copied.Example: