TRIQS/nda 1.3.0
Multi-dimensional array library for C++
Loading...
Searching...
No Matches
for_each.hpp File Reference
#include "./permutation.hpp"
#include "../stdutil/array.hpp"
#include <array>
#include <concepts>
#include <cstdint>
#include <utility>

Detailed Description

Provides for_each functions for multi-dimensional arrays/views.

Definition in file for_each.hpp.

Go to the source code of this file.

Functions

template<typename F , auto R, std::integral Int = long>
__inline__ void nda::for_each (std::array< Int, R > const &shape, F &&f)
 Loop over all possible index values of a given shape and apply a function to them.
 
template<uint64_t StaticExtents, uint64_t StrideOrder, typename F , auto R, std::integral Int = long>
__inline__ void nda::for_each_static (std::array< Int, R > const &shape, F &&f)
 Loop over all possible index values of a given shape and apply a function to them.