[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: Fast copy of buffer data into a matrix

**From**: |
Muthiah Annamalai |

**Subject**: |
Re: Fast copy of buffer data into a matrix |

**Date**: |
Thu, 08 Feb 2007 11:09:05 -0600 |

On Thu, 2007-02-08 at 10:49 -0500, John Swensen wrote:
>* I am currently working on a module to capture data from a firewire *
>* camera and returning it to a user in Octave. I have it all working, but *
>* currently copy from the buffer returned to me by the CamWire library *
>* into a Matrix by doing the following*
>* *
>* Matrix ret_img( settings.height, settings.width );*
>* for( int i = 0 ; i < settings.height, settings.width ; i++ )*
>* ret_img(i) = imagebuffer[i];*
>* *
>* where imagebuffer is an array of uint8_t.*
>* *
I think theres something like a
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 have searched around a bit, but can't find a way of just doing a *
>* memcpy into the Matrix object, rather than my slow existing *
>* implementation. Any suggestions?*
>* *
>* John Swensen*
>* _______________________________________________*
>* Help-octave mailing list*
>* address@hidden*
>* https://www.cae.wisc.edu/mailman/listinfo/help-octave*

**Fast copy of buffer data into a matrix**, *John Swensen*, `2007/02/08`
**Re: Fast copy of buffer data into a matrix**, *Nicolas Pettiaux*, `2007/02/08`
**Re: Fast copy of buffer data into a matrix**,
*Muthiah Annamalai* **<=**
**Re: Fast copy of buffer data into a matrix**, *John Swensen*, `2007/02/08`
**Re: Fast copy of buffer data into a matrix**, *John Swensen*, `2007/02/09`
**Re: Fast copy of buffer data into a matrix**, *David Bateman*, `2007/02/09`
**Re: Fast copy of buffer data into a matrix**, *John Swensen*, `2007/02/09`
**Re: Fast copy of buffer data into a matrix**, *John W. Eaton*, `2007/02/09`
**Re: Fast copy of buffer data into a matrix**, *John W. Eaton*, `2007/02/09`
**Re: Fast copy of buffer data into a matrix**, *John Swensen*, `2007/02/09`
**Re: Fast copy of buffer data into a matrix**, *John W. Eaton*, `2007/02/09`