Loading...
Searching...
No Matches
UPstreamTraits.H File Reference

A set of traits associated with UPstream communication. More...

Include dependency graph for UPstreamTraits.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UPstream_mpi_dataType< T >
 UPstream data type corresponding to a fundamental (MPI) type. More...
struct  UPstream_mpi_dataType< void >
 Disallow void. More...
struct  UPstream_user_dataType< T >
 UPstream data type corresponding to user-defined type. More...
struct  UPstream_user_dataType< void >
 Disallow void. More...
struct  UPstream_mpi_dataType< char >
 Map char to UPstream::dataTypes::type_byte. More...
struct  UPstream_mpi_dataType< const char >
 Map const char to UPstream::dataTypes::type_byte. More...
struct  UPstream_mpi_dataType< unsigned char >
 Map unsigned char to UPstream::dataTypes::type_byte. More...
struct  UPstream_mpi_dataType< const unsigned char >
 Map const unsigned char to UPstream::dataTypes::type_byte. More...
struct  UPstream_mpi_dataType< int16_t >
 Map int16_t to UPstream::dataTypes::type_int16. More...
struct  UPstream_mpi_dataType< const int16_t >
 Map const int16_t to UPstream::dataTypes::type_int16. More...
struct  UPstream_mpi_dataType< int32_t >
 Map int32_t to UPstream::dataTypes::type_int32. More...
struct  UPstream_mpi_dataType< const int32_t >
 Map const int32_t to UPstream::dataTypes::type_int32. More...
struct  UPstream_mpi_dataType< int64_t >
 Map int64_t to UPstream::dataTypes::type_int64. More...
struct  UPstream_mpi_dataType< const int64_t >
 Map const int64_t to UPstream::dataTypes::type_int64. More...
struct  UPstream_mpi_dataType< uint16_t >
 Map uint16_t to UPstream::dataTypes::type_uint16. More...
struct  UPstream_mpi_dataType< const uint16_t >
 Map const uint16_t to UPstream::dataTypes::type_uint16. More...
struct  UPstream_mpi_dataType< uint32_t >
 Map uint32_t to UPstream::dataTypes::type_uint32. More...
struct  UPstream_mpi_dataType< const uint32_t >
 Map const uint32_t to UPstream::dataTypes::type_uint32. More...
struct  UPstream_mpi_dataType< uint64_t >
 Map uint64_t to UPstream::dataTypes::type_uint64. More...
struct  UPstream_mpi_dataType< const uint64_t >
 Map const uint64_t to UPstream::dataTypes::type_uint64. More...
struct  UPstream_mpi_dataType< float >
 Map float to UPstream::dataTypes::type_float. More...
struct  UPstream_mpi_dataType< const float >
 Map const float to UPstream::dataTypes::type_float. More...
struct  UPstream_mpi_dataType< double >
 Map double to UPstream::dataTypes::type_double. More...
struct  UPstream_mpi_dataType< const double >
 Map const double to UPstream::dataTypes::type_double. More...
struct  UPstream_mpi_dataType< long double >
 Map long double to UPstream::dataTypes::type_long_double. More...
struct  UPstream_mpi_dataType< const long double >
 Map const long double to UPstream::dataTypes::type_long_double. More...
struct  UPstream_user_dataType< Vector< float > >
 Map Vector<float> to UPstream::dataTypes::type_3float. More...
struct  UPstream_user_dataType< const Vector< float > >
 Map const Vector<float> to UPstream::dataTypes::type_3float. More...
struct  UPstream_user_dataType< Vector< double > >
 Map Vector<double> to UPstream::dataTypes::type_3double. More...
struct  UPstream_user_dataType< const Vector< double > >
 Map const Vector<double> to UPstream::dataTypes::type_3double. More...
struct  UPstream_user_dataType< SymmTensor< float > >
 Map SymmTensor<float> to UPstream::dataTypes::type_6float. More...
struct  UPstream_user_dataType< const SymmTensor< float > >
 Map const SymmTensor<float> to UPstream::dataTypes::type_6float. More...
struct  UPstream_user_dataType< SymmTensor< double > >
 Map SymmTensor<double> to UPstream::dataTypes::type_6double. More...
struct  UPstream_user_dataType< const SymmTensor< double > >
 Map const SymmTensor<double> to UPstream::dataTypes::type_6double. More...
struct  UPstream_user_dataType< Tensor< float > >
 Map Tensor<float> to UPstream::dataTypes::type_9float. More...
struct  UPstream_user_dataType< const Tensor< float > >
 Map const Tensor<float> to UPstream::dataTypes::type_9float. More...
struct  UPstream_user_dataType< Tensor< double > >
 Map Tensor<double> to UPstream::dataTypes::type_9double. More...
struct  UPstream_user_dataType< const Tensor< double > >
 Map const Tensor<double> to UPstream::dataTypes::type_9double. More...
struct  UPstream_alias_dataType< T >
 Explicit handling of data type aliases. This is necessary since different systems map things like 'unsigned long' differently but we restrict ourselves to int32/int64 types. More...
struct  UPstream_alias_dataType< int8_t >
 Map int8_t to UPstream::dataTypes::type_byte. More...
