Open kostrzewa opened 6 years ago
The eigenvectors on disk are stored in a column-major order (with the N_ev columns corresponding to 3xL^3 complex vectors). Eigen uses column-major order by default too, so it should be possible to rather straightforwardly write into the V[t] matrices one full eigenvector at a time.
The other option would be to directly use Eigen::Map
on top of the readin buffer and perform a simple assigment to copy the data into V[t]
, it would likely be quite efficient.
Something like
Eigen::Map<MatrixXcd> buff_matrix(buffer, row_length, N_ev);
(V[t]).col(ncol) = buff_matrix.col(ncol);
eigenvectors are read one eigenvector at a time and vector elements are copied one element at at time into
(V[t])(nrow,ncol)
.Does Eigen store row or column major layout by default? Is the data pointer accessible? One could perhaps perform a fast transposition if the reading buffer is taken as the storage buffer for an Eigen matrix.