alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
alpaka::concepts::LosslesslyConvertible Concept Reference

Concept to check if a type can be lossless converted to another type. More...

#include <vecConcepts.hpp>

Concept definition

template<typename T_From, typename T_To>
concept LosslesslyConvertible = std::convertible_to<T_From, T_To>
Concept to check if a type can be lossless converted to another type.
constexpr bool floatFloatLossless
constexpr bool integralIntegralLossless
constexpr bool integralFloatLossless

Detailed Description

Concept to check if a type can be lossless converted to another type.

This concept ensures that a type T_From can be converted to a type T_To without any loss of information. It checks for implicit convertibility, signedness compatibility, and precision preservation for both integer and floating-point types.

Template Parameters
T_FromThe source type to be converted.
T_ToThe target type to which the source type is converted.

Definition at line 53 of file vecConcepts.hpp.