On Freitag 04 Dezember 2009, Bryan Catanzaro wrote:
Thanks for the explanation. In that case, do you have
removing the assertion that if a GPUArray is created and given a
preexisting buffer, that the new array must be a view of another array?
In my situation, I don't think this assertion is true: I would like to
transfer ownership of a gpu buffer (created outside of PyCUDA by some host
code) to a particular GPUArray. This means I instantiate a GPUArray with
gpudata=the pointer created by the host code, but base should still be
None, since this new GPUArray is not a view of any other array, and so
this GPUArray should have sole ownership of the buffer being given at
If I understand you correctly, then whatever you assign to .gpudata already
establishes the lifetime dependency, right? In that case, yes, the assert
should go away.
PS: Please keep the PyCUDA list cc'ed, unless there's good reason not to.