HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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:1222
#define VM_DECL_vIvIuI(name, expr)
Definition: VM_Math.h:162
GLdouble n
Definition: glcorearb.h:2008
#define VM_DECL_vIvFuF(name, expr)
Definition: VM_Math.h:129
GLuint const GLchar * name
Definition: glcorearb.h:786
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
#define VM_DECL_vIvFvF(name, expr)
Definition: VM_Math.h:112
#define VM_DECL_vIvIvI(name, expr)
Definition: VM_Math.h:155

Definition at line 185 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))
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
float fpreal32
Definition: SYS_Types.h:200
GLuint const GLchar * name
Definition: glcorearb.h:786
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21
type
Definition: core.h:1059

Definition at line 147 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); \
} \
int int32
Definition: SYS_Types.h:39
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
GLdouble n
Definition: glcorearb.h:2008
GLuint const GLchar * name
Definition: glcorearb.h:786
#define VM_SIMDFUNCR(signature)
Definition: VM_Math.h:31
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685

Definition at line 169 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))
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
float fpreal32
Definition: SYS_Types.h:200
GLuint const GLchar * name
Definition: glcorearb.h:786
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21

Definition at line 91 of file VM_Math.h.

#define VM_DECL_vFuFuF (   name,
  expr 
)
Value:
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, \
fpreal64 b, exint num) { \
for (exint n=0; n<num; n++) expr; \
} \
VM_SIMDFUNC(static void name##SIMD(fpreal32 *d, fpreal32 a, fpreal32 b, exint num))
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
float fpreal32
Definition: SYS_Types.h:200
GLuint const GLchar * name
Definition: glcorearb.h:786
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21

Definition at line 69 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))
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
float fpreal32
Definition: SYS_Types.h:200
GLuint const GLchar * name
Definition: glcorearb.h:786
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21

Definition at line 58 of file VM_Math.h.

#define VM_DECL_vFvF (   name,
  expr 
)
Value:
VM_SIV name(fpreal32 *d, const fpreal32 *a, exint num) { \
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))
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
float fpreal32
Definition: SYS_Types.h:200
GLuint const GLchar * name
Definition: glcorearb.h:786
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21

Definition at line 81 of file VM_Math.h.

#define VM_DECL_vFvFuF (   name,
  expr 
)
Value:
VM_SIV name(fpreal32 *d, const fpreal32 *a, \
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, \
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))
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
float fpreal32
Definition: SYS_Types.h:200
GLuint const GLchar * name
Definition: glcorearb.h:786
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21

Definition at line 46 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))
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
float fpreal32
Definition: SYS_Types.h:200
GLuint const GLchar * name
Definition: glcorearb.h:786
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21

Definition at line 34 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))
int int32
Definition: SYS_Types.h:39
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
float fpreal32
Definition: SYS_Types.h:200
GLuint const GLchar * name
Definition: glcorearb.h:786
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21

Definition at line 98 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))
int int32
Definition: SYS_Types.h:39
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
float fpreal32
Definition: SYS_Types.h:200
GLuint const GLchar * name
Definition: glcorearb.h:786
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21

Definition at line 105 of file VM_Math.h.

#define VM_DECL_vIvFuF (   name,
  expr 
)
Value:
VM_SIV name(int32 *d, const fpreal32 *a, 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, 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))
int int32
Definition: SYS_Types.h:39
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
float fpreal32
Definition: SYS_Types.h:200
GLuint const GLchar * name
Definition: glcorearb.h:786
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21

Definition at line 129 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))
int int32
Definition: SYS_Types.h:39
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
float fpreal32
Definition: SYS_Types.h:200
GLuint const GLchar * name
Definition: glcorearb.h:786
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21

Definition at line 112 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))
int int32
Definition: SYS_Types.h:39
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
GLuint const GLchar * name
Definition: glcorearb.h:786
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21

Definition at line 162 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))
int int32
Definition: SYS_Types.h:39
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
GLuint const GLchar * name
Definition: glcorearb.h:786
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21

Definition at line 155 of file VM_Math.h.

#define VM_DECL_vIvVFvF (   name,
  expr 
)
Value:
VM_SIV name(int32 *d, 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_SIMDFUNC(static void name##SIMD(int32 *d, fpreal32 *a, const fpreal32 *b, exint num))
int int32
Definition: SYS_Types.h:39
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
float fpreal32
Definition: SYS_Types.h:200
GLuint const GLchar * name
Definition: glcorearb.h:786
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21

Definition at line 122 of file VM_Math.h.

#define VM_DECL_WP (   type,
  name,
  expr 
)
Value:
fpreal32 c, fpreal32 e, exint num) { \
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))
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
float fpreal32
Definition: SYS_Types.h:200
GLuint const GLchar * name
Definition: glcorearb.h:786
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697
#define VM_SIV
Definition: VM_Math.h:21
type
Definition: core.h:1059

Definition at line 139 of file VM_Math.h.

#define VM_SIMDFUNC (   signature)    signature {}

Definition at line 30 of file VM_Math.h.

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

Definition at line 31 of file VM_Math.h.

#define VM_SIV   static inline void

Definition at line 21 of file VM_Math.h.