template<typename T>
class ityr::count_iterator< T >
Count iterator.
A count iterator is a special iterator that has the same dereferenced value as the iterator value.
This is particularly useful when used with iterator-based loop functions (e.g., ityr::for_each()
), as it can be used to represent the index of each iteration in the loop.
Example:
[](int x, std::size_t i) { std::cout << "v[" << i << "] = " << x << std::endl; });
Count iterator.
Definition: count_iterator.hpp:33
Global vector to manage a global memory region.
Definition: global_vector.hpp:129
iterator begin() noexcept
Definition: global_vector.hpp:233
iterator end() noexcept
Definition: global_vector.hpp:234
constexpr read_t read
Read-only checkout mode.
Definition: checkout_span.hpp:19
constexpr sequenced_policy seq
Default serial execution policy for iterator-based loop functions.
Definition: execution.hpp:83
void for_each(const ExecutionPolicy &policy, ForwardIterator first, ForwardIterator last, Op op)
Apply an operator to each element in a range.
Definition: parallel_loop.hpp:136
global_iterator< T, Mode > make_global_iterator(ori::global_ptr< T > gptr, Mode)
Make a global iterator to enable/disable automatic checkout.
Definition: global_iterator.hpp:158