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

Loading...
Searching...
No Matches
aie::PackableFrom Concept Reference
Basic Types » Concepts for Basic Types

## Detailed Description

The concept PackableFrom is satisfied when all the following requirements are met:

1. Both `From` and `To` types are valid vector element types.
2. `From` type is complex if and only if `To` is a complex type.
3. Both `From` and `To` are integer types.
4. `From` type has a wider bit representation than `To`.

See also
  aie::vector::pack
  aie::vector::pack_sign
  aie::UnpackableFrom

## Concept definition

template<typename To, typename From>
concept aie::PackableFrom = ElemBaseType<To> &&
ElemBaseType<From> &&
detail::type_bits_v<To> < detail::type_bits_v<From> &&
detail::is_complex_v<To> == detail::is_complex_v<From> &&
!detail::is_floating_point_v<To> &&
!detail::is_floating_point_v<From>
aie::ElemBaseType
Concept for all the basic types that can be used in operations and as vector element type.
Definition concepts.hpp:185
aie::PackableFrom
The concept PackableFrom is satisfied when all the following requirements are met:
Definition concepts.hpp:388