On Freitag 04 Dezember 2009, Bryan Catanzaro wrote: > Thanks for the explanation. In that case, do you have objections to > 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 > initialization.
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. Andreas PS: Please keep the PyCUDA list cc'ed, unless there's good reason not to.
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ PyCUDA mailing list [email protected] http://tiker.net/mailman/listinfo/pycuda_tiker.net
