HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_Endian.h File Reference
#include "UT_API.h"
#include <string.h>
#include <SYS/SYS_Types.h>
+ Include dependency graph for UT_Endian.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define UTswap_int16(x, z)   { x = (((z & 0xff) << 8) | ((z >> 8) & 0xff)); }
 
#define UTswap_int32(x, z)
 
#define UTswap_int64(x, z)
 
#define UTswap_int16_inplace(z)   UTswap_int16(z,z)
 
#define UTswap_int32_inplace(z)   UTswap_int32(z,z)
 
#define UTswap_int64_inplace(z)   UTswap_int64(z,z)
 
#define BYTE_ORDER_MATCHING_TAG16   0x3210
 
#define BYTE_ORDER_OPPOSITE_TAG16   0x1032
 
#define BYTE_ORDER_MATCHING_TAG32   0x76543210
 
#define BYTE_ORDER_OPPOSITE_TAG32   0x10325476
 
#define BYTE_ORDER_MATCHING_TAG64   0xFEDCBA9876543210ULL
 
#define BYTE_ORDER_OPPOSITE_TAG64   0x1032547698BADCFEULL
 
#define CAST_SAME_TYPE(TYPE)
 
#define CAST_DIFFERENT_TYPE(DTYPE, STYPE)
 

Functions

UT_API void UTswapBytes (int16 *values, int64 num)
 
UT_API void UTswapBytes (int32 *values, int64 num)
 
UT_API void UTswapBytes (int64 *values, int64 num)
 
UT_API void UTswapBytes (fpreal16 *values, int64 num)
 
UT_API void UTswapBytes (fpreal32 *values, int64 num)
 
UT_API void UTswapBytes (fpreal64 *values, int64 num)
 
UT_API void UTswapBytes (int16 *dest, const int16 *src, int64 num)
 
UT_API void UTswapBytes (int32 *dest, const int32 *src, int64 num)
 
UT_API void UTswapBytes (int64 *dest, const int64 *src, int64 num)
 
UT_API void UTswapBytes (fpreal16 *dest, const fpreal16 *src, int64 num)
 
UT_API void UTswapBytes (fpreal32 *dest, const fpreal32 *src, int64 num)
 
UT_API void UTswapBytes (fpreal64 *dest, const fpreal64 *src, int64 num)
 
UT_API void UTswapBytes (fpreal32 *dest, const fpreal64 *src, int64 num)
 
UT_API void UTswapBytes (fpreal64 *dest, const fpreal32 *src, int64 num)
 
void UTtovax (int16 *values, int64 num)
 
void UTtovax (int32 *values, int64 num)
 
void UTtovax (int64 *values, int64 num)
 
void UTtovax (fpreal16 *values, int64 n)
 
void UTtovax (fpreal32 *values, int64 n)
 
void UTtovax (fpreal64 *values, int64 n)
 
