vendredi 27 mars 2015

eigen3 type cast / copy from pointer (overflow uint8_t)



i get a uint8_t * array (which is fixed defined) and want to use them with a Eigen3 Matrix.


I started using



typedef Eigen::Matrix<uint8_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Matrix8u;


with a memcpy to .data()


but later i noticed that for example .sum() I'm getting an overflow.


Is there a way to make a fast copy between a uint8_t * and a int32_t ? - with Eigen::Map ?


Greetings




Aucun commentaire:

Enregistrer un commentaire