From 241a668e2bf74948d82f0044f869309bcac8bf6c Mon Sep 17 00:00:00 2001 From: Chuck Atkins <chuck.atkins@kitware.com> Date: Thu, 13 Apr 2017 11:06:34 -0400 Subject: [PATCH] Place fixed width fundamental types into the adios namespace This allows us to both drop the namespace prefix when using them in implementation and guarantee that we don't use versions of the types that get re-defined elsewhere. In order to provide the least ammount of disruption this doesn't include any sweeping search and replace changes. However, it is recommended moving forward that these types be used internally when fixed width sizes are expected. This will allow the transition to happen gradually through attrition and minimize conflicts. --- include/ADIOSTypes.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/include/ADIOSTypes.h b/include/ADIOSTypes.h index a3e286d94..878d4b76b 100644 --- a/include/ADIOSTypes.h +++ b/include/ADIOSTypes.h @@ -11,6 +11,10 @@ #ifndef ADIOS_TYPES_H_ #define ADIOS_TYPES_H_ +#include <complex> +#include <cstddef> +#include <cstdint> + namespace adios { @@ -37,6 +41,26 @@ enum class IOMode COLLECTIVE = 1 }; -} // end namespace +// Alias the fixed sized typed into the adios namespace to make sure we're +// always using the right ones. +using std::size_t; + +using std::int8_t; +using std::uint8_t; +using std::int16_t; +using std::uint16_t; +using std::int32_t; +using std::uint32_t; +using std::int64_t; +using std::uint64_t; + +// Not sure if we're really use these ones but we'll round it out for +// completion +using real32_t = float; +using real64_t = double; +using complex32_t = std::complex<real32_t>; +using complex64_t = std::complex<real64_t>; + +} // end namespace adios #endif /* ADIOS_TYPES_H_ */ -- GitLab