mirror of
https://github.com/triqs/dft_tools
synced 2024-11-01 19:53:45 +01:00
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;
|
||
|
|
||
|
}
|
||
|
|