| AI Engine API User Guide (AIE-API) 2025.2

Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Enumerations | Variables
expr.hpp File Reference

## Detailed Description

Expression templates types.

`#include "aie_types.hpp"`

## Classes
struct | aie::binary_op< Parent1, Parent2, Operation::Max >
struct | aie::binary_op< Parent1, Parent2, Operation::Min >
struct | aie::binary_op< Parent1, Parent2, Operation::Sign >
struct | aie::binary_op< Parent1, Parent2, Operation::Zero >
struct | aie::binary_op_common< Parent1, Parent2, Op >
struct | aie::binary_op_common_const< Parent1, Parent2, Op >
struct | aie::binary_op_common_ref< Parent1, Parent2, Op >
struct | aie::is_accum_op< T >
struct | aie::is_accum_op< binary_op< Parent1, Parent2, Op > >
struct | aie::is_accum_op< unary_op< Parent, Op > >
struct | aie::is_binary_op< T >
struct | aie::is_binary_op< binary_op< Parent1, Parent2, Op > >
struct | aie::is_complex_op< T >
struct | aie::is_complex_op< binary_op< Parent1, Parent2, Op > >
struct | aie::is_complex_op< unary_op< Parent, Op > >
struct | aie::is_elem_op< T >
struct | aie::is_elem_op< binary_op< Parent1, Parent2, Op > >
struct | aie::is_elem_op< unary_op< Parent, Op > >
struct | aie::is_mmul_op< T >
struct | aie::is_real_op< T >
struct | aie::is_sparse_vector_op< T >
struct | aie::is_sparse_vector_op< binary_op< Parent1, Parent2, Op > >
struct | aie::is_sparse_vector_op< unary_op< Parent, Op > >
struct | aie::is_tbs_op< T >
struct | aie::is_tbs_op< binary_op< Parent1, Parent2, Op > >
struct | aie::is_tbs_op< unary_op< Parent, Op > >
struct | aie::is_unary_op< T >
struct | aie::is_unary_op< unary_op< Parent, Op > >
struct | aie::is_vector_op< T >
struct | aie::is_vector_op< binary_op< Parent1, Parent2, Op > >
struct | aie::is_vector_op< unary_op< Parent, Op > >
struct | aie::op_result_helper< T, Op >
struct | aie::op_result_helper< binary_op< Parent1, Parent2, ParentOp >, Op >
struct | aie::op_result_helper< detail::tbs< T, Elems, Level, NumLevels, SlidingInner, IterDesc, ResourceType, Resource, Mode, Restrict, U >, Op >
struct | aie::op_result_helper< Parent, Operation::None >
struct | aie::op_result_helper< unaligned_vector_ref< T, Elems, Resource >, Op >
struct | aie::op_result_helper< unary_op< Parent, ParentOp >, Op >
struct | aie::op_result_helper< vector_elem_const_ref< T, Elems >, Op >
struct | aie::op_result_helper< vector_elem_ref< T, Elems >, Op >
struct | aie::op_result_helper< vector_ref< T, Elems, Resource >, Op >
struct | aie::op_value_type_helper< T >
struct | aie::op_value_type_helper< binary_op< Parent1, Parent2, Op > >
struct | aie::op_value_type_helper< detail::tbs< T, Elems, Level, NumLevels, SlidingInner, IterDesc, ResourceType, Resource, Mode, Restrict, U > >
struct | aie::op_value_type_helper< sparse_vector< T, Elems > >
struct | aie::op_value_type_helper< unaligned_vector_ref< T, Elems, Resource > >
struct | aie::op_value_type_helper< unary_op< Parent, Op > >
struct | aie::op_value_type_helper< vector< T, Elems > >
struct | aie::op_value_type_helper< vector_elem_const_ref< T, Elems > >
struct | aie::op_value_type_helper< vector_elem_ref< T, Elems > >
struct | aie::op_value_type_helper< vector_ref< T, Elems, Resource > >
struct | aie::unary_op< Parent, Operation::Abs >
struct | aie::unary_op< Parent, Operation::Acc_Add >
struct | aie::unary_op< Parent, Operation::Acc_Sub >
struct | aie::unary_op< Parent, Operation::Conj >
struct | aie::unary_op< Parent, Operation::None >
struct | aie::unary_op< Parent, Operation::Transpose >
struct | aie::unary_op_common< Parent, Op >
struct | aie::unary_op_common_const< Parent, Op >
struct | aie::unary_op_common_ref< Parent, Op >

