AI Engine API User Guide (AIE) 2023.2
Loading...
Searching...
No Matches
aie::detail::utils Namespace Reference

Classes

struct  circular_index
 
struct  circular_index<(unsigned) -1 >
 
struct  get_complex_component_type
 
struct  get_complex_component_type< cint16 >
 
struct  get_complex_component_type< cint32 >
 
struct  get_integer_type
 
struct  get_integer_type< false, 16 >
 
struct  get_integer_type< false, 32 >
 
struct  get_integer_type< false, 64 >
 
struct  get_integer_type< false, 8 >
 
struct  get_integer_type< true, 16 >
 
struct  get_integer_type< true, 32 >
 
struct  get_integer_type< true, 64 >
 
struct  get_integer_type< true, 8 >
 
struct  get_next_integer_type
 
struct  get_next_integer_type< int16_t >
 
struct  get_next_integer_type< int32_t >
 
struct  get_next_integer_type< int8_t >
 
struct  get_next_integer_type< uint16_t >
 
struct  get_next_integer_type< uint32_t >
 
struct  get_next_integer_type< uint8_t >
 
struct  get_prev_integer_type
 
struct  get_prev_integer_type< int16_t >
 
struct  get_prev_integer_type< int32_t >
 
struct  get_prev_integer_type< int64_t >
 
struct  get_prev_integer_type< uint16_t >
 
struct  get_prev_integer_type< uint32_t >
 
struct  get_prev_integer_type< uint64_t >
 
struct  has_address_space
 
struct  is_one_of
 
struct  make_integer_broadcast_impl
 
struct  make_integer_broadcast_impl< 0, T, Value, Generated... >
 
struct  make_signed
 
struct  make_signed< uint16_t >
 
struct  make_signed< uint32_t >
 
struct  make_signed< uint8_t >
 
struct  make_unsigned
 
struct  make_unsigned< int16_t >
 
struct  make_unsigned< int32_t >
 
struct  make_unsigned< int8_t >
 
struct  num_elems
 
struct  num_elems< std::array< T, N > >
 
struct  pack2
 
struct  remove_all
 
struct  unroll_context
 
struct  unroll_for_helper
 

Typedefs

template<typename T >
using get_complex_component_type_t = typename get_complex_component_type< T >::type
 
template<bool Signed, unsigned Bits>
using get_integer_type_t = typename get_integer_type< Signed, Bits >::type
 
template<typename T >
using get_next_integer_type_t = typename get_next_integer_type< T >::type
 
template<typename T >
using get_prev_integer_type_t = typename get_prev_integer_type< T >::type
 
template<size_t Elems, size_t Value>
using make_index_broadcast = make_integer_broadcast< size_t, Elems, Value >
 
template<typename T , size_t Elems, T Value>
using make_integer_broadcast = typename make_integer_broadcast_impl< Elems, T, Value >::type
 
template<std::size_t N>
using make_reverse_index_sequence = decltype(generate_index_sequence_reverse(std::make_index_sequence< N >{}))
 
template<typename T >
using make_signed_t = typename make_signed< T >::type
 
template<typename T >
using make_unsigned_t = typename make_unsigned< T >::type
 
template<typename T >
using remove_all_t = typename remove_all< T >::type
 

Functions

 circular_index (unsigned max) -> circular_index<(unsigned) -1 >
 
template<typename T >
constexpr T * floor_ptr (T *ptr)
 
template<std::size_t ... Indices>
constexpr auto generate_index_sequence_reverse (const std::index_sequence< Indices... > &) -> decltype(std::index_sequence< sizeof...(Indices) - 1U - Indices... >{})
 
template<unsigned N, typename T , typename... Args>
constexpr auto get_nth (const T &t, Args &&... args)
 
template<typename T >
constexpr bool is_powerof2 (T v)
 
template<typename T1 , typename T2 >
constexpr bool is_same_object (const T1 &a, const T2 &b)
 
template<typename T >
constexpr unsigned log2 (T v)
 
template<unsigned Start, unsigned End, typename... T>
constexpr auto subtuple (const std::tuple< T... > &t)
 
template<unsigned Start, typename... T, std::size_t... I>
constexpr auto subtuple_ (const std::tuple< T... > &t, std::index_sequence< I... >)
 
template<typename T , T Start, T End, T Step = 1, typename Fn >
void unroll_for (Fn &&fn)
 
template<unsigned Times, typename Fn >
void unroll_times (Fn &&fn)
 

Variables

template<typename T >
constexpr unsigned num_elems_v = num_elems<T>::value
 

Class Documentation

◆ aie::detail::utils::get_complex_component_type

struct aie::detail::utils::get_complex_component_type
template<typename T>
struct aie::detail::utils::get_complex_component_type< T >
Class Members
typedef void type

◆ aie::detail::utils::get_complex_component_type< cint16 >

struct aie::detail::utils::get_complex_component_type< cint16 >
Class Members
typedef int16_t type

◆ aie::detail::utils::get_complex_component_type< cint32 >

