3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-27 06:43:40 +01:00
dft_tools/test/pytriqs/arrays/f.hpp

17 lines
541 B
C++
Raw Normal View History

#include <triqs/arrays.hpp>
using namespace triqs::arrays;
void f(array_view<long,3> A) {
std::cout << " A(range(),range(),0) = "<< A(range(),range(),0) <<std::endl;
std::cout << " A(range(),range(),1) = "<< A(range(),range(),1) <<std::endl;
std::cout << " memory_layout (permutation of indices) = "<< A.indexmap().memory_indices_layout() << std::endl;
std::cout << " strides = "<< A.indexmap().strides() <<std::endl;
std::cout << " is_contiguous = "<< A.indexmap().is_contiguous() <<std::endl;
A(range(),range(),1) *=2;
}