OpenVDB 13.0.0

Loading...
Searching...
No Matches
PromoteType< T > Struct Template Reference

Promotion classes which provide an interface for elevating and demoting a scalar or VDB type to a higher or lower precision. Integer types preserve their sign. Types promotion are only valid between 8 to 64 bits (long doubles are not supported). More...

`#include <openvdb/Types.h>`

## Public Types
template<size_t Shift = ~0UL>
using | Promote = typename TypeT< std::max(size_t(8), std::min(size_t(64), (true ? size_t(8)*(sizeof(T)<<Shift) : size_t(8)*(sizeof(T)>>Shift)))) >::type
template<size_t Shift = ~0UL>
using | Demote = typename TypeT< std::max(size_t(8), std::min(size_t(64), (false ? size_t(8)*(sizeof(T)<<Shift) : size_t(8)*(sizeof(T)>>Shift)))) >::type
using | Highest = typename TypeT<64ul>::type
using | Lowest = typename TypeT<8ul>::type
using | Next = Promote<1>
using | Previous = Demote<1>

## Detailed Description

template<typename T>
struct openvdb::v13_0::PromoteType< T >

Promotion classes which provide an interface for elevating and demoting a scalar or VDB type to a higher or lower precision. Integer types preserve their sign. Types promotion are only valid between 8 to 64 bits (long doubles are not supported).

## Member Typedef Documentation

## ◆ Demote

template<typename T>
template<size_t Shift = ~0UL>

using Demote = typename TypeT< std::max(size_t(8), std::min(size_t(64), (false ? size_t(8)*(sizeof(T)<<Shift) : size_t(8)*(sizeof(T)>>Shift)))) >::type

## ◆ Highest

template<typename T>

using Highest = typename TypeT<64ul>::type

## ◆ Lowest

template<typename T>

using Lowest = typename TypeT<8ul>::type

## ◆ Next

template<typename T>

using Next = Promote<1>

## ◆ Previous

template<typename T>

using Previous = Demote<1>

## ◆ Promote

template<typename T>
template<size_t Shift = ~0UL>

using Promote = typename TypeT< std::max(size_t(8), std::min(size_t(64), (true ? size_t(8)*(sizeof(T)<<Shift) : size_t(8)*(sizeof(T)>>Shift)))) >::type