struct aie::detail::utils::get_complex_component_type< cint32 >
Class Members
typedef int32_t type

◆ aie::detail::utils::get_integer_type

struct aie::detail::utils::get_integer_type
template<bool Signed, unsigned Bits>
struct aie::detail::utils::get_integer_type< Signed, Bits >

◆ aie::detail::utils::get_integer_type< false, 16 >

struct aie::detail::utils::get_integer_type< false, 16 >
Class Members
typedef uint16_t type

◆ aie::detail::utils::get_integer_type< false, 32 >

struct aie::detail::utils::get_integer_type< false, 32 >
Class Members
typedef uint32_t type

◆ aie::detail::utils::get_integer_type< false, 64 >

struct aie::detail::utils::get_integer_type< false, 64 >
Class Members
typedef uint64_t type

◆ aie::detail::utils::get_integer_type< false, 8 >

struct aie::detail::utils::get_integer_type< false, 8 >
Class Members
typedef uint8_t type

◆ aie::detail::utils::get_integer_type< true, 16 >

struct aie::detail::utils::get_integer_type< true, 16 >
Class Members
typedef int16_t type

◆ aie::detail::utils::get_integer_type< true, 32 >

struct aie::detail::utils::get_integer_type< true, 32 >
Class Members
typedef int32_t type

◆ aie::detail::utils::get_integer_type< true, 64 >

struct aie::detail::utils::get_integer_type< true, 64 >
Class Members
typedef int64_t type

◆ aie::detail::utils::get_integer_type< true, 8 >

struct aie::detail::utils::get_integer_type< true, 8 >
Class Members
typedef int8_t type

◆ aie::detail::utils::get_next_integer_type

struct aie::detail::utils::get_next_integer_type
template<typename T>
struct aie::detail::utils::get_next_integer_type< T >
Class Members
typedef void type

◆ aie::detail::utils::get_next_integer_type< int16_t >

struct aie::detail::utils::get_next_integer_type< int16_t >
Class Members
typedef int32_t type

◆ aie::detail::utils::get_next_integer_type< int32_t >

struct aie::detail::utils::get_next_integer_type< int32_t >
Class Members
typedef int64_t type

◆ aie::detail::utils::get_next_integer_type< int8_t >

struct aie::detail::utils::get_next_integer_type< int8_t >
Class Members
typedef int16_t type

◆ aie::detail::utils::get_next_integer_type< uint16_t >

struct aie::detail::utils::get_next_integer_type< uint16_t >
Class Members
typedef uint32_t type

◆ aie::detail::utils::get_next_integer_type< uint32_t >

struct aie::detail::utils::get_next_integer_type< uint32_t >
Class Members
typedef uint64_t type

◆ aie::detail::utils::get_next_integer_type< uint8_t >

struct aie::detail::utils::get_next_integer_type< uint8_t >
Class Members
typedef uint16_t type

◆ aie::detail::utils::get_prev_integer_type

struct aie::detail::utils::get_prev_integer_type
template<typename T>
struct aie::detail::utils::get_prev_integer_type< T >
Class Members
typedef void type

◆ aie::detail::utils::get_prev_integer_type< int16_t >

struct aie::detail::utils::get_prev_integer_type< int16_t >
Class Members
typedef int8_t type

◆ aie::detail::utils::get_prev_integer_type< int32_t >

struct aie::detail::utils::get_prev_integer_type< int32_t >
Class Members
typedef int16_t type

◆ aie::detail::utils::get_prev_integer_type< int64_t >

struct aie::detail::utils::get_prev_integer_type< int64_t >
Class Members
typedef int32_t type

◆ aie::detail::utils::get_prev_integer_type< uint16_t >

struct aie::detail::utils::get_prev_integer_type< uint16_t >
Class Members
typedef uint8_t type

◆ aie::detail::utils::get_prev_integer_type< uint32_t >

struct aie::detail::utils::get_prev_integer_type< uint32_t >
Class Members
typedef uint16_t type

◆ aie::detail::utils::get_prev_integer_type< uint64_t >

struct aie::detail::utils::get_prev_integer_type< uint64_t >
Class Members
typedef uint32_t type

◆ aie::detail::utils::make_integer_broadcast_impl

struct aie::detail::utils::make_integer_broadcast_impl
template<size_t Elems, typename T, T Value, T... Generated>
struct aie::detail::utils::make_integer_broadcast_impl< Elems, T, Value, Generated >
Class Members
typedef typename type type

◆ aie::detail::utils::make_integer_broadcast_impl< 0, T, Value, Generated... >

struct aie::detail::utils::make_integer_broadcast_impl< 0, T, Value, Generated... >
template<typename T, T Value, T... Generated>
struct aie::detail::utils::make_integer_broadcast_impl< 0, T, Value, Generated... >
Class Members
typedef integer_sequence< T, Generated... > type

◆ aie::detail::utils::make_signed

struct aie::detail::utils::make_signed
template<typename T>
struct aie::detail::utils::make_signed< T >
Class Members
typedef T type

