|
From: | John Swensen |
Subject: | Re: Fast copy of buffer data into a matrix |
Date: | Thu, 08 Feb 2007 12:53:48 -0500 |
User-agent: | Thunderbird 2.0a1 (X11/20060807) |
Muthiah Annamalai wrote:
I think theres something like aI had seen something like this after I wrote my initial email, but am still having problems.double *val = ret_img.fortran_vec(); // in this case for Matrix, what I gather from looking at liboctave/Marray2.cc|h & liboctave/MArray-defs.h (where operator macros live). -Muthiah
I tried to make sure that ret_img is a uint8Matrix and then call fortran_vec(), but when I call the fortran_vec() member function, it wants to return a 'octave_int<unsigned char>*' rather than an 'unsigned char*'. In order to speed things up by simply doing a memcpy() from the C image buffer to the Octave matrix, I somehow need access to the underlying 'unsigned char*' representation.
John
[Prev in Thread] | Current Thread | [Next in Thread] |