void UTtovax (int16 &z) UTswap_int16(z
 
void z void UTtovax (uint16 &z) UTswap_int16(z
 
void z void z void UTtovax (int32 &z) UTswap_int32(z
 
void z void z void z void UTtovax (uint32 &z) UTswap_int32(z
 
void z void z void z void z void UTtovax (int64 &z)
 
void UTtovax (uint64 &z)
 
void UTtovax (fpreal16 &z)
 
void UTtovax (fpreal32 &z)
 
void UTtovax (fpreal64 &z)
 
void UTtomips (int16 *, int64)
 
void UTtomips (int32 *, int64)
 
void UTtomips (int64 *, int64)
 
void UTtomips (fpreal32 *, int64)
 
void UTtomips (fpreal64 *, int64)
 
void UTtomips (int16 &)
 
void UTtomips (uint16 &)
 
void UTtomips (int32 &)
 
void UTtomips (uint32 &)
 
void UTtomips (int64 &)
 
void UTtomips (uint64 &)
 
void UTtomips (fpreal32 &)
 
void UTtomips (fpreal64 &)
 

Macro Definition Documentation

#define BYTE_ORDER_MATCHING_TAG16   0x3210

Definition at line 76 of file UT_Endian.h.

#define BYTE_ORDER_MATCHING_TAG32   0x76543210

Definition at line 78 of file UT_Endian.h.

#define BYTE_ORDER_MATCHING_TAG64   0xFEDCBA9876543210ULL

Definition at line 80 of file UT_Endian.h.

#define BYTE_ORDER_OPPOSITE_TAG16   0x1032

Definition at line 77 of file UT_Endian.h.

#define BYTE_ORDER_OPPOSITE_TAG32   0x10325476

Definition at line 79 of file UT_Endian.h.

#define BYTE_ORDER_OPPOSITE_TAG64   0x1032547698BADCFEULL

Definition at line 81 of file UT_Endian.h.

#define CAST_DIFFERENT_TYPE (   DTYPE,
  STYPE 
)
Value:
UT_API void UTcast(DTYPE *dest, const STYPE *src, uint64 size); \
static inline void UTcastFast(DTYPE *dest, const STYPE *src, uint64 size) \
{ \
for (uint64 i = 0; i < size; i++) \
dest[i]=(DTYPE)src[i]; \
} \
#define UT_API
Definition: UT_API.h:14
unsigned long long uint64
Definition: SYS_Types.h:117
GLsizeiptr size
Definition: glcorearb.h:664
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685
GLenum src
Definition: glcorearb.h:1793

Definition at line 170 of file UT_Endian.h.

#define CAST_SAME_TYPE (   TYPE)
Value:
inline static void UTcast(TYPE *dest, const TYPE *src, uint64 size) \
{ memmove(dest, src, size*sizeof(TYPE)); } \
static inline void UTcastFast(TYPE *dest, const TYPE *src, uint64 size) \
{ memcpy(dest, src, size*sizeof(TYPE)); } \
unsigned long long uint64
Definition: SYS_Types.h:117
GLsizeiptr size
Definition: glcorearb.h:664
GLenum src
Definition: glcorearb.h:1793

Definition at line 163 of file UT_Endian.h.

#define UTswap_int16 (   x,
  z 
)    { x = (((z & 0xff) << 8) | ((z >> 8) & 0xff)); }

Definition at line 43 of file UT_Endian.h.

#define UTswap_int16_inplace (   z)    UTswap_int16(z,z)

Definition at line 54 of file UT_Endian.h.

#define UTswap_int32 (   x,
  z 
)
Value:
{ x = ((z & 0xff) << 24) | ((z & 0xff00) << 8) \
| ((z >> 8) & 0xff00) | ((z >> 24) & 0xff); }
GLdouble GLdouble GLdouble z
Definition: glcorearb.h:848
GLint GLenum GLint x
Definition: glcorearb.h:409

Definition at line 44 of file UT_Endian.h.

#define UTswap_int32_inplace (   z)    UTswap_int32(z,z)

Definition at line 55 of file UT_Endian.h.

#define UTswap_int64 (   x,
  z 
)
Value:
{ x = (((((z ) & 0xff) << 56) | \
(((z >> 8) & 0xff) << 48) | \
(((z >> 16) & 0xff) << 40) | \
(((z >> 24) & 0xff) << 32) | \
(((z >> 32) & 0xff) << 24) | \
(((z >> 40) & 0xff) << 16) | \
(((z >> 48) & 0xff) << 8) | \
(((z >> 56) & 0xff) ))); }
GLdouble GLdouble GLdouble z
Definition: glcorearb.h:848
GLint GLenum GLint x
Definition: glcorearb.h:409

Definition at line 46 of file UT_Endian.h.

#define UTswap_int64_inplace (   z)    UTswap_int64(z,z)

Definition at line 56 of file UT_Endian.h.

Function Documentation

