Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
SysUtil.cpp File Reference
#include "SysUtil.hpp"
#include <fstream>
#include <algorithm>
#include <cassert>
#include "moab/EntityHandle.hpp"
+ Include dependency graph for SysUtil.cpp:

Go to the source code of this file.

Namespaces

 moab
 Class representing axis-aligned bounding box.
 
 moab::SysUtil
 

Functions

void moab::SysUtil::setmem (void *mem, const void *value, unsigned value_size, size_t num_elem)
 Similar to memset, but accepts values larger than 1 char. More...
 
long moab::SysUtil::filesize (FILE *filp)
 Get size of file (if it is a regular file) More...
 
long moab::SysUtil::filesize (std::ifstream &str)
 Get size of file (if it is a regular file) More...
 
void moab::SysUtil::byteswap (void *data, unsigned value_size, size_t num_elem)
 Swap byte order (e.g. change from big-endian to little-endian) More...
 
static uint16_t moab::SysUtil::swap_bytes (uint16_t value)
 
static uint32_t moab::SysUtil::swap_bytes (uint32_t value)
 
static uint64_t moab::SysUtil::swap_bytes (uint64_t value)
 
void moab::SysUtil::byteswap2 (void *data, size_t num_elem)
 Alternate byteswap optimized for 2-byte values. More...
 
void moab::SysUtil::byteswap4 (void *data, size_t num_elem)
 Alternate byteswap optimized for 4-byte values. More...
 
void moab::SysUtil::byteswap8 (void *data, size_t num_elem)
 Alternate byteswap optimized for 8-byte values. More...
 

Variables

const uint64_t moab::SysUtil::m64b1 = 0xFF
 
const uint64_t moab::SysUtil::m64b2 = m64b1 << 8
 
const uint64_t moab::SysUtil::m64b3 = m64b1 << 16
 
const uint64_t moab::SysUtil::m64b4 = m64b1 << 24
 
const uint64_t moab::SysUtil::m64b5 = m64b1 << 32
 
const uint64_t moab::SysUtil::m64b6 = m64b1 << 40
 
const uint64_t moab::SysUtil::m64b7 = m64b1 << 48