10 #ifndef vtk_m_io_internal_Endian_h
11 #define vtk_m_io_internal_Endian_h
25 inline bool IsLittleEndian()
33 inline void FlipEndianness(std::vector<T>& buffer)
36 const std::size_t tsize =
sizeof(T);
37 const std::size_t bsize = buffer.size();
38 for (std::size_t i = 0; i < bsize; i++, bytes += tsize)
40 std::reverse(bytes, bytes + tsize);
44 template <
typename T, vtkm::IdComponent N>
48 const std::size_t tsize =
sizeof(T);
49 const std::size_t bsize = buffer.size();
50 for (std::size_t i = 0; i < bsize; i++)
54 std::reverse(bytes, bytes + tsize);
62 #endif //vtk_m_io_internal_Endian_h