Skip to content
GitLab
Explore
Sign in
Register
This is an archived project. Repository and other project resources are read-only.
Commits on Source (1)
COMP: use <cstdint> and remove dependency on foamEndian.H/endian.H
· 9e4565a3
Mark OLESEN
authored
Feb 07, 2025
9e4565a3
Hide whitespace changes
Inline
Side-by-side
src/adiosFoam/write/adiosCoreWrite.C
View file @
9e4565a3
...
...
@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2016-202
3
OpenCFD Ltd.
Copyright (C) 2016-202
5
OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -29,8 +29,8 @@ License
#include
"adiosTime.H"
#include
"cloud.H"
#include
"foamVersion.H"
#include
"endian.H"
#include
"OSspecific.H"
#include
<cstdint>
// For endian information
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
...
...
@@ -201,15 +201,34 @@ void Foam::adiosFoam::adiosCoreWrite::putBaseAttributes()
);
// Endian type (LSB|MSB)
#ifdef __BYTE_ORDER__
// Clang, Gcc, Icc, and others
putAttribute
(
adiosFoam
::
foamAttribute
/
"endian"
,
#ifdef WM
_LITTLE_ENDIAN
#if (__BYTE_ORDER__ == __ORDER
_LITTLE_ENDIAN
__)
"LSB"
#else
"MSB"
#endif
#elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
"MSB"
;
#else
"mixed"
#endif
);
#endif
// C++20
// if constexpr (std::endian::native == std::endian::big)
// {
// putAttribute(adiosFoam::foamAttribute / "endian", "MSB");
// }
// else if constexpr (std::endian::native == std::endian::little)
// {
// putAttribute(adiosFoam::foamAttribute / "endian", "LSB");
// }
// else
// {
// putAttribute(adiosFoam::foamAttribute / "endian", "mixed");
// }
// OpenFOAM label size (32|64)
putIntAttribute
...
...