19 #ifndef GEOSX_DATAREPOSITORY_CONDUITRESTART_HPP_ 20 #define GEOSX_DATAREPOSITORY_CONDUITRESTART_HPP_ 27 #include <conduit.hpp> 34 #define CONDUIT_TYPE_INFO( T, CONDUIT_TYPE ) \ 36 struct conduitTypeInfo< T > \ 38 using type = CONDUIT_TYPE; \ 39 static constexpr int id = CONDUIT_TYPE ## _ID; \ 40 static constexpr int sizeOfConduitType = sizeof( type ); \ 41 static constexpr int numConduitValues = sizeof( T ) / sizeOfConduitType; \ 42 static_assert( sizeof( T ) % sizeOfConduitType == 0, #T " cannot be made made up of " #CONDUIT_TYPE "." ); \ 47 namespace dataRepository
53 template<
typename T,
typename ENABLE =
void >
54 struct conduitTypeInfo
58 CONDUIT_TYPE_INFO(
char, CONDUIT_NATIVE_CHAR );
59 CONDUIT_TYPE_INFO(
signed char, CONDUIT_NATIVE_SIGNED_CHAR );
60 CONDUIT_TYPE_INFO(
unsigned char, CONDUIT_NATIVE_UNSIGNED_CHAR );
62 CONDUIT_TYPE_INFO(
short, CONDUIT_NATIVE_SHORT );
63 CONDUIT_TYPE_INFO(
int, CONDUIT_NATIVE_INT );
64 CONDUIT_TYPE_INFO(
long, CONDUIT_NATIVE_LONG );
65 CONDUIT_TYPE_INFO(
long long, CONDUIT_NATIVE_LONG_LONG );
67 CONDUIT_TYPE_INFO(
unsigned short, CONDUIT_NATIVE_UNSIGNED_SHORT );
68 CONDUIT_TYPE_INFO(
unsigned int, CONDUIT_NATIVE_UNSIGNED_INT );
69 CONDUIT_TYPE_INFO(
unsigned long, CONDUIT_NATIVE_UNSIGNED_LONG );
70 CONDUIT_TYPE_INFO(
unsigned long long, CONDUIT_NATIVE_UNSIGNED_LONG_LONG );
73 CONDUIT_TYPE_INFO(
float, CONDUIT_NATIVE_FLOAT );
74 CONDUIT_TYPE_INFO(
double, CONDUIT_NATIVE_DOUBLE );
77 template<
typename T >
78 struct conduitTypeInfo< T,
std::enable_if_t< std::is_enum< T >::value > > :
public conduitTypeInfo< std::underlying_type_t< T > >
82 CONDUIT_TYPE_INFO(
R1Tensor, CONDUIT_NATIVE_DOUBLE );
86 template<
typename T >
87 using conduitTypeInfo = internal::conduitTypeInfo< std::remove_const_t< std::remove_pointer_t< T > > >;
89 extern conduit::Node rootConduitNode;
Tensor< real64, 3 > R1Tensor
Alias for a local (stack-based) rank-1 tensor type.
std::string string
String type.