Le 30/01/2020 à 17:53, Wes McKinney a écrit :
> Hi Antoine,
>
> This sounds like a reasonable path forward -- thank you for working on
> this. I'm at a conference this week, but I will review the PR and give
> feedback as soon as I can, probably tomorrow (Friday).
>
> My main couple of initial questions are:
>
> * If it's possible to avoid extra overhead during Buffer construction
> to set up these abstractions. I'll look more closely at the patch
I tried to micro-optimize the Buffer constructor, but that does not look
very promising.
> * The consequences of making data() uncallable on non-CPU buffers.
> Perhaps we should simply document the recommended code for invoking
> CUDA kernels and other CUDA-functions on GPU buffers (or non-CPU
> buffers generally). Should there be a data_unsafe() method or similar
> (sorry if this is already addressed in the PR)?
There's the Buffer::address() method (which returns a uintptr_t, so not
immediately dereferenceable unlike data()).
Regards
Antoine.