Skip to content

rtm/type_traits.h

#include "rtm/type_traits.h"
template<typename source_type>
struct related_types
{
};

Specifies the related types given a source type.

template<>
struct related_types<float>
{
    using mask4 = mask4f; // The 4 lane mask type.
    using scalar = scalarf; // The SIMD scalar type.
    using vector4 = vector4f; // The 4D vector type.
    using quat = quatf; // The quaternion type.
    using vq = vqf; // The VQ transform type.
    using vqs = vqsf; // The VQS transform type.
    using vqv = vqvf; // The VQV transform type.
    using vqm = vqmf; // The VQM transform type.
    using qv = vqf; // The previous name of vq.
    using qvs = vqsf; // The previous name of vqs.
    using qvv = vqvf; // The previous name of vqv.
    using matrix3x3 = matrix3x3f; // The 3x3 matrix type.
    using matrix3x4 = matrix3x4f; // The 3x4 affine matrix type.
    using matrix4x4 = matrix4x4f; // The 4x4 matrix type.
    using float1 = float; // The scalar type for memory storage.
    using float2 = float2f; // The 2D vector type for memory storage.
    using float3 = float3f; // The 3D vector type for memory storage.
    using float4 = float4f; // The 4D vector type for memory storage.
    using int1 = uint32_t; // The unsigned integer type with the same size as the float type.
};

The related types of float32 values.

template<>
struct related_types<double>
{
    using mask4 = mask4d; // The 4 lane mask type.
    using scalar = scalard; // The SIMD scalar type.
    using vector4 = vector4d; // The 4D vector type.
    using quat = quatd; // The quaternion type.
    using vq = vqd; // The VQ transform type.
    using vqs = vqsd; // The VQS transform type.
    using vqv = vqvd; // The VQV transform type.
    using vqm = vqmd; // The VQM transform type.
    using qv = vqd; // The previous name of vq.
    using qvs = vqsd; // The previous name of vqs.
    using qvv = vqvd; // The previous name of vqv.
    using matrix3x3 = matrix3x3d; // The 3x3 matrix type.
    using matrix3x4 = matrix3x4d; // The 3x4 affine matrix type.
    using matrix4x4 = matrix4x4d; // The 4x4 matrix type.
    using float1 = double; // The scalar type for memory storage.
    using float2 = float2d; // The 2D vector type for memory storage.
    using float3 = float3d; // The 3D vector type for memory storage.
    using float4 = float4d; // The 4D vector type for memory storage.
    using int1 = uint64_t; // The unsigned integer type with the same size as the float type.
};

The related types of float64 values.