HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VM_Math Class Reference

#include <VM_Math.h>

Public Member Functions

 VM_DECL_vIvIvI (bor, d[n]=a[n]|b[n]) VM_DECL_vIvIuI(bor
 Bitwise operations. More...
 
 VM_DECL_WP (uint8, wpoint,::wpoint< uint8 >(d[n], a[n], b, c, e+0.5F))
 
 VM_DECL_WP (uint16, wpoint,::wpoint< uint16 >(d[n], a[n], b, c, e+0.5F))
 
 VM_DECL_IWP (fpreal32, iwpoint,::iwpoint< fpreal32 >(d[n], a[n], 1.0F/b, e))
 VM_Math::iwpoint(d,a,b,e) := d[i] = (fpreal32)(a[i]-e)/b;. More...
 
 VM_DECL_IWP (uint8, iwpoint,::iwpoint< uint8 >(d[n], a[n], 1.0F/b, e))
 
 VM_DECL_IWP (uint16, iwpoint,::iwpoint< uint16 >(d[n], a[n], 1.0F/b, e))
 
 VM_DECL_vFuF (set, d[n]=a) VM_SIV set(int32 *d
 VM_Math::set(d, a) := d[i] = a. More...
 
int exint num for (exint n=0;n< num;n++) d[n]
 
VM_SIV set (fpreal32 *d, const fpreal32 *a, exint num, const uint32 *disabled)
 VM_Math::set(d, a, disabled) := d[i] = disabled[i] ? d[i] : a[i]. More...
 
VM_SIV set (int32 *d, const int32 *a, exint num, const uint32 *disabled)
 
VM_SIV set (fpreal32 *d, fpreal32 a, exint num, const uint32 *disabled)
 
VM_SIV set (int32 *d, int32 a, exint num, const uint32 *disabled)
 
 VM_SIMDFUNC (static void setSIMD(int32 *d, int32 a, exint num, const uint32 *disabled)) VM_SIV swap(fpreal32 *a
 
else swapSISD (a, b, num)
 
VM_SIV swap (fpreal64 *a, fpreal64 *b, exint num)
 
template<typename T >
VM_SIV swapSISD (T *a, T *b, exint num)
 
VM_SIV lerp (fpreal32 *d, const fpreal32 *a, const fpreal32 *b, const fpreal32 *t, exint num)
 VM_Math::lerp(d, a, b, t) := d[i] = a[i] + (b[i]-a[i])*t[i]. More...
 
VM_SIV lerp (fpreal32 *d, const fpreal32 *a, const fpreal32 *b, fpreal32 t, exint num)
 

Static Public Member Functions

static bool isSIMD ()
 
static void mulRowVec44 (fpreal32 *v4, const fpreal32 m1[4][4], exint nv, const uint32 *enable_flags=0)
 
static void mulRowVec34 (fpreal32 *v3, const fpreal32 m1[4][4], exint nv, const uint32 *enable_flags=0)
 
static void mulColVec44 (fpreal32 *v4, const fpreal32 m1[4][4], exint nv, const uint32 *enable_flags=0)
 
static void mulColVec34 (fpreal32 *v3, const fpreal32 m1[4][4], exint nv, const uint32 *enable_flags=0)
 
static void mulRowVec44_3 (fpreal32 *v4, const fpreal32 m1[4][4], exint nv, const uint32 *enable_flags=0)
 Multiplication, but treating the matrix as a 3x3 (i.e. no translate) More...
 
static void mulRowVec34_3 (fpreal32 *v3, const fpreal32 m1[4][4], exint nv, const uint32 *enable_flags=0)
 
static void mulColVec44_3 (fpreal32 *v4, const fpreal32 m1[4][4], exint nv, const uint32 *enable_flags=0)
 
static void mulColVec34_3 (fpreal32 *v3, const fpreal32 m1[4][4], exint nv, const uint32 *enable_flags=0)
 
static void vadd4u4 (fpreal32 *v4, const fpreal32 a[4], exint nv, const uint32 *enable_flags=0)
 
static void vsub4u4 (fpreal32 *v4, const fpreal32 a[4], exint nv, const uint32 *enable_flags=0)
 
static void vmul4u4 (fpreal32 *v4, const fpreal32 a[4], exint nv, const uint32 *enable_flags=0)
 
static void forceSIMD (bool onoff)
 

Public Attributes

 d [n]
 
int a
 
fpreal32b
 
fpreal32 exint num
 

Detailed Description

Definition at line 209 of file VM_Math.h.

Member Function Documentation

int exint num VM_Math::for ( )
static void VM_Math::forceSIMD ( bool  onoff)
inlinestatic

Definition at line 530 of file VM_Math.h.

static bool VM_Math::isSIMD ( )
inlinestatic

Definition at line 211 of file VM_Math.h.

VM_SIV VM_Math::lerp ( fpreal32 d,
const fpreal32 a,
const fpreal32 b,
const fpreal32 t,
exint  num 
)
inline

VM_Math::lerp(d, a, b, t) := d[i] = a[i] + (b[i]-a[i])*t[i].

Definition at line 465 of file VM_Math.h.

VM_SIV VM_Math::lerp ( fpreal32 d,
const fpreal32 a,
const fpreal32 b,
fpreal32  t,
exint  num 
)
inline

Definition at line 479 of file VM_Math.h.

static void VM_Math::mulColVec34 ( fpreal32 v3,
const fpreal32  m1[4][4],
exint  nv,
const uint32 enable_flags = 0 
)
static
static void VM_Math::mulColVec34_3 ( fpreal32 v3,
const fpreal32  m1[4][4],
exint  nv,
const uint32 enable_flags = 0 
)
static
static void VM_Math::mulColVec44 ( fpreal32 v4,
const fpreal32  m1[4][4],
exint  nv,
const uint32 enable_flags = 0 
)
static
static void VM_Math::mulColVec44_3 ( fpreal32 v4,
const fpreal32  m1[4][4],
exint  nv,
const uint32 enable_flags = 0 
)
static
static void VM_Math::mulRowVec34 ( fpreal32 v3,
const fpreal32  m1[4][4],
exint  nv,
const uint32 enable_flags = 0 
)
static
static void VM_Math::mulRowVec34_3 ( fpreal32 v3,
const fpreal32  m1[4][4],
exint  nv,
const uint32 enable_flags = 0 
)
static
static void VM_Math::mulRowVec44 ( fpreal32 v4,
const fpreal32  m1[4][4],
exint  nv,
const uint32 enable_flags = 0 
)
static

Vector Functions. The following methods assume that the values coming in are "vectors". The mnemonics are: 3 - Vector3 or Matrix3 4 - Vector4 or Matrix4 The enable_flags are an array corresponding 1-1 to the vectors to be processed. Unlike typical flags, the vector will be processed if the flag is set to 0. This is to match the VEX style calling. If the VEX processor mask flag changes, the mask type here should change too.

static void VM_Math::mulRowVec44_3 ( fpreal32 v4,
const fpreal32  m1[4][4],
exint  nv,
const uint32 enable_flags = 0 
)
static

Multiplication, but treating the matrix as a 3x3 (i.e. no translate)

VM_SIV VM_Math::set ( fpreal32 d,
const fpreal32 a,
exint  num,
const uint32 disabled 
)
inline

VM_Math::set(d, a, disabled) := d[i] = disabled[i] ? d[i] : a[i].

Definition at line 403 of file VM_Math.h.

VM_SIV VM_Math::set ( int32 d,
const int32 a,
exint  num,
const uint32 disabled 
)
inline

Definition at line 406 of file VM_Math.h.

VM_SIV VM_Math::set ( fpreal32 d,
fpreal32  a,
exint  num,
const uint32 disabled 
)
inline

Definition at line 419 of file VM_Math.h.

VM_SIV VM_Math::set ( int32 d,
int32  a,
exint  num,
const uint32 disabled 
)
inline

Definition at line 426 of file VM_Math.h.

VM_SIV VM_Math::swap ( fpreal64 a,
fpreal64 b,
exint  num 
)
inline

Definition at line 447 of file VM_Math.h.

else VM_Math::swapSISD ( a  ,
b  ,
num   
)
template<typename T >
VM_SIV VM_Math::swapSISD ( T a,
T b,
exint  num 
)
inline

Definition at line 452 of file VM_Math.h.

static void VM_Math::vadd4u4 ( fpreal32 v4,
const fpreal32  a[4],
exint  nv,
const uint32 enable_flags = 0 
)
static
VM_Math::VM_DECL_IWP ( fpreal32  ,
iwpoint  ,
::iwpoint< fpreal32 d[n], a[n], 1.0F/b, e 
)

VM_Math::iwpoint(d,a,b,e) := d[i] = (fpreal32)(a[i]-e)/b;.

VM_Math::VM_DECL_IWP ( uint8  ,
iwpoint  ,
::iwpoint< uint8 d[n], a[n], 1.0F/b, e 
)
VM_Math::VM_DECL_IWP ( uint16  ,
iwpoint  ,
::iwpoint< uint16 d[n], a[n], 1.0F/b, e 
)
VM_Math::VM_DECL_vFuF ( set  ,
d  [n] = a 
)

VM_Math::set(d, a) := d[i] = a.

VM_Math::VM_DECL_vIvIvI ( bor  ,
d  [n] = a[n] | b[n] 
)

Bitwise operations.

The fast operations assume that any non-zero return value is interpreted as true. Standard operations always set the result to either 0 or 1.

VM_Math::lt(d, a, b) := d[i] = a[i] < b[i] VM_Math::lt(d, a, b) := d[i] = a[i] < b VM_Math::fastlt(d, a, b) := d[i] = a[i] < b[i] VM_Math::fastlt(d, a, b) := d[i] = a[i] < b

VM_Math::VM_DECL_WP ( uint8  ,
wpoint  ,
::wpoint< uint8 d[n], a[n], b, c, e+0.5F 
)
VM_Math::VM_DECL_WP ( uint16  ,
wpoint  ,
::wpoint< uint16 d[n], a[n], b, c, e+0.5F 
)
VM_Math::VM_SIMDFUNC ( static void   setSIMDint32 *d, int32 a, exint num,const uint32 *disabled)
static void VM_Math::vmul4u4 ( fpreal32 v4,
const fpreal32  a[4],
exint  nv,
const uint32 enable_flags = 0 
)
static
static void VM_Math::vsub4u4 ( fpreal32 v4,
const fpreal32  a[4],
exint  nv,
const uint32 enable_flags = 0 
)
static

Member Data Documentation

int VM_Math::a

Definition at line 399 of file VM_Math.h.

fpreal32* VM_Math::b

Definition at line 442 of file VM_Math.h.

VM_Math::d[n]

Definition at line 230 of file VM_Math.h.

fpreal32 exint VM_Math::num
Initial value:
{
if (theSIMD) swapSIMD(a, b, num)

Definition at line 443 of file VM_Math.h.


The documentation for this class was generated from the following file: