AI Engine API User Guide (AIE-API) 2024.2
Loading...
Searching...
No Matches
iterator.hpp File Reference
#include <iterator>
#include "detail/array_helpers.hpp"

Classes

class  aie::circular_iterator< T, Size, Resource >
 Implements an iterator that wraps around when it reaches the end of the buffer and, thus, has no end. More...
 
class  aie::pattern_iterator< T, Steps >
 
class  aie::random_circular_iterator< T, Size, Resource >
 Implements an iterator that wraps around when it reaches the end or the beginning of the buffer and, thus, has no end. More...
 
class  aie::restrict_vector_iterator< T, Elems, Resource >
 
class  aie::unaligned_vector_input_buffer_stream< T, Elems, Resource >
 Implements an input stream that reads from a memory buffer with vector granularity. More...
 
class  aie::unaligned_vector_iterator< T, Elems, Resource >
 Implements an iterator that traverses an array using vectors instead of scalar values. More...
 
class  aie::unaligned_vector_output_buffer_stream< T, Elems, Resource >
 Implements an output stream that writes into a memory buffer with vector granularity. More...
 
class  aie::vector_circular_iterator< T, Elems, Size, Resource >
 Implements a vector iterator that wraps around when it reaches the end of the buffer and, thus, has no end. More...
 
class  aie::vector_input_buffer_stream< T, Elems, Resource >
 Implements an input stream that reads from a memory buffer with vector granularity. More...
 
class  aie::vector_iterator< T, Elems, Resource >
 Implements an iterator that traverses an array using vectors instead of scalar values. More...
 
class  aie::vector_output_buffer_stream< T, Elems, Resource >
 Implements an output stream that writes into a memory buffer with vector granularity. More...
 
class  aie::vector_random_circular_iterator< T, Elems, Size, Resource >
 Implements a vector iterator that wraps around when it reaches the end or the beginning of the buffer and, thus, has no end. More...
 

Namespaces

namespace  aie
 Base namespace for AIE operations and types.
 

Macros

#define __AIE_API_ITERATOR__HPP__
 

Typedefs

template<typename T , size_t Size = dynamic_extent, aie_dm_resource Resource = aie_dm_resource::none>
using aie::const_circular_iterator = circular_iterator< const T, Size, Resource >
 Same as circular_iterator, but the contents of the iterated array cannot be modified.
 
template<typename T , unsigned Steps>
using aie::const_pattern_iterator = pattern_iterator< std::add_const_t< T >, Steps >
 
template<typename T , size_t Size, aie_dm_resource Resource = aie_dm_resource::none>
using aie::const_random_circular_iterator = random_circular_iterator< const T, Size, Resource >
 Same as random_circular_iterator, but the contents of the iterated array cannot be modified.
 
template<typename T , unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none>
using aie::const_restrict_vector_iterator = restrict_vector_iterator< const std::remove_const_t< T >, Elems, Resource >
 
template<typename T , unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none>
using aie::const_unaligned_vector_iterator = unaligned_vector_iterator< const std::remove_const_t< T >, Elems, Resource >
 Same as unaligned_vector_iterator, but the contents of the iterated array cannot be modified.
 
template<typename T , unsigned Elems, size_t Size = dynamic_extent, aie_dm_resource Resource = aie_dm_resource::none>
using aie::const_vector_circular_iterator = vector_circular_iterator< const T, Elems, Size, Resource >
 Same as circular_iterator, but the contents of the iterated array cannot be modified.
 
template<typename T , unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none>
using aie::const_vector_iterator = vector_iterator< const std::remove_const_t< T >, Elems, Resource >
 Same as vector_iterator, but the contents of the iterated array cannot be modified.
 
template<typename T , unsigned Elems, size_t Size, aie_dm_resource Resource = aie_dm_resource::none>
using aie::const_vector_random_circular_iterator = vector_random_circular_iterator< const T, Elems, Size, Resource >
 Same as vector_random_circular_iterator, but the contents of the iterated array cannot be modified.
 

Functions

template<aie_dm_resource Resource, typename T >
constexpr auto aie::begin (T *base, size_t n)
 Returns an iterator for the array described by the given address and size.
 
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , unsigned Elems>
constexpr auto aie::begin (T(&base)[Elems])
 Returns an iterator for the given statically-sized array.
 
template<size_t Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr circular_iterator< T, Elems, Resource > aie::begin_circular (T *base)
 Returns a circular iterator for the array described by the given address and size.
 
template<aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr circular_iterator< T, dynamic_extent, Resource > aie::begin_circular (T *base, size_t n)
 Returns a circular iterator for the array described by the given address and size.
 
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , size_t Elems>
constexpr circular_iterator< T, Elems, Resource > aie::begin_circular (T(&base)[Elems])
 Returns a circular iterator for the given statically-sized array.
 
template<unsigned Steps, typename T , typename... Offsets>
constexpr auto aie::begin_pattern (T *base, Offsets &&... offsets)
 Returns a forward iterator for the array described by the given address.
 
template<size_t Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr random_circular_iterator< T, Elems, Resource > aie::begin_random_circular (T *base)
 Returns a random-access circular iterator for the array described by the given address and size.
 
template<aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr random_circular_iterator< T, dynamic_extent, Resource > aie::begin_random_circular (T *base, size_t n)
 Returns a random-access circular iterator for the array described by the given address and size.
 
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , size_t Elems>
constexpr random_circular_iterator< T, Elems, Resource > aie::begin_random_circular (T(&base)[Elems])
 Returns a random-access circular iterator for the array described by the given address and size.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, DecoratedElemBaseType T>
constexpr const_restrict_vector_iterator< T, Elems, Resource > aie::begin_restrict_vector (const T *base)
 Same as begin_vector, but the given pointer is considered restrict.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, DecoratedElemBaseType T>
constexpr restrict_vector_iterator< T, Elems, Resource > aie::begin_restrict_vector (T *base)
 Same as begin_vector, but the given pointer is considered restrict.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, DecoratedElemBaseType T>
constexpr unaligned_vector_iterator< T, Elems, Resource > aie::begin_unaligned_vector (T *base)
 Returns a vector iterator starting at the given address.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, DecoratedElemBaseType T>
constexpr const_vector_iterator< T, Elems, Resource > aie::begin_vector (const T *base)
 Returns a vector iterator starting at the given address.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, DecoratedElemBaseType T>
constexpr vector_iterator< T, Elems, Resource > aie::begin_vector (T *base)
 Returns a vector iterator starting at the given address.
 
template<unsigned Elems, size_t ArrayElems, aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr vector_circular_iterator< T, Elems, ArrayElems, Resource > aie::begin_vector_circular (T *base)
 Returns a circular iterator for the array described by the given address and size.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr vector_circular_iterator< T, Elems, dynamic_extent, Resource > aie::begin_vector_circular (T *base, size_t n)
 Returns a circular iterator for the array described by the given address and size.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , size_t ArrayElems>
constexpr vector_circular_iterator< T, Elems, ArrayElems, Resource > aie::begin_vector_circular (T(&base)[ArrayElems])
 Returns a circular iterator for the array described by the given address and size.
 
template<unsigned Elems, size_t ArrayElems, aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr vector_random_circular_iterator< T, Elems, ArrayElems, Resource > aie::begin_vector_random_circular (T *base)
 Returns a circular iterator for the array described by the given address and size.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr vector_random_circular_iterator< T, Elems, dynamic_extent, Resource > aie::begin_vector_random_circular (T *base, size_t n)
 Returns a circular iterator for the array described by the given address and size.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , size_t ArrayElems>
constexpr vector_random_circular_iterator< T, Elems, ArrayElems, Resource > aie::begin_vector_random_circular (T(&base)[ArrayElems])
 Returns a circular iterator for the array described by the given address and size.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, DecoratedElemBaseType... Types>
constexpr auto aie::begin_vectors (Types *...ptrs)
 
template<aie_dm_resource Resource, typename T >
constexpr auto aie::cbegin (const T *base, size_t n)
 Returns an iterator for the constant array described by the given address and size.
 
template<size_t Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr const_circular_iterator< T, Elems, Resource > aie::cbegin_circular (const T *base)
 Similar to begin_circular, but the returned iterator is constant.
 
template<aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr const_circular_iterator< T, dynamic_extent, Resource > aie::cbegin_circular (const T *base, size_t n)
 Similar to begin_circular, but the returned iterator is constant.
 
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , size_t Elems>
constexpr const_circular_iterator< T, Elems, Resource > aie::cbegin_circular (const T(&base)[Elems])
 Similar to begin_circular, but the returned iterator is constant.
 
