ArrayFire.jl icon indicating copy to clipboard operation
ArrayFire.jl copied to clipboard

Add `pointer` support

Open ngphuoc opened this issue 7 years ago • 2 comments

Dear Gaika, I am trying to use AFArray for the Knet framework. To do this I need the pointer to AFArray as mentioned in this issue https://github.com/denizyuret/Knet.jl/issues/213. I wonder if you could add support for this feature?

Many thanks! Phuoc

ngphuoc avatar Dec 07 '17 05:12 ngphuoc

get_device_ptr is probably what you need to alias to pointer, conversely if you want to create AFArray from a device pointer use device_array. Can you check if that would work?

ghost avatar Dec 07 '17 06:12 ghost

Ah, and you'd have to lock_device_ptr before and unlock_device_ptr after you are done. Not sure how that works.

ghost avatar Dec 07 '17 06:12 ghost