Go to the documentation of this file.
17 #ifndef __SPECKLEY_SYSTEM_DEP_H__
18 #define __SPECKLEY_SYSTEM_DEP_H__
20 #include <escript/DataTypes.h>
22 #define Speckley_DLL_API
25 # ifndef Speckley_STATIC_LIB
26 # undef Speckley_DLL_API
27 # ifdef Speckley_EXPORTS
28 # define Speckley_DLL_API __declspec(dllexport)
30 # define Speckley_DLL_API __declspec(dllimport)
38 #include <boost/detail/endian.hpp>
39 #ifdef ESYS_DEPRECATED_BOOST_ENDIAN
40 #include <boost/predef/other/endian.h>
46 #ifndef ESYS_DEPRECATED_BOOST_ENDIAN
48 #elif defined(ESYS_DEPRECATED_BOOST_ENDIAN) && defined(BOOST_ENDIAN_BIG_BYTE)
50 #elif defined(ESYS_DEPRECATED_BOOST_ENDIAN) && defined(BOOST_ENDIAN_LITTLE_BYTE)
52 #elif defined(ESYS_DEPRECATED_BOOST_ENDIAN) && defined(BOOST_ENDIAN_LITTLE_WORD)
72 unsigned long* v = reinterpret_cast<unsigned long*>(val);
73 *v = _byteswap_ulong(*v);
78 unsigned __int64* v = reinterpret_cast<unsigned __int64*>(val);
79 *v = _byteswap_uint64(*v);
89 # include <byteswap.h>
90 #elif HAVE_SYS_ENDIAN_H
91 # include <sys/endian.h>
93 # define bswap_32(D) bswap32((D))
96 # define bswap_64(D) bswap64((D))
98 #elif HAVE_OSBYTEORDER_H
99 # include <libkern/OSByteOrder.h>
100 # define bswap_32 OSSwapInt32
101 # define bswap_64 OSSwapInt64
102 #else // uh oh, we can't swap bytes...
103 # define bswap_32(D) (D)
104 # define bswap_64(D) (D)
105 #endif // header selection
110 unsigned int* v = reinterpret_cast<unsigned int*>(val);
117 uint64_t* v = reinterpret_cast<uint64_t*>(val);
126 #endif // __SPECKLEY_SYSTEM_DEP_H__
Definition: speckley/src/system_dep.h:59
Definition: speckley/src/system_dep.h:61
Definition: speckley/src/system_dep.h:46
#define bswap_64(D)
Definition: speckley/src/system_dep.h:103
Definition: AbstractAssembler.cpp:17
char * byte_swap64(char *val)
Definition: speckley/src/system_dep.h:114
Definition: speckley/src/system_dep.h:60
#define bswap_32(D)
Definition: speckley/src/system_dep.h:102
Definition: speckley/src/system_dep.h:54
Definition: speckley/src/system_dep.h:55
char * byte_swap32(char *val)
Definition: speckley/src/system_dep.h:107