template<unsigned Steps, typename T , typename... Offsets>
constexpr const_pattern_iterator< T, Steps > aie::cbegin_pattern (const T *base, Offsets &&... offsets)
 Similar to begin_pattern, but the returned iterator is constant.
 
template<size_t Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr const_random_circular_iterator< T, Elems, Resource > aie::cbegin_random_circular (const T *base)
 Similar to begin_random_circular, but the returned iterator is constant.
 
template<aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr const_random_circular_iterator< T, dynamic_extent, Resource > aie::cbegin_random_circular (const T *base, size_t n)
 Similar to begin_random_circular, but the returned iterator is constant.
 
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , size_t Elems>
constexpr const_random_circular_iterator< T, Elems > aie::cbegin_random_circular (const T(&base)[Elems])
 Similar to begin_random_circular, but the returned iterator is constant.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, DecoratedElemBaseType T>
constexpr const_restrict_vector_iterator< T, Elems, Resource > aie::cbegin_restrict_vector (const T *base)
 Same as begin_vector, but the given pointer is considered restrict.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, DecoratedElemBaseType T>
constexpr const_unaligned_vector_iterator< T, Elems, Resource > aie::cbegin_unaligned_vector (T *base)
 Returns a vector iterator starting at the given address.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, DecoratedElemBaseType T>
constexpr const_vector_iterator< T, Elems, Resource > aie::cbegin_vector (const T *base)
 Same as begin_vector.
 
template<unsigned Elems, size_t ArrayElems, aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr const_vector_circular_iterator< T, Elems, ArrayElems, Resource > aie::cbegin_vector_circular (const T *base)
 Similar to begin_circular, but the returned iterator is constant.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr const_vector_circular_iterator< T, Elems, dynamic_extent, Resource > aie::cbegin_vector_circular (const T *base, size_t n)
 Similar to begin_circular, but the returned iterator is constant.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , size_t ArrayElems>
constexpr const_vector_circular_iterator< T, Elems, ArrayElems, Resource > aie::cbegin_vector_circular (const T(&base)[ArrayElems])
 Similar to begin_circular, but the returned iterator is constant.
 
template<unsigned Elems, size_t ArrayElems, aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr const_vector_random_circular_iterator< T, Elems, ArrayElems, Resource > aie::cbegin_vector_random_circular (const T *base)
 Similar to begin_circular, but the returned iterator is constant.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr const_vector_random_circular_iterator< T, Elems, dynamic_extent, Resource > aie::cbegin_vector_random_circular (const T *base, size_t n)
 Similar to begin_circular, but the returned iterator is constant.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, typename T , size_t ArrayElems>
constexpr const_vector_random_circular_iterator< T, Elems, ArrayElems, Resource > aie::cbegin_vector_random_circular (const T(&base)[ArrayElems])
 Similar to begin_circular, but the returned iterator is constant.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, DecoratedElemBaseType... Types>
constexpr auto aie::cbegin_vectors (const Types *...ptrs)
 
template<aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr auto aie::cend (const T *base, size_t n)
 Returns an iterator that points at the end of the constant array described by the given address and size.
 
template<aie_dm_resource Resource = aie_dm_resource::none, typename T >
constexpr auto aie::end (T *base, size_t n)
 Returns an iterator that points at the end of the array described by the given address and size.
 
template<aie_dm_resource Resource = aie_dm_resource::none, typename T , unsigned Elems>
constexpr auto aie::end (T(&base)[Elems])
 Returns an iterator that points at the end of the given statically-sized array.
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, DecoratedElemBaseType T>
auto aie::make_unaligned_vector_input_buffer_stream (const T *ptr) -> unaligned_vector_input_buffer_stream< T, Elems, Resource >
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, DecoratedElemBaseType T>
auto aie::make_unaligned_vector_output_buffer_stream (T *ptr) -> unaligned_vector_output_buffer_stream< T, Elems, Resource >
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, DecoratedElemBaseType T>
auto aie::make_vector_input_buffer_stream (const T *ptr) -> vector_input_buffer_stream< T, Elems, Resource >
 
template<unsigned Elems, aie_dm_resource Resource = aie_dm_resource::none, DecoratedElemBaseType T>
auto aie::make_vector_output_buffer_stream (T *ptr) -> vector_output_buffer_stream< T, Elems, Resource >
 

Macro Definition Documentation

◆ __AIE_API_ITERATOR__HPP__

#define __AIE_API_ITERATOR__HPP__