## Namespaces
namespace | aie
| Base namespace for AIE operations and types.

## Macros
#define | __AIE_API_EXPR__HPP__
#define | BINARY_OP(op)
#define | BINARY_OP_IMPL(op)
#define | UNARY_OP(op)
#define | UNARY_OP_IMPL(op)

## Typedefs
template<typename T, Operation Op>
using | aie::op_result_type_t = typename op_result_helper<T, Op>::type
template<typename T>
using | aie::op_value_type_t = typename op_value_type_helper<aie_dm_resource_remove_t<T>>::type

## Enumerations
enum class | aie::Operation

## Variables
template<typename T>
static constexpr bool | aie::is_accum_op_v = is_accum_op<T>::value
template<typename T>
static constexpr bool | aie::is_binary_op_v = is_binary_op<T>::value
template<typename T>
static constexpr bool | aie::is_block_vector_op_v = is_block_vector_op<T>::value
template<typename T>
static constexpr bool | aie::is_complex_op_v = is_complex_op<T>::value
template<typename T>
static constexpr bool | aie::is_elem_op_v = is_elem_op<T>::value
template<typename T>
static constexpr bool | aie::is_op_v = is_unary_op_v<T> || is_binary_op_v<T>
template<typename T>
static constexpr bool | aie::is_real_op_v = is_real_op<T>::value
template<typename T>
static constexpr bool | aie::is_sparse_vector_op_v = is_sparse_vector_op<T>::value
template<typename T>
static constexpr bool | aie::is_tbs_op_v = is_tbs_op<T>::value
template<typename T>
static constexpr bool | aie::is_unary_op_v = is_unary_op<T>::value
template<typename T>
static constexpr bool | aie::is_vector_op_v = is_vector_op<T>::value

## Class Documentation

## ◆ aie::op_result_helper

struct aie::op_result_helper

template<typename T, Operation Op>
struct aie::op_result_helper< T, Op >

Class Members
typedef T | type T |

## ◆ aie::op_result_helper< binary_op< Parent1, Parent2, ParentOp >, Op >

struct aie::op_result_helper< binary_op< Parent1, Parent2, ParentOp >, Op >

template<typename Parent1, typename Parent2, Operation ParentOp, Operation Op>
struct aie::op_result_helper< binary_op< Parent1, Parent2, ParentOp >, Op >

Class Members
typedef binary_op< Parent1, Parent2, ParentOp > | type |
typedef typename result_type, Op >::type | type typename op_result_helper<typename binary_op<Parent1, Parent2, ParentOp>::result_type, Op>::type |

## ◆ aie::op_result_helper< detail::tbs< T, Elems, Level, NumLevels, SlidingInner, IterDesc, ResourceType, Resource, Mode, Restrict, U >, Op >

struct aie::op_result_helper< detail::tbs< T, Elems, Level, NumLevels, SlidingInner, IterDesc, ResourceType, Resource, Mode, Restrict, U >, Op >

template<typename T, unsigned Elems, unsigned Level, unsigned NumLevels, bool SlidingInner, typename IterDesc, typename ResourceType, ResourceType Resource, detail::tbs_mode Mode, bool Restrict, typename U, Operation Op>
requires (Op != Operation::None)
struct aie::op_result_helper< detail::tbs< T, Elems, Level, NumLevels, SlidingInner, IterDesc, ResourceType, Resource, Mode, Restrict, U >, Op >

Class Members
typedef T | type |
typedef tbs< T, Elems, Level, NumLevels, SlidingInner, IterDesc, ResourceType, Resource, Mode, Restrict, U > | type detail::tbs<T, Elems, Level, NumLevels, SlidingInner, IterDesc, ResourceType, Resource, Mode, Restrict, U> |

## ◆ aie::op_result_helper< Parent, Operation::None >

struct aie::op_result_helper< Parent, Operation::None >

template<typename Parent>
struct aie::op_result_helper< Parent, Operation::None >

Class Members
typedef Parent | type |
typedef Parent | type Parent |

## ◆ aie::op_result_helper< unaligned_vector_ref< T, Elems, Resource >, Op >

