Go to the documentation of this file.
17 #ifndef __RIPLEY_SYSTEM_DEP_H__
18 #define __RIPLEY_SYSTEM_DEP_H__
20 #define RIPLEY_DLL_API
23 # ifndef RIPLEY_STATIC_LIB
24 # undef RIPLEY_DLL_API
25 # ifdef RIPLEY_EXPORTS
26 # define RIPLEY_DLL_API __declspec(dllexport)
28 # define RIPLEY_DLL_API __declspec(dllimport)
33 #include <escript/DataTypes.h>
37 #include <boost/detail/endian.hpp>
38 #ifdef ESYS_DEPRECATED_BOOST_ENDIAN
39 #include <boost/predef/other/endian.h>
45 #ifndef ESYS_DEPRECATED_BOOST_ENDIAN
47 #elif defined(ESYS_DEPRECATED_BOOST_ENDIAN) && defined(BOOST_ENDIAN_BIG_BYTE)
49 #elif defined(ESYS_DEPRECATED_BOOST_ENDIAN) && defined(BOOST_ENDIAN_LITTLE_BYTE)
51 #elif defined(ESYS_DEPRECATED_BOOST_ENDIAN) && defined(BOOST_ENDIAN_LITTLE_WORD)
71 unsigned long* v = reinterpret_cast<unsigned long*>(val);
72 *v = _byteswap_ulong(*v);
77 unsigned __int64* v = reinterpret_cast<unsigned __int64*>(val);
78 *v = _byteswap_uint64(*v);
88 # include <byteswap.h>
89 #elif HAVE_SYS_ENDIAN_H
90 # include <sys/endian.h>
92 # define bswap_32(D) bswap32((D))
95 # define bswap_64(D) bswap64((D))
97 #elif HAVE_OSBYTEORDER_H
98 # include <libkern/OSByteOrder.h>
99 # define bswap_32 OSSwapInt32
100 # define bswap_64 OSSwapInt64
101 #else // uh oh, we can't swap bytes...
102 # define bswap_32(D) (D)
103 # define bswap_64(D) (D)
104 #endif // header selection
109 unsigned int* v = reinterpret_cast<unsigned int*>(val);
116 uint64_t* v = reinterpret_cast<uint64_t*>(val);
125 #endif // __RIPLEY_SYSTEM_DEP_H__
Definition: ripley/src/AbstractAssembler.h:24
char * byte_swap64(char *val)
Definition: ripley/src/system_dep.h:113
Definition: ripley/src/system_dep.h:60
Definition: ripley/src/system_dep.h:58
Definition: ripley/src/system_dep.h:45
char * byte_swap32(char *val)
Definition: ripley/src/system_dep.h:106
Definition: ripley/src/system_dep.h:53
Definition: ripley/src/system_dep.h:59
#define bswap_64(D)
Definition: ripley/src/system_dep.h:102
Definition: ripley/src/system_dep.h:54
#define bswap_32(D)
Definition: ripley/src/system_dep.h:101