mirror of
https://github.com/triqs/dft_tools
synced 2024-12-27 14:53:39 +01:00
f2c7d449cc
for earlier commits, see TRIQS0.x repository.
17 lines
541 B
C++
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;
|
|
|
|
}
|
|
|