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

Go to the source code of this file.

Classes

class  VM_Math
 

Macros

#define VM_SIV   static inline void
 
#define VM_SIMDFUNC(signature)   signature {}
 
#define VM_SIMDFUNCR(signature)   signature { return 0; }
 
#define VM_DECL_vFvFvF(name, expr)
 
#define VM_DECL_vFvFuF(name, expr)
 
#define VM_DECL_vFuFvF(name, expr)
 
#define VM_DECL_vFuFuF(name, expr)
 
#define VM_DECL_vFvF(name, expr)
 
#define VM_DECL_vFuF(name, expr)
 
#define VM_DECL_vIvF(name, expr)
 
#define VM_DECL_vIvF_nonconst(name, expr)
 
#define VM_DECL_vIvFvF(name, expr)
 
#define VM_DECL_vIvVFvF(name, expr)
 
#define VM_DECL_vIvFuF(name, expr)
 
#define VM_DECL_WP(type, name, expr)
 
#define VM_DECL_IWP(type, name, expr)
 
#define VM_DECL_vIvIvI(name, expr)
 
#define VM_DECL_vIvIuI(name, expr)
 
#define VM_DECL_uIvI(name, expr)
 
#define VM_DECL_CMP(name, op)
 

Macro Definition Documentation

#define VM_DECL_CMP (   name,
  op 
)
Value:
VM_DECL_vIvFvF(name, d[n] = a[n] op b[n]) \
VM_DECL_vIvFuF(name, d[n] = a[n] op b) \
VM_DECL_vIvFvF(fast##name, d[n] = a[n] op b[n]) \
VM_DECL_vIvFuF(fast##name, d[n] = a[n] op b) \
VM_DECL_vIvIvI(name, d[n] = a[n] op b[n]) \
VM_DECL_vIvIuI(name, d[n] = a[n] op b) \
VM_DECL_vIvIvI(fast##name, d[n] = a[n] op b[n]) \
VM_DECL_vIvIuI(fast##name, d[n] = a[n] op b)
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
#define VM_DECL_vIvIuI(name, expr)
Definition: VM_Math.h:159
GLdouble n
Definition: glcorearb.h:2007
#define VM_DECL_vIvFuF(name, expr)
Definition: VM_Math.h:126
GLuint const GLchar * name
Definition: glcorearb.h:785
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
#define VM_DECL_vIvFvF(name, expr)
Definition: VM_Math.h:109
#define VM_DECL_vIvIvI(name, expr)
Definition: VM_Math.h:152

Definition at line 182 of file VM_Math.h.

#define VM_DECL_IWP (   type,
  name,
  expr 
)
Value:
type e, exint num) { \
if (theSIMD) name##SIMD(d, a, b, e, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(fpreal32 *d, const type *a, fpreal32 b, type e, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158
float fpreal32
Definition: SYS_Types.h:190

Definition at line 144 of file VM_Math.h.

#define VM_DECL_uIvI (   name,
  expr 
)
Value:
static inline int32 name##SISD(const int32 *a, exint num) { \
int32 d = 0; \
for (exint n=0; n < num; n++) expr; \
return d; \
} \
VM_SIMDFUNCR(static int32 name##SIMD(const int32 *a, exint num)) \
static inline int32 name(const int32 *a, exint num) { \
return theSIMD ? name##SIMD(a, num) : \
name##SISD(a, num); \
} \
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
GLdouble n
Definition: glcorearb.h:2007
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
int int32
Definition: SYS_Types.h:34
#define VM_SIMDFUNCR(signature)
Definition: VM_Math.h:32
png_infop png_uint_32 int num
Definition: png.h:2158

Definition at line 166 of file VM_Math.h.

#define VM_DECL_vFuF (   name,
  expr 
)
Value:
if (theSIMD) name##SIMD(d, a, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(fpreal32 *d, fpreal32 a, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158
float fpreal32
Definition: SYS_Types.h:190

Definition at line 88 of file VM_Math.h.

#define VM_DECL_vFuFuF (   name,
  expr 
)
Value:
if (theSIMD) name##SIMD(d, a, b, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(fpreal32 *d, fpreal32 a, fpreal32 b, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158
float fpreal32
Definition: SYS_Types.h:190

Definition at line 70 of file VM_Math.h.