◆ aie::detail::utils::make_signed< uint16_t >

struct aie::detail::utils::make_signed< uint16_t >
Class Members
typedef int16_t type

◆ aie::detail::utils::make_signed< uint32_t >

struct aie::detail::utils::make_signed< uint32_t >
Class Members
typedef int32_t type

◆ aie::detail::utils::make_signed< uint8_t >

struct aie::detail::utils::make_signed< uint8_t >
Class Members
typedef int8_t type

◆ aie::detail::utils::make_unsigned

struct aie::detail::utils::make_unsigned
template<typename T>
struct aie::detail::utils::make_unsigned< T >
Class Members
typedef T type

◆ aie::detail::utils::make_unsigned< int16_t >

struct aie::detail::utils::make_unsigned< int16_t >
Class Members
typedef uint16_t type

◆ aie::detail::utils::make_unsigned< int32_t >

struct aie::detail::utils::make_unsigned< int32_t >
Class Members
typedef uint32_t type

◆ aie::detail::utils::make_unsigned< int8_t >

struct aie::detail::utils::make_unsigned< int8_t >
Class Members
typedef uint8_t type

◆ aie::detail::utils::remove_all

struct aie::detail::utils::remove_all
template<typename T>
struct aie::detail::utils::remove_all< T >
Class Members
typedef remove_cv_t< remove_reference_t< T > > type

Typedef Documentation

◆ get_complex_component_type_t

template<typename T >
using aie::detail::utils::get_complex_component_type_t = typedef typename get_complex_component_type<T>::type

◆ get_integer_type_t

template<bool Signed, unsigned Bits>
using aie::detail::utils::get_integer_type_t = typedef typename get_integer_type<Signed, Bits>::type

◆ get_next_integer_type_t

template<typename T >
using aie::detail::utils::get_next_integer_type_t = typedef typename get_next_integer_type<T>::type

◆ get_prev_integer_type_t

template<typename T >
using aie::detail::utils::get_prev_integer_type_t = typedef typename get_prev_integer_type<T>::type

◆ make_index_broadcast

template<size_t Elems, size_t Value>
using aie::detail::utils::make_index_broadcast = typedef make_integer_broadcast<size_t, Elems, Value>

◆ make_integer_broadcast

template<typename T , size_t Elems, T Value>
using aie::detail::utils::make_integer_broadcast = typedef typename make_integer_broadcast_impl<Elems, T, Value>::type

◆ make_reverse_index_sequence

template<std::size_t N>
using aie::detail::utils::make_reverse_index_sequence = typedef decltype(generate_index_sequence_reverse(std::make_index_sequence<N>{}))

◆ make_signed_t

template<typename T >
using aie::detail::utils::make_signed_t = typedef typename make_signed<T>::type

◆ make_unsigned_t

template<typename T >
using aie::detail::utils::make_unsigned_t = typedef typename make_unsigned<T>::type

◆ remove_all_t

template<typename T >
using aie::detail::utils::remove_all_t = typedef typename remove_all<T>::type

Function Documentation

◆ circular_index()

aie::detail::utils::circular_index ( unsigned  max) -> circular_index<(unsigned) -1 >

◆ floor_ptr()

template<typename T >
constexpr T * aie::detail::utils::floor_ptr ( T *  ptr)
constexpr

◆ generate_index_sequence_reverse()

template<std::size_t ... Indices>
constexpr auto aie::detail::utils::generate_index_sequence_reverse ( const std::index_sequence< Indices... > &  ) -> decltype(std::index_sequence< sizeof...(Indices) - 1U - Indices... >{})
constexpr

◆ get_nth()

template<unsigned N, typename T , typename... Args>
constexpr auto aie::detail::utils::get_nth ( const T &  t,
Args &&...  args 
)
constexpr

◆ is_powerof2()

template<typename T >
constexpr bool aie::detail::utils::is_powerof2 ( v)
constexpr

◆ is_same_object()

template<typename T1 , typename T2 >
constexpr bool aie::detail::utils::is_same_object ( const T1 &  a,
const T2 &  b 
)
constexpr

◆ log2()

template<typename T >
constexpr unsigned aie::detail::utils::log2 ( v)
constexpr

◆ subtuple()

template<unsigned Start, unsigned End, typename... T>
constexpr auto aie::detail::utils::subtuple ( const std::tuple< T... > &  t)
constexpr

◆ subtuple_()

template<unsigned Start, typename... T, std::size_t... I>
constexpr auto aie::detail::utils::subtuple_ ( const std::tuple< T... > &  t,
std::index_sequence< I... >   
)
constexpr

◆ unroll_for()

template<typename T , T Start, T End, T Step = 1, typename Fn >
void aie::detail::utils::unroll_for ( Fn &&  fn)

◆ unroll_times()

template<unsigned Times, typename Fn >
void aie::detail::utils::unroll_times ( Fn &&  fn)

Variable Documentation

◆ num_elems_v

template<typename T >
constexpr unsigned aie::detail::utils::num_elems_v = num_elems<T>::value
constexpr