76#ifndef Foam_UPstreamTraits_H
77#define Foam_UPstreamTraits_H
94template<
class T>
class Vector;
96template<
class T>
class Tensor;
153#undef defineUPstreamDataTraits
154#define defineUPstreamDataTraits(TypeId, Type) \
157 template<> struct UPstream_mpi_dataType<Type> : std::true_type \
159 static constexpr auto datatype_id = UPstream::dataTypes::TypeId; \
162 template<> struct UPstream_mpi_dataType<const Type> : std::true_type \
164 static constexpr auto datatype_id = UPstream::dataTypes::TypeId; \
185#undef defineUPstreamDataTraits
189#undef defineUPstreamDataTraits
190#define defineUPstreamDataTraits(TypeId, Type) \
193 template<> struct UPstream_user_dataType<Type> : std::true_type \
195 static constexpr auto datatype_id = UPstream::dataTypes::TypeId; \
198 template<> struct UPstream_user_dataType<const Type> : std::true_type \
200 static constexpr auto datatype_id = UPstream::dataTypes::TypeId; \
212#undef defineUPstreamDataTraits
229 UPstream_mpi_dataType<std::remove_cv_t<T>>::value ||
232 std::is_integral_v<T>
233 && (sizeof(T) == sizeof(int32_t) || sizeof(T) == sizeof(int64_t))
237 using base = std::conditional_t
244 std::is_integral_v<T>
245 && (
sizeof(
T) ==
sizeof(int32_t) ||
sizeof(
T) ==
sizeof(int64_t))
249 (
sizeof(
T) ==
sizeof(int32_t)),
250 std::conditional_t<std::is_signed_v<T>, int32_t, uint32_t>,
251 std::conditional_t<std::is_signed_v<T>, int64_t, uint64_t>
290 UPstream_user_dataType<std::remove_cv_t<T>>::value
291 || UPstream_alias_dataType<T>::value
294 using base = std::conditional_t
302 static constexpr auto datatype_id = []()
constexpr noexcept
338 UPstream_alias_dataType<T>::value
340 || UPstream_alias_dataType<typename pTraits_cmptType<T>::type>::value
344 using base = std::conditional_t
346 UPstream_alias_dataType<T>::value,
348 typename UPstream_alias_dataType
357 static constexpr std::streamsize
size(std::streamsize
n)
noexcept
367 return n*(
sizeof(
T)/
sizeof(
base));
376 static constexpr std::streamsize
size(std::streamsize
n)
noexcept
394struct UPstream_dataType
398 UPstream_any_dataType<T>::value
399 || UPstream_any_dataType<typename pTraits_cmptType<T>::type>::value
403 using base = std::conditional_t
416 static constexpr std::streamsize
size(std::streamsize
n)
noexcept
426 return n*(
sizeof(
T)/
sizeof(
base));
440template<
class BinaryOp>
461struct UPstream_opType<
Foam::maxOp<T>> : std::true_type
502 std::bool_constant<std::is_integral_v<T> || std::is_void_v<T>>
504 static constexpr auto opcode_id = []()
constexpr noexcept
506 if constexpr (std::is_integral_v<T> || std::is_void_v<T>)
518 std::bool_constant<std::is_integral_v<T> || std::is_void_v<T>>
520 static constexpr auto opcode_id = []()
constexpr noexcept
522 if constexpr (std::is_integral_v<T> || std::is_void_v<T>)
534 std::bool_constant<std::is_integral_v<T> || std::is_void_v<T>>
536 static constexpr auto opcode_id = []()
constexpr noexcept
538 if constexpr (std::is_integral_v<T> || std::is_void_v<T>)
548template<
class BinaryOp,
class T>
553 UPstream_opType<BinaryOp>::value
554 && UPstream_basic_dataType<T>::value
557 static constexpr auto opcode_id = []()
constexpr noexcept
#define defineUPstreamDataTraits(TypeId, Type)
A templated (3 x 3) symmetric tensor of objects of <T>, effectively containing 6 elements,...
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
@ op_bit_xor
Bit-wise xor for (unsigned) integral types.
@ op_bit_or
Bit-wise or for (unsigned) integral types.
@ op_bit_and
Bit-wise and for (unsigned) integral types.
@ type_byte
byte, char, unsigned char, ...
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
static constexpr auto datatype_id
static constexpr auto datatype_id
Explicit handling of data type aliases. This is necessary since different systems map things like 'un...
std::conditional_t< UPstream_mpi_dataType< std::remove_cv_t< T > >::value, std::remove_cv_t< T >, std::conditional_t<( std::is_integral_v< T > &&(sizeof(T)==sizeof(int32_t)||sizeof(T)==sizeof(int64_t))), std::conditional_t<(sizeof(T)==sizeof(int32_t)), std::conditional_t< std::is_signed_v< T >, int32_t, uint32_t >, std::conditional_t< std::is_signed_v< T >, int64_t, uint64_t > >, char > > base
static constexpr auto datatype_id
UPstream data type (fundamental or user-defined), after resolving any aliases.
std::conditional_t< UPstream_user_dataType< std::remove_cv_t< T > >::value, std::remove_cv_t< T >, typename UPstream_alias_dataType< T >::base > base
static constexpr auto datatype_id
The corresponding UPstream::dataTypes enumeration.
static constexpr std::streamsize size(std::streamsize n) noexcept
UPstream fundamental/aliased (excludes user-defined) data type or a component aggregate of the same.
static constexpr std::streamsize size(std::streamsize n) noexcept
The size in terms of the number of underlying data elements.
std::conditional_t< UPstream_alias_dataType< T >::value, typename UPstream_alias_dataType< T >::base, typename UPstream_alias_dataType< typename pTraits_cmptType< T >::type >::base > base
The underlying data type (if supported) or byte.
static constexpr auto datatype_id
The corresponding UPstream::dataTypes enumeration.
UPstream fundamental/aliased/user-defined data type or a component aggregate of the same.
static constexpr std::streamsize size(std::streamsize n) noexcept
The size in terms of the number of base data elements.
std::conditional_t< UPstream_any_dataType< T >::value, typename UPstream_any_dataType< T >::base, typename UPstream_any_dataType< typename pTraits_cmptType< T >::type >::base > base
The underlying data type (if supported) or byte.
static constexpr auto datatype_id
The corresponding UPstream::dataTypes enumeration.
Combined query of opType and the underlying basic data type.
static constexpr auto opcode_id
static constexpr auto datatype_id
UPstream data type corresponding to a fundamental (MPI) type.
static constexpr auto datatype_id
static constexpr auto opcode_id
static constexpr auto opcode_id
static constexpr auto opcode_id
static constexpr auto opcode_id
static constexpr auto opcode_id
static constexpr auto opcode_id
static constexpr auto opcode_id
static constexpr auto opcode_id
static constexpr auto opcode_id
A supported UPstream (MPI) reduce/window operation type.
static constexpr auto opcode_id
static constexpr auto datatype_id
UPstream data type corresponding to user-defined type.
static constexpr auto datatype_id