mirror of
https://github.com/triqs/dft_tools
synced 2024-12-27 06:43:40 +01:00
47cb8a03f7
- Simplify group_indices - Only for C ordered, remove complex compile time. - Could be generalized to non C ordered, but no need. - Fix slice for custom orders. - Generalize the group_indices for the custom order. - Add c_ordered_transposed_view (useful ?) - Improve slice, special for ellipsis (quicker). - Simplify TraversalOrder - Assignement. Specialize one case for speed. - use FORCEINLINE in foreach, according to speed test for clang - add one speed test - Modify iterators for better speed. - along the lines decided for the foreach - update doc.
17 lines
537 B
C++
17 lines
537 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().get_memory_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;
|
|
|
|
}
|
|
|