#define VM_DECL_vFuFvF (   name,
  expr 
)
Value:
const fpreal32 *b, exint num) { \
if (theSIMD) name##SIMD(d, a, b, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIV name(fpreal64 *d, fpreal64 a, const fpreal64 *b, exint num) { \
for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(fpreal32 *d, fpreal32 a, const fpreal32 *b, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158
float fpreal32
Definition: SYS_Types.h:190

Definition at line 59 of file VM_Math.h.

#define VM_DECL_vFvF (   name,
  expr 
)
Value:
if (theSIMD) name##SIMD(d, a, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIV name(fpreal64 *d, const fpreal64 *a, exint num) { \
for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(fpreal32 *d, const fpreal32 *a, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158
float fpreal32
Definition: SYS_Types.h:190

Definition at line 78 of file VM_Math.h.

#define VM_DECL_vFvFuF (   name,
  expr 
)
Value:
VM_SIV name(fpreal32 *d, const fpreal32 *a, \
if (theSIMD) name##SIMD(d, a, b, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIV name(fpreal64 *d, const fpreal64 *a, \
fpreal64 b, exint num) { \
for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(fpreal32 *d, const fpreal32 *a, fpreal32 b, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158
float fpreal32
Definition: SYS_Types.h:190

Definition at line 47 of file VM_Math.h.

#define VM_DECL_vFvFvF (   name,
  expr 
)
Value:
VM_SIV name(fpreal32 *d, const fpreal32 *a, \
const fpreal32 *b, exint num) { \
if (theSIMD) name##SIMD(d, a, b, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIV name(fpreal64 *d, const fpreal64 *a, \
const fpreal64 *b, exint num) { \
for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(fpreal32 *d, const fpreal32 *a, const fpreal32 *b, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158
float fpreal32
Definition: SYS_Types.h:190

Definition at line 35 of file VM_Math.h.

#define VM_DECL_vIvF (   name,
  expr 
)
Value:
VM_SIV name(int32 *d, const fpreal32 *a, exint num) { \
if (theSIMD) name##SIMD(d, a, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(int32 *d, const fpreal32 *a, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
int int32
Definition: SYS_Types.h:34
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158
float fpreal32
Definition: SYS_Types.h:190

Definition at line 95 of file VM_Math.h.

#define VM_DECL_vIvF_nonconst (   name,
  expr 
)
Value:
if (theSIMD) name##SIMD(d, a, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(int32 *d, fpreal32 *a, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
int int32
Definition: SYS_Types.h:34
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158
float fpreal32
Definition: SYS_Types.h:190

Definition at line 102 of file VM_Math.h.

#define VM_DECL_vIvFuF (   name,
  expr 
)
Value:
if (theSIMD) name##SIMD(d, a, b, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIV name(int32 *d, const fpreal64 *a, fpreal64 b, exint num) { \
for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(int32 *d, const fpreal32 *a, fpreal32 b, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
int int32
Definition: SYS_Types.h:34
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158
float fpreal32
Definition: SYS_Types.h:190

Definition at line 126 of file VM_Math.h.

#define VM_DECL_vIvFvF (   name,
  expr 
)
Value:
VM_SIV name(int32 *d, const fpreal32 *a, const fpreal32 *b, exint num) { \
if (theSIMD) name##SIMD(d, a, b, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIV name(int32 *d, const fpreal64 *a, const fpreal64 *b, exint num) { \
for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(int32 *d, const fpreal32 *a, const fpreal32 *b, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
int int32
Definition: SYS_Types.h:34
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158
float fpreal32
Definition: SYS_Types.h:190

Definition at line 109 of file VM_Math.h.

#define VM_DECL_vIvIuI (   name,
  expr 
)
Value:
VM_SIV name(int32 *d, const int32 *a, int32 b, exint num) { \
if (theSIMD) name##SIMD(d, a, b, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(int32 *d, const int32 *a, int32 b, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
int int32
Definition: SYS_Types.h:34
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158

Definition at line 159 of file VM_Math.h.

#define VM_DECL_vIvIvI (   name,
  expr 
)
Value:
VM_SIV name(int32 *d, const int32 *a, const int32 *b, exint num) { \
if (theSIMD) name##SIMD(d, a, b, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(int32 *d, const int32 *a, const int32 *b, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
int int32
Definition: SYS_Types.h:34
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158

Definition at line 152 of file VM_Math.h.

#define VM_DECL_vIvVFvF (   name,
  expr 
)
Value:
if (theSIMD) name##SIMD(d, a, b, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(int32 *d, fpreal32 *a, const fpreal32 *b, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
int int32
Definition: SYS_Types.h:34
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158
float fpreal32
Definition: SYS_Types.h:190

Definition at line 119 of file VM_Math.h.

#define VM_DECL_WP (   type,
  name,
  expr 
)
Value:
if (theSIMD) name##SIMD(d, a, b, c, e, num); \
else for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(type *d, const fpreal32 *a, fpreal32 b, fpreal32 c, fpreal32 e, exint num))
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
int64 exint
Definition: SYS_Types.h:115
GLuint const GLchar * name
Definition: glcorearb.h:785
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
#define VM_SIV
Definition: VM_Math.h:22
png_infop png_uint_32 int num
Definition: png.h:2158
float fpreal32
Definition: SYS_Types.h:190

Definition at line 136 of file VM_Math.h.

#define VM_SIMDFUNC (   signature)    signature {}

Definition at line 31 of file VM_Math.h.

#define VM_SIMDFUNCR (   signature)    signature { return 0; }

Definition at line 32 of file VM_Math.h.

#define VM_SIV   static inline void

Definition at line 22 of file VM_Math.h.