octave datatypes and c datatypes Is there a 1 a 1 relationship between a
From:
Riccardo Corradini
Subject:
octave datatypes and c datatypes Is there a 1 a 1 relationship between arrays?
Date:
Mon, 12 Mar 2007 17:09:57 +0100 (CET)
Hi all, I would like to know if there is one to one relationship between octave datatypes and C data types For istance I defined the following macro #define UPACK_INT_ARRAY(CASE,FTYPE,PRMTYP, PTRTYP) \ /*---------------------------------------*/ \ int unpack_##CASE##_mat(const PRMTYP &array){ \ /*---------------------------------------*/ \ int n = array.nelem(); \ int info; \ const PTRTYP *pointer =
reinterpret_cast<const PTRTYP *>(array.fortran_vec()); \ if((info=FTYPE(pointer,n,1))) return(info); \ return(PvmOk); \ }
I am sure that even if it might work it is not
the right procedure suggested in general by JWE,so what is the best strategy to convert an int .. array into a c array and viceversa. Is it possible to avoid reinterpret cast etc.. Thanks in advance to all Riccardo
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail
[Prev in Thread]
Current Thread
[Next in Thread]
octave datatypes and c datatypes Is there a 1 a 1 relationship between arrays?,
Riccardo Corradini<=