TRIQS / nda

C++ library for multi-dimensional arrays
https://triqs.github.io/nda
Other
13 stars 11 forks source link

Error in memory_layout check of 1x1 matrix #7

Closed Wentzell closed 4 years ago

Wentzell commented 5 years ago

For both the current triqs master and unstable the following small code snippet

#include <triqs/arrays.hpp>

using namespace triqs::arrays;
int main(){
  matrix<double> m { 1, 1, FORTRAN_LAYOUT }; 
  TRIQS_PRINT(m.memory_layout_is_fortran());
}

outputs 0, i.e. the memory layout is found to not be of the FORTRAN type even though it is clearly constructed in that way.

Wentzell commented 4 years ago

To be rechecked.

parcollet commented 4 years ago

Ok by construction, Fortran layout is now at compile time. Added a check for it.