preCICE
v3.1.2
Loading...
Searching...
No Matches
src
utils
Helpers.cpp
Go to the documentation of this file.
1
#include <
cstdint
>
2
3
namespace
precice::utils
{
4
5
bool
isMachineBigEndian
()
6
{
7
union
{
8
uint32_t i;
9
char
c[4];
10
} bint = {0x01020304};
11
12
return
bint.c[0] == 1;
13
}
14
15
}
// namespace precice::utils
cstdint
precice::utils
contains precice-related utilities.
Definition
PointToPointCommunicationTest.cpp:23
precice::utils::isMachineBigEndian
bool isMachineBigEndian()
Returns true if machine is big-endian needed for parallel vtk output.
Definition
Helpers.cpp:5