itpp
base
math
misc.cpp
Go to the documentation of this file.
1
29
#include <
itpp/base/math/misc.h
>
30
31
#ifndef _MSC_VER
32
# include <itpp/config.h>
33
#else
34
# include <itpp/config_msvc.h>
35
#endif
36
37
38
namespace
itpp
39
{
40
41
std::string
itpp_version
(
void
)
42
{
43
#ifdef PACKAGE_VERSION
44
return
std::string(PACKAGE_VERSION);
45
#else
46
return
std::string(
"Warning: Version unknown!"
);
47
#endif
48
}
49
50
bool
is_bigendian
()
51
{
52
int
i = 1;
53
char
*p =
reinterpret_cast<
char
*
>
(&i);
54
if
(p[0] == 1)
// Lowest address contains the least significant byte
55
return
false
;
// LITTLE_ENDIAN
56
else
57
return
true
;
// BIG_ENDIAN
58
}
59
60
}
//namespace itpp
itpp::is_bigendian
bool is_bigendian()
Returns true if machine endianness is BIG_ENDIAN.
Definition:
misc.cpp:50
itpp::itpp_version
std::string itpp_version(void)
Returns IT++ library version number, e.g. "3.7.1".
Definition:
misc.cpp:41
itpp
itpp namespace
Definition:
itmex.h:37
misc.h
Miscellaneous functions - header file.
Generated on Sun Jan 3 2021 11:31:33 for IT++ by
Doxygen
1.8.20