struct aie::op_result_helper< unaligned_vector_ref< T, Elems, Resource >, Op >

template<typename T, unsigned Elems, aie_dm_resource Resource, Operation Op>
requires (Op != Operation::None)
struct aie::op_result_helper< unaligned_vector_ref< T, Elems, Resource >, Op >

Class Members
typedef T | type |
typedef vector< T, Elems > | type vector<T, Elems> |

## ◆ aie::op_result_helper< unary_op< Parent, ParentOp >, Op >

struct aie::op_result_helper< unary_op< Parent, ParentOp >, Op >

template<typename Parent, Operation ParentOp, Operation Op>
struct aie::op_result_helper< unary_op< Parent, ParentOp >, Op >

Class Members
typedef unary_op< Parent, ParentOp > | type |
typedef typename result_type, Op >::type | type typename op_result_helper<typename unary_op<Parent, ParentOp>::result_type, Op>::type |

## ◆ aie::op_result_helper< vector_elem_const_ref< T, Elems >, Op >

struct aie::op_result_helper< vector_elem_const_ref< T, Elems >, Op >

template<typename T, unsigned Elems, Operation Op>
requires (Op != Operation::None)
struct aie::op_result_helper< vector_elem_const_ref< T, Elems >, Op >

Class Members
typedef T | type |
typedef T | type T |

## ◆ aie::op_result_helper< vector_elem_ref< T, Elems >, Op >

struct aie::op_result_helper< vector_elem_ref< T, Elems >, Op >

template<typename T, unsigned Elems, Operation Op>
requires (Op != Operation::None)
struct aie::op_result_helper< vector_elem_ref< T, Elems >, Op >

Class Members
typedef T | type |
typedef T | type T |

## ◆ aie::op_result_helper< vector_ref< T, Elems, Resource >, Op >

struct aie::op_result_helper< vector_ref< T, Elems, Resource >, Op >

template<typename T, unsigned Elems, aie_dm_resource Resource, Operation Op>
requires (Op != Operation::None)
struct aie::op_result_helper< vector_ref< T, Elems, Resource >, Op >

Class Members
typedef T | type |
typedef vector< T, Elems > | type vector<T, Elems> |

## ◆ aie::op_value_type_helper

struct aie::op_value_type_helper

template<typename T>
struct aie::op_value_type_helper< T >

Class Members
typedef T | type T |

## ◆ aie::op_value_type_helper< binary_op< Parent1, Parent2, Op > >

struct aie::op_value_type_helper< binary_op< Parent1, Parent2, Op > >

template<typename Parent1, typename Parent2, Operation Op>
struct aie::op_value_type_helper< binary_op< Parent1, Parent2, Op > >

Class Members
typedef binary_op< Parent1, Parent2, Op > | type |
typedef typename value_type | type typename binary_op<Parent1, Parent2, Op>::value_type |

## ◆ aie::op_value_type_helper< detail::tbs< T, Elems, Level, NumLevels, SlidingInner, IterDesc, ResourceType, Resource, Mode, Restrict, U > >

struct aie::op_value_type_helper< detail::tbs< T, Elems, Level, NumLevels, SlidingInner, IterDesc, ResourceType, Resource, Mode, Restrict, U > >

template<typename T, unsigned Elems, unsigned Level, unsigned NumLevels, bool SlidingInner, typename IterDesc, typename ResourceType, ResourceType Resource, detail::tbs_mode Mode, bool Restrict, typename U>
struct aie::op_value_type_helper< detail::tbs< T, Elems, Level, NumLevels, SlidingInner, IterDesc, ResourceType, Resource, Mode, Restrict, U > >

Class Members
typedef T | type |
typedef typename value_type | type typename detail::tbs<T, Elems, Level, NumLevels, SlidingInner, IterDesc, ResourceType, Resource, Mode, Restrict, U>::value_type |

## ◆ aie::op_value_type_helper< sparse_vector< T, Elems > >

struct aie::op_value_type_helper< sparse_vector< T, Elems > >

template<typename T, unsigned Elems>
struct aie::op_value_type_helper< sparse_vector< T, Elems > >

Class Members
typedef T | type |
typedef typename value_type | type typename sparse_vector<T, Elems>::value_type |

