3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-01 11:43:47 +01:00
dft_tools/test/pytriqs/arrays/f.hpp
Olivier Parcollet f2c7d449cc First commit : triqs libs version 1.0 alpha1
for earlier commits, see TRIQS0.x repository.
2013-07-17 19:24:07 +02:00

17 lines
541 B
C++

#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;
}