35#if WM_LABEL_SIZE == 32
38#elif WM_LABEL_SIZE == 64
58 #if WM_LABEL_SIZE == 32
63 typedef int64_t nonNative;
69 for (
const label* endData =
data + nElem;
data != endData; ++
data)
71 is.
readRaw(
reinterpret_cast<char*
>(&parsed),
sizeof(nonNative));
85 *
data = label(parsed);
92 is.
readRaw(
reinterpret_cast<char*
>(
data), nElem*
sizeof(label));
95 #elif WM_LABEL_SIZE == 64
99 typedef int32_t nonNative;
105 for (
const label* endData =
data + nElem;
data != endData; ++
data)
107 is.
readRaw(
reinterpret_cast<char*
>(&parsed),
sizeof(nonNative));
109 *
data = label(parsed);
115 is.
readRaw(
reinterpret_cast<char*
>(
data), nElem*
sizeof(label));
127 for (label i=0; i<
b; i++)
136 <<
"negative value for b is not supported"
147 static label factTable[13] =
149 1, 1, 2, 6, 24, 120, 720, 5040, 40320,
150 362880, 3628800, 39916800, 479001600
157 <<
"n value out of range"
std::enable_if< std::is_integral< T >::value, bool >::type checkLabelSize() const noexcept
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual Istream & readRaw(char *, std::streamsize)=0
Low-level raw binary read.
Database for solution data, solver performance and other reduced data.
A traits class, which is primarily used for primitives.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
label readRawLabel(Istream &is)
Read raw label from binary stream.
errorManip< error > abort(error &err)
label factorial(label n)
Evaluate n! : 0 < n <= 12.