KASKADE 7 development version
check_endianness.hh
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the library KASKADE 7 */
4/* https://www.zib.de/research/projects/kaskade7-finite-element-toolbox */
5/* */
6/* Copyright (C) 2002-2018 Zuse Institute Berlin */
7/* */
8/* KASKADE 7 is distributed under the terms of the ZIB Academic License. */
9/* see $KASKADE/academic.txt */
10/* */
11/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
12
13#ifndef CHECK_ENDIANNESS_HH_
14#define CHECK_ENDIANNESS_HH_
15
16namespace Kaskade{
17
18 // endian types
19 enum class Endian {
20 Unknown,
21 Big,
22 Little,
23 BigWord, /* Middle-endian, Honeywell 316 style */
24 LittleWord /* Middle-endian, PDP-11 style */
25 };
26
29
31 bool bigEndian();
32
35}
36
37#endif
bool littleEndian()
Return true if byte order is little endian.
bool bigEndian()
Return true if byte order is big endian.
Endian endianness()
Return endianness.