I find those 2 names good. I have 2 questions about .contig_bytes: 1) Why do we need it? As we changed the interface, I don't see a need. User can use .flags.forc to check if it is contiguous. 2) What should .contig_bytes do when it is not contiguous? Don't exist? Copy it automatically? Do have the copy automatic, I think we should use the same interface as numpy.{ascontiguousarray(c contiguous),asfortranarray}.
Fred 2011/5/3 Andreas Kloeckner <li...@informa.tiker.net>: > On Tue, 3 May 2011 15:30:18 -0400, Frédéric Bastien <no...@nouiz.org> wrote: >> For the new name of .gpudata, what about using .data as numpy? The >> only problem that I see is that people use the new gpu array with >> numpy code and that the numpy code use the .data without checking if >> its an numpy.ndarray first. I don't think this is going to be a real >> problem. What do you think? > > I don't like .data because that's what pyopencl presently uses like > .gpudata, so that has the same all-of-a-sudden-noncontiguous problem as > PyCUDA's .gpudata. As much as possible, I'd like to keep the two > interfaces the same. > > Are you strongly opposed to .bytes and .contig_bytes as new names? > > Andreas > _______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda