T-SIMD v31.1.0
A C++ template SIMD library
Loading...
Searching...
No Matches
simd::TypeInfo< T > Struct Template Reference

Type information for SIMD types. More...

Detailed Description

template<typename T>
struct simd::TypeInfo< T >

Type information for SIMD types.

Public Types

using NextLargerType
 The next larger type (e.g. Word for Byte), or the same type if there is no larger type.
 
using SignedType
 The signed type (e.g. SignedByte for Byte), or the same type if there is no signed type.
 
using UnsignedType
 The unsigned type (e.g. Byte for SignedByte), or the same type if there is no unsigned type.
 

Static Public Member Functions

static constexpr const char * defaultFormat ()
 Returns the default format string for printf (e.g. "%d " for Int)
 
static constexpr const char * format ()
 Returns the format string for printf (e.g. "d" for Int)
 
static constexpr const char * hexFormat ()
 Returns the hex format string for printf (e.g. "%08x " for Int)
 
static constexpr T max ()
 Returns the maximum value of the type.
 
static constexpr T min ()
 Returns the minimum value of the type.
 
static constexpr const char * name ()
 Returns the name of the type (e.g. "Int" for Int)
 
static constexpr T trueval ()
 Returns a value where all bits are 1.
 

Static Public Attributes

static constexpr bool isFloatingPoint
 Whether the type is a floating point type.
 
static constexpr bool isInteger
 Whether the type is an integer.
 
static constexpr bool isSigned
 Whether the type is signed.
 

Member Function Documentation

◆ max()

template<typename T >
static constexpr T simd::TypeInfo< T >::max ( )
inlinestaticconstexpr

Returns the maximum value of the type.

Deprecated
Use std::numeric_limits<T>::max() instead

◆ min()

template<typename T >
static constexpr T simd::TypeInfo< T >::min ( )
inlinestaticconstexpr

Returns the minimum value of the type.

Deprecated
Use std::numeric_limits<T>::lowest() instead

Member Data Documentation

◆ isFloatingPoint

template<typename T >
bool simd::TypeInfo< T >::isFloatingPoint
staticconstexpr

Whether the type is a floating point type.

Deprecated
Use std::is_floating_point<T>::value or (if C++17 is available) std::is_floating_point_v<T> instead

◆ isInteger

template<typename T >
bool simd::TypeInfo< T >::isInteger
staticconstexpr

Whether the type is an integer.

Deprecated
Use std::is_integral<T>::value or (if C++17 is available) std::is_integral_v<T> instead

◆ isSigned

template<typename T >
bool simd::TypeInfo< T >::isSigned
staticconstexpr

Whether the type is signed.

Deprecated
Use std::is_signed<T>::value or (if C++17 is available) std::is_signed_v<T> instead