Type traits for SIMD related types and functions.
Computes the expected width of a given type.
Computes the maximum native width of a given type.
Computes the width of a given type.
Computes the fundamental width of a given type.
Using EVE types and functions may require information about some properties of the processed types that are accessible through the following traits.
Convenience header:
Required header: #include <eve/traits/iteartor_width.hpp>
Returns a width for a relaxed iterator/range. If T defines a nested static constexpr function iterator_width() (which should return a eve::width_type)
| Type | Type of value to assess |
Required header: #include <eve/traits/width.hpp>
For a given type T, computes it's associated width.
| T | Type to process |
Required header: #include <eve/traits/width.hpp>
Computes the width of the smallest register able to store values of type Type for a given SIMD ABI with no uninitialized lanes.
| Type | Type of value to assess |
| ABI | SIMD ABI to use as reference. Must models eve::regular_abi. |
Required header: #include <eve/traits/width.hpp>
Returns the width of the largest native register able to store values of type Type for a given SIMD ABI.
| Type | Type of value to assess |
| ABI | SIMD ABI to use as reference. Must models eve::regular_abi. |
Required header: #include <eve/traits/width.hpp>
Default register width for a type. Sometimes is smaller than max_native_width.
| Type | Type of value to assess |
| ABI | SIMD ABI to use as reference. Must models eve::regular_abi. |
Classes | |
| struct | eve::as< T > |
| Lightweight type-wrapper. More... | |
| struct | eve::as_element< T > |
| Lightweight type-wrapper over element type. More... | |
| struct | eve::common_compatible< Ts > |
| Computes the type compatible with a list of values. More... | |
| struct | eve::common_type< Ts > |
| Computes a type that can represent all values in a list of types. More... | |
| struct | eve::comparisons< T > |
| Extension point for ordering and equality computation. More... | |
| struct | eve::element_type< T > |
| Extracts the scalar part of a type. More... | |
| struct | eve::underlying_type< Ts > |
| Computes the most scalar type associated with a type. More... | |
Concepts | |
| concept | eve::same_lanes_or_scalar |
| Checks that all types Ts are either scalar or share a common number of lanes. | |
| concept | eve::same_lanes_or_scalar_tuple |
| Checks that all types within a product type are either scalar or share a common number of lanes. | |
| concept | eve::same_lanes |
| Checks that all SIMD types Ts share a common number of lanes. | |
| concept | eve::same_types |
| Checks that all types Ts are scalars of a single type U or simd_values sharing the same lane count and of element type U. | |
| concept | eve::same_types_tuple |
| Checks that all types within a product type are scalars of a single type U or simd_values sharing the same lane count and of element type U. | |
Typedefs | |
| template<typename T> | |
| using | eve::value_type_t = typename decltype(_::value_type_impl<T>())::type |
| A meta function for getting an associated value_type for a relaxed iterator/range. | |
| template<typename T> | |
| using | eve::wide_value_type_t = as_wide_t<value_type_t<T>, iterator_width_v<T>> |
Variables | |
| template<typename Type, width_type Lanes> | |
| using | eve::abi_t |
| Find proper ABI type for Type/Lanes pair. | |
| template<typename Type, width_type N, typename ABI> | |
| using | eve::as_register_t |
| Find proper register type for Type/Lanes/ABI triplet. | |
| template<typename Type, width_type N, typename ABI> | |
| using | eve::as_logical_register_t |
| Find proper logical register type for Type/Lanes/ABI triplet. | |
| template<typename T> | |
| constexpr std::size_t | eve::max_scalar_size_v |
| A meta function for getting a maximum size of scalar. | |
| using eve::value_type_t = typename decltype(_::value_type_impl<T>())::type |
A meta function for getting an associated value_type for a relaxed iterator/range.
| T | Type to process |
value_type_t<T> is computed as follows:
| T | Type to process |
Required header: #include <eve/traits.hpp>
| using eve::wide_value_type_t = as_wide_t<value_type_t<T>, iterator_width_v<T>> |
| T | Type to process |
Required header: #include <eve/traits/wide_value_type.hpp>, #include <eve/traits.hpp>
| using eve::abi_t |
Find proper ABI type for Type/Lanes pair.
Computes the best ABI to use to efficiently store Lanes elements of type Type in order to use SIMD implementations and returns it's type.
| Type | Type of the element to store |
| Lanes | Number of elements to store |
| using eve::as_logical_register_t |
Find proper logical register type for Type/Lanes/ABI triplet.
Computes the correct logical register to use to efficiently store Lanes elements of type Type in the given ABI and returns it's type.
| Type | Type of the element to store |
| Lanes | Number of elements to store |
| ABI | Current ABI of the plateform |
| using eve::as_register_t |
Find proper register type for Type/Lanes/ABI triplet.
Computes the correct register to use to efficiently store Lanes elements of type Type in the given ABI and returns it's type.
| Type | Type of the element to store |
| Lanes | Number of elements to store |
| ABI | Current ABI of the plateform |
|
constexpr |
A meta function for getting a maximum size of scalar.
| T | Type to process |
For a product type returns max size of individual fields. Otherwise returns sizeof(T)
Required header: #include <eve/traits/max_scalar_size.hpp>, #include <eve/traits.hpp>