struct  UPstream_alias_dataType< uint8_t >
 Map uint8_t to UPstream::dataTypes::type_byte. More...
struct  UPstream_any_dataType< T >
 UPstream data type (fundamental or user-defined), after resolving any aliases. More...
struct  UPstream_basic_dataType< T >
 UPstream fundamental/aliased (excludes user-defined) data type or a component aggregate of the same. More...
struct  UPstream_basic_dataType< void >
 Disallow void. More...
struct  UPstream_dataType< T >
 UPstream fundamental/aliased/user-defined data type or a component aggregate of the same. More...
struct  UPstream_dataType< void >
 Disallow void. More...
struct  UPstream_opType< BinaryOp >
 A supported UPstream (MPI) reduce/window operation type. More...
struct  UPstream_opType< void >
 Disallow void. More...
struct  UPstream_opType< Foam::minOp< T > >
 Map minOp<T> to UPstream::opCodes::op_min. More...
struct  UPstream_opType< Foam::maxOp< T > >
 Map maxOp<T> to UPstream::opCodes::op_max. More...
struct  UPstream_opType< Foam::sumOp< T > >
 Map sumOp<T> to UPstream::opCodes::op_sum. More...
struct  UPstream_opType< Foam::plusOp< T > >
 Map plusOp<T> (same as sumOp<T>) to UPstream::opCodes::op_sum. More...
struct  UPstream_opType< Foam::multiplyOp< T > >
 Map multiplyOp<T> to UPstream::opCodes::op_prod. More...
struct  UPstream_opType< Foam::bitAndOp< T > >
 Map bitAndOp<T> to UPstream::opCodes::op_bit_and for integrals (signed or unsigned), but also allow void as "generic". More...
struct  UPstream_opType< Foam::bitOrOp< T > >
 Map bitOrOp<T> to UPstream::opCodes::op_bit_or for integrals (signed or unsigned), but also allow void as "generic". More...
struct  UPstream_opType< Foam::bitXorOp< T > >
 Map bitXorOp<T> to UPstream::opCodes::op_bit_xor for integrals (signed or unsigned), but also allow void as "generic". More...
struct  UPstream_data_opType< BinaryOp, T >
 Combined query of opType and the underlying basic data type. More...

Namespaces

namespace  Foam
 Namespace for OpenFOAM.

Macros

#define defineUPstreamDataTraits(TypeId, Type)
#define defineUPstreamDataTraits(TypeId, Type)

Detailed Description

A set of traits associated with UPstream communication.

Original source file UPstreamTraits.H

Front-facing traits
  • UPstream_basic_dataType trait :
    The main entry point for reduction operations (requires fundamental types).
    Checks against fundamental/aliased (excludes user-defined), or is a component-wise aggregate of the same.
  • UPstream_dataType trait :
    The main entry point for transmission (broadcast, send/recv, ...).
    Checks against fundamental/aliased/user-defined, or is a component-wise aggregate of the same.
  • UPstream_opType trait :
    Mapping of OpenFOAM ops to their MPI equivalent. The opcode_id is the corresponding internal representation.
  • UPstream_data_opType trait :
    Combination of UPstream_opType and UPstream_basic_dataType.
Additional helper traits (not normally used directly):
  • UPstream_mpi_dataType trait :
    Tests true and provides valid datatype_id for MPI fundamental data types. This trait will should not normally be used directly: use UPstream_alias_dataType for 'low-level' purposes (see below).
  • UPstream_user_dataType trait :
    Tests true and provides valid datatype_id for user-defined data types.
  • UPstream_alias_dataType trait :
    Use this in preference to UPstream_mpi_dataType.
    A pass-through to UPstream_mpi_dataType, but provides additional mappings for <int/long/long long,...> to the fundamental 32/64 bit integrals, since <int/long/long long,...> may not otherwise map directly on all systems.
  • UPstream_any_dataType trait :
    Used as a building block for uniform aggregate types.
    Combines UPstream_user_dataType and UPstream_alias_dataType into a single trait.

Definition in file UPstreamTraits.H.

Macro Definition Documentation

◆ defineUPstreamDataTraits [1/2]

#define defineUPstreamDataTraits ( TypeId,
Type )
Value:
\ \
template<> struct UPstream_mpi_dataType<Type> : std::true_type \
{ \
static constexpr auto datatype_id = UPstream::dataTypes::TypeId; \
}; \ \
template<> struct UPstream_mpi_dataType<const Type> : std::true_type \
{ \
static constexpr auto datatype_id = UPstream::dataTypes::TypeId; \
};

Definition at line 156 of file UPstreamTraits.H.

◆ defineUPstreamDataTraits [2/2]

#define defineUPstreamDataTraits ( TypeId,
Type )
Value:
\ \
template<> struct UPstream_user_dataType<Type> : std::true_type \
{ \
static constexpr auto datatype_id = UPstream::dataTypes::TypeId; \
}; \ \
template<> struct UPstream_user_dataType<const Type> : std::true_type \
{ \
static constexpr auto datatype_id = UPstream::dataTypes::TypeId; \
};

Definition at line 156 of file UPstreamTraits.H.