AI Engine API User Guide (AIE-API) 2024.1
Loading...
Searching...
No Matches
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::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_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< 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< 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 >
 

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 {
  aie::None , aie::Acc_Add , aie::Acc_Sub , aie::Abs ,
  aie::Conj , aie::Transpose , aie::Max , aie::Min ,
  aie::Sign , aie::Zero
}
 

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_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_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

◆ 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 typename result_type, Op >::type type

◆ 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

◆ 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 vector< T, Elems > type

◆ 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 typename result_type, Op >::type 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

◆ 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

◆ 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 vector< T, Elems > type

◆ 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

◆ 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 typename value_type 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 typename value_type 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 typename value_type 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 typename value_type 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 typename value_type 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 typename value_type 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 typename value_type 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 typename value_type 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<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<Parent1, Parent2, Operation::op>::binary_op_common; \
\
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<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<Parent, Operation::op>::unary_op_common; \
\
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