Type traits for SIMD related types and functions.
Using EVE types and functions may require information about some properties of the processed types that are accessible through the following traits.
Convenience header:
Classes | |
| struct | eve::abi< Type, Lanes > |
| Find proper ABI for Type/Lanes pair. More... | |
| struct | eve::as< T > |
| Lightweight type-wrapper. More... | |
| struct | eve::as_element< T > |
| Lightweight type-wrapper over element type. More... | |
| struct | eve::cardinal< Type > |
| Computes the cardinal of a given 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::iterator_cardinal_t = decltype(_::iterator_cardinal_impl<T>()) |
| A meta-function that returns a cardinal for a relaxed iterator/range. If T defines a nested static function iterator_cardinal() (which should return eve::fixed). | |
| template<typename... Ts> | |
| using | eve::max_lanes_t = fixed<max_lanes_v<Ts...>> |
| The cardinal type of the maximum lane count of given wide or scalar types. | |
| 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_cardinal_t<T>> |
Variables | |
| template<typename... Ts> | |
| constexpr auto | eve::max_lanes_v = _::compute_max_lanes<Ts...>() |
| A meta function for getting a maximum lane count of given wide or scalar types. | |
| template<typename T> | |
| constexpr std::size_t | eve::max_scalar_size_v |
| A meta function for getting a maximum size of scalar. | |
| using eve::iterator_cardinal_t = decltype(_::iterator_cardinal_impl<T>()) |
A meta-function that returns a cardinal for a relaxed iterator/range. If T defines a nested static function iterator_cardinal() (which should return eve::fixed).
| T | Type to process |
NOTE: for aligned_ptr we return expected_cardinal.
Required header: #include <eve/traits/iterator_cardinal.hpp>, #include <eve/traits.hpp>
| using eve::max_lanes_t = fixed<max_lanes_v<Ts...>> |
The cardinal type of the maximum lane count of given wide or scalar types.
| Ts | Types to process |
| 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_cardinal_t<T>> |
| T | Type to process |
Required header: #include <eve/traits/wide_value_type.hpp>, #include <eve/traits.hpp>
|
inlineconstexpr |
A meta function for getting a maximum lane count of given wide or scalar types.
| Ts | Types to process |
|
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>