UT_API void UTswapBytes ( int16 values,
int64  num 
)
Examples:
IMG/IMG_Sample.C.
UT_API void UTswapBytes ( int32 values,
int64  num 
)
UT_API void UTswapBytes ( int64 values,
int64  num 
)
UT_API void UTswapBytes ( fpreal16 values,
int64  num 
)
UT_API void UTswapBytes ( fpreal32 values,
int64  num 
)
UT_API void UTswapBytes ( fpreal64 values,
int64  num 
)
UT_API void UTswapBytes ( int16 dest,
const int16 src,
int64  num 
)
UT_API void UTswapBytes ( int32 dest,
const int32 src,
int64  num 
)
UT_API void UTswapBytes ( int64 dest,
const int64 src,
int64  num 
)
UT_API void UTswapBytes ( fpreal16 dest,
const fpreal16 src,
int64  num 
)
UT_API void UTswapBytes ( fpreal32 dest,
const fpreal32 src,
int64  num 
)
UT_API void UTswapBytes ( fpreal64 dest,
const fpreal64 src,
int64  num 
)
UT_API void UTswapBytes ( fpreal32 dest,
const fpreal64 src,
int64  num 
)
UT_API void UTswapBytes ( fpreal64 dest,
const fpreal32 src,
int64  num 
)
void UTtomips ( int16 ,
int64   
)
inline

Definition at line 145 of file UT_Endian.h.

void UTtomips ( int32 ,
int64   
)
inline

Definition at line 146 of file UT_Endian.h.

void UTtomips ( int64 ,
int64   
)
inline

Definition at line 147 of file UT_Endian.h.

void UTtomips ( fpreal32 ,
int64   
)
inline

Definition at line 148 of file UT_Endian.h.

void UTtomips ( fpreal64 ,
int64   
)
inline

Definition at line 149 of file UT_Endian.h.

void UTtomips ( int16 )
inline

Definition at line 151 of file UT_Endian.h.

void UTtomips ( uint16 )
inline

Definition at line 152 of file UT_Endian.h.

void UTtomips ( int32 )
inline

Definition at line 153 of file UT_Endian.h.

void UTtomips ( uint32 )
inline

Definition at line 154 of file UT_Endian.h.

void UTtomips ( int64 )
inline

Definition at line 155 of file UT_Endian.h.

void UTtomips ( uint64 )
inline

Definition at line 156 of file UT_Endian.h.

void UTtomips ( fpreal32 )
inline

Definition at line 157 of file UT_Endian.h.

void UTtomips ( fpreal64 )
inline

Definition at line 158 of file UT_Endian.h.

void UTtovax ( int16 values,
int64  num 
)
inline

Definition at line 128 of file UT_Endian.h.

void UTtovax ( int32 values,
int64  num 
)
inline

Definition at line 129 of file UT_Endian.h.

void UTtovax ( int64 values,
int64  num 
)
inline

Definition at line 130 of file UT_Endian.h.

void UTtovax ( fpreal16 values,
int64  n 
)
inline

Definition at line 131 of file UT_Endian.h.

void UTtovax ( fpreal32 values,
int64  n 
)
inline

Definition at line 132 of file UT_Endian.h.

void UTtovax ( fpreal64 values,
int64  n 
)
inline

Definition at line 133 of file UT_Endian.h.

void UTtovax ( int16 z)
inline
void z void UTtovax ( uint16 z)
inline
void z void z void UTtovax ( int32 z)
inline
void z void z void z void UTtovax ( uint32 z)
inline
void z void z void z void z void UTtovax ( int64 z)
inline

Definition at line 139 of file UT_Endian.h.

void UTtovax ( uint64 z)
inline

Definition at line 140 of file UT_Endian.h.

void UTtovax ( fpreal16 z)
inline

Definition at line 141 of file UT_Endian.h.

void UTtovax ( fpreal32 z)
inline

Definition at line 142 of file UT_Endian.h.

void UTtovax ( fpreal64 z)
inline

Definition at line 143 of file UT_Endian.h.