## ◆ aie::op_value_type_helper< unaligned_vector_ref< T, Elems, Resource > >

struct aie::op_value_type_helper< unaligned_vector_ref< T, Elems, Resource > >

template<typename T, unsigned Elems, aie_dm_resource Resource>
struct aie::op_value_type_helper< unaligned_vector_ref< T, Elems, Resource > >

Class Members
typedef T | type |
typedef typename value_type | type typename unaligned_vector_ref<T, Elems, Resource>::value_type |

## ◆ aie::op_value_type_helper< unary_op< Parent, Op > >

struct aie::op_value_type_helper< unary_op< Parent, Op > >

template<typename Parent, Operation Op>
struct aie::op_value_type_helper< unary_op< Parent, Op > >

Class Members
typedef unary_op< Parent, Op > | type |
typedef typename value_type | type typename unary_op<Parent, Op>::value_type |

## ◆ aie::op_value_type_helper< vector< T, Elems > >

struct aie::op_value_type_helper< vector< T, Elems > >

template<typename T, unsigned Elems>
struct aie::op_value_type_helper< vector< T, Elems > >

Class Members
typedef T | type |
typedef typename value_type | type typename vector<T, Elems>::value_type |

## ◆ aie::op_value_type_helper< vector_elem_const_ref< T, Elems > >

struct aie::op_value_type_helper< vector_elem_const_ref< T, Elems > >

template<typename T, unsigned Elems>
struct aie::op_value_type_helper< vector_elem_const_ref< T, Elems > >

Class Members
typedef T | type |
typedef typename value_type | type typename vector_elem_const_ref<T, Elems>::value_type |

## ◆ aie::op_value_type_helper< vector_elem_ref< T, Elems > >

struct aie::op_value_type_helper< vector_elem_ref< T, Elems > >

template<typename T, unsigned Elems>
struct aie::op_value_type_helper< vector_elem_ref< T, Elems > >

Class Members
typedef T | type |
typedef typename value_type | type typename vector_elem_ref<T, Elems>::value_type |

## ◆ aie::op_value_type_helper< vector_ref< T, Elems, Resource > >

struct aie::op_value_type_helper< vector_ref< T, Elems, Resource > >

template<typename T, unsigned Elems, aie_dm_resource Resource>
struct aie::op_value_type_helper< vector_ref< T, Elems, Resource > >

Class Members
typedef T | type |
typedef typename value_type | type typename vector_ref<T, Elems, Resource>::value_type |

## Macro Definition Documentation

## ◆ __AIE_API_EXPR__HPP__

#define __AIE_API_EXPR__HPP__

## ◆ BINARY_OP

#define BINARY_OP | ( |  | op | ) |

Value:
\
template <typename Parent1, typename Parent2> \
struct binary_op<Parent1, Parent2, Operation::op> : public binary_op_common_const<Parent1, Parent2, Operation::op> \
{ \
using parent1_type = Parent1; \
using parent2_type = Parent2; \
using result_type = op_result_type_t<parent1_type, Operation::op>; \
using value_type = op_value_type_t<result_type>; \
\
using binary_op_common_const<Parent1, Parent2, Operation::op>::binary_op_common_const; \
\
result_type operator()() const; \
};

## ◆ BINARY_OP_IMPL

#define BINARY_OP_IMPL | ( |  | op | ) |

Value:
template <typename Parent1, typename Parent2> \
__aie_inline \
typename binary_op<Parent1, Parent2, Operation::op>::result_type binary_op<Parent1, Parent2, Operation::op>::operator()() const

## ◆ UNARY_OP

#define UNARY_OP | ( |  | op | ) |

Value:
template <typename Parent> \
struct unary_op<Parent, Operation::op> : public unary_op_common_const<Parent, Operation::op> \
{ \
using parent1_type = Parent; \
using result_type = op_result_type_t<parent1_type, Operation::op>; \
using value_type = op_value_type_t<result_type>; \
\
using unary_op_common_const<Parent, Operation::op>::unary_op_common_const; \
\
result_type operator()() const; \
};

## ◆ UNARY_OP_IMPL

#define UNARY_OP_IMPL | ( |  | op | ) |

Value:
template <typename Parent> \
__aie_inline \
typename unary_op<Parent, Operation::op>::result_type unary_op<Parent, Operation::op>::operator()() const