Go to the documentation of this file.
18 #ifndef __RIPLEY_SYSTEM_DEP_H__
19 #define __RIPLEY_SYSTEM_DEP_H__
21 #define RIPLEY_DLL_API
24 # ifndef RIPLEY_STATIC_LIB
25 # undef RIPLEY_DLL_API
26 # ifdef RIPLEY_EXPORTS
27 # define RIPLEY_DLL_API __declspec(dllexport)
29 # define RIPLEY_DLL_API __declspec(dllimport)
34 #include <escript/DataTypes.h>
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 // __RIPLEY_SYSTEM_DEP_H__
Definition: ripley/src/AbstractAssembler.h:25
char * byte_swap64(char *val)
Definition: ripley/src/system_dep.h:114
Definition: ripley/src/system_dep.h:61
Definition: ripley/src/system_dep.h:59
Definition: ripley/src/system_dep.h:46
char * byte_swap32(char *val)
Definition: ripley/src/system_dep.h:107
Definition: ripley/src/system_dep.h:54
Definition: ripley/src/system_dep.h:60
#define bswap_64(D)
Definition: ripley/src/system_dep.h:103
Definition: ripley/src/system_dep.h:55
#define bswap_32(D)
Definition: ripley/src/system_dep.h:102