MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / ReorderInteger

Function ReorderInteger

src/Misc/numpy.hpp:81–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79namespace detail {
80
81inline uint16_t ReorderInteger(const uint16_t& x) {
82#ifdef AOBA_NUMPY_BIG_ENDIAN
83 uint16_t y;
84 const char* rx = reinterpret_cast<const char*>(&x);
85 char* ry = reinterpret_cast<char*>(&y);
86 *ry = *(rx + 1);
87 *(ry + 1) = *rx;
88 return y;
89#else
90 return x;
91#endif
92}
93
94template<typename Scalar>
95struct DescriptorDataType {};

Callers 2

CreateMetaDataFunction · 0.85
LoadArrayFromNumpyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected