Rosetta
Classes | Typedefs | Functions
gpu_mat_vec.hh File Reference
#include <numeric/IOTraits.hh>
#include <iosfwd>

Classes

struct  VEC
 
struct  MAT
 
struct  XFORM
 

Typedefs

typedef cl_float16 float16
 
typedef cl_float8 float8
 
typedef cl_float4 float4
 
typedef cl_float3 float3
 
typedef cl_float2 float2
 
typedef cl_ushort2 ushort2
 
typedef cl_uint8 uint8
 

Functions

float native_sin (float x)
 
float native_cos (float x)
 
float native_divide (float a, float b)
 
float native_sqrt (float a)
 
float mad (float a, float b, float c)
 
float sqr (float const &x)
 
struct VEC vec (float x, float y, float z)
 
struct MAT rows (float xx, float xy, float xz, float yx, float yy, float yz, float zx, float zy, float zz)
 
struct MAT cols (float xx, float yx, float zx, float xy, float yy, float zy, float xz, float yz, float zz)
 
struct MAT rows (struct VEC const rx, struct VEC const ry, struct VEC const rz)
 
struct MAT cols (struct VEC const cx, struct VEC const cy, struct VEC const cz)
 
struct XFORM xform (struct MAT const R, struct VEC const t)
 
struct MAT multmm (struct MAT const a, struct MAT const b)
 
struct VEC multmv (struct MAT const a, struct VEC const b)
 
struct VEC multfv (float const a, struct VEC const v)
 
struct MAT multfm (float const a, struct MAT const m)
 
struct VEC crossvv (struct VEC const a, struct VEC const b)
 
struct VEC addvv (struct VEC const a, struct VEC const b)
 
struct VEC subvv (struct VEC const a, struct VEC const b)
 
float dotvv (struct VEC const a, struct VEC const b)
 
float length2v (struct VEC v)
 
float length2f (float const x, float const y, float const z)
 
float lengthv (struct VEC v)
 
float lengthf (float const x, float const y, float const z)
 
struct VEC normalizedv (struct VEC v)
 
struct VEC normalizedf (float const x, float const y, float const z)
 
struct VEC proj (struct VEC const a, struct VEC const v)
 
struct VEC pproj (struct VEC const a, struct VEC const v)
 
void rotx (struct VEC *v, float const sin, float const cos)
 
void roty (struct VEC *v, float const sin, float const cos)
 
void rotz (struct VEC *v, float const sin, float const cos)
 
struct MAT projectionMAT (struct VEC const a)
 
struct MAT projectionMAT (float const x, float const y, float const z)
 
struct MAT rotationMAT (struct VEC const a, float const t)
 
struct MAT rotationMAT (float const x, float const y, float const z, float const t)
 
struct MAT transposed (struct MAT const m)
 
struct XFORM multxx (struct XFORM const x2, struct XFORM const x1)
 
struct XFORM xrev (struct XFORM const x)
 
struct VEC multxv (struct XFORM const x, struct VEC const v)
 
struct XFORM const vvcxform (struct VEC const _x1, struct VEC const _x2, struct VEC const _y1, struct VEC const _y2, struct VEC const _c1, struct VEC const _c2)
 
struct XFORM const stub (struct VEC const a, struct VEC const b, struct VEC const c)
 
struct XFORM const stubrev (struct VEC const a, struct VEC const b, struct VEC const c)
 
struct XFORM const stubc (struct VEC const cen, struct VEC const a, struct VEC const b, struct VEC const c)
 
struct XFORM const stubcrev (struct VEC const cen, struct VEC const a, struct VEC const b, struct VEC const c)
 
bool eq (float u, float v)
 
bool eq (struct VEC u, struct VEC v)
 
bool eq (struct MAT u, struct MAT v)
 
bool eq (Vec u, struct VEC v)
 
bool eq (struct VEC u, Vec v)
 
bool eq (Mat u, struct MAT v)
 
bool eq (struct MAT u, Mat v)
 
std::ostream & operator<< (std::ostream &out, struct MAT m)
 
std::ostream & operator<< (std::ostream &out, struct VEC v)
 
void myasserteq (float u, float v, string s)
 
void myasserteq (struct VEC u, struct VEC v, string s)
 
bool myasserteq (Vec u, struct VEC v, string s)
 
bool myasserteq (struct VEC u, Vec v, string s)
 
void myasserteq (struct MAT u, struct MAT v, string s)
 
bool myasserteq (Mat u, struct MAT v, string s)
 
bool myasserteq (struct MAT u, Mat v, string s)
 
void test_MAT_VEC ()
 
void test_chi_xform ()
 

Typedef Documentation

◆ float16

typedef cl_float16 float16

◆ float2

typedef cl_float2 float2

◆ float3

typedef cl_float3 float3

◆ float4

typedef cl_float4 float4

◆ float8

typedef cl_float8 float8

◆ uint8

typedef cl_uint8 uint8

◆ ushort2

typedef cl_ushort2 ushort2

Function Documentation

◆ addvv()

struct VEC addvv ( struct VEC const  a,
struct VEC const  b 
)
inline

References x.

◆ cols() [1/2]

struct MAT cols ( float  xx,
float  yx,
float  zx,
float  xy,
float  yy,
float  zy,
float  xz,
float  yz,
float  zz 
)
inline

◆ cols() [2/2]

struct MAT cols ( struct VEC const  cx,
struct VEC const  cy,
struct VEC const  cz 
)
inline

◆ crossvv()

struct VEC crossvv ( struct VEC const  a,
struct VEC const  b 
)
inline

◆ dotvv()

float dotvv ( struct VEC const  a,
struct VEC const  b 
)
inline

References a, compute_difference::b, and mad().

Referenced by test_MAT_VEC().

◆ eq() [1/7]

bool eq ( float  u,
float  v 
)
inline

◆ eq() [2/7]

bool eq ( Mat  u,
struct MAT  v 
)
inline

◆ eq() [3/7]

bool eq ( struct MAT  u,
Mat  v 
)
inline

◆ eq() [4/7]

bool eq ( struct MAT  u,
struct MAT  v 
)
inline

◆ eq() [5/7]

bool eq ( struct VEC  u,
struct VEC  v 
)
inline

◆ eq() [6/7]

bool eq ( struct VEC  u,
Vec  v 
)
inline

◆ eq() [7/7]

bool eq ( Vec  u,
struct VEC  v 
)
inline

◆ length2f()

float length2f ( float const  x,
float const  y,
float const  z 
)
inline

References mad(), x, predPRE::y, and predPRE::z.

◆ length2v()

float length2v ( struct VEC  v)
inline

◆ lengthf()

float lengthf ( float const  x,
float const  y,
float const  z 
)
inline

References mad(), native_sqrt(), x, predPRE::y, and predPRE::z.

◆ lengthv()

float lengthv ( struct VEC  v)
inline

◆ mad()

float mad ( float  a,
float  b,
float  c 
)
inline

◆ multfm()

struct MAT multfm ( float const  a,
struct MAT const  m 
)
inline

◆ multfv()

struct VEC multfv ( float const  a,
struct VEC const  v 
)
inline

◆ multmm()

struct MAT multmm ( struct MAT const  a,
struct MAT const  b 
)
inline

◆ multmv()

struct VEC multmv ( struct MAT const  a,
struct VEC const  b 
)
inline

Referenced by refold_second(), and test_chi_xform().

◆ multxv()

struct VEC multxv ( struct XFORM const  x,
struct VEC const  v 
)
inline

◆ multxx()

struct XFORM multxx ( struct XFORM const  x2,
struct XFORM const  x1 
)
inline

◆ myasserteq() [1/7]

void myasserteq ( float  u,
float  v,
string  s 
)

◆ myasserteq() [2/7]

bool myasserteq ( Mat  u,
struct MAT  v,
string  s 
)
inline

◆ myasserteq() [3/7]

bool myasserteq ( struct MAT  u,
Mat  v,
string  s 
)
inline

◆ myasserteq() [4/7]

void myasserteq ( struct MAT  u,
struct MAT  v,
string  s 
)

◆ myasserteq() [5/7]

void myasserteq ( struct VEC  u,
struct VEC  v,
string  s 
)

◆ myasserteq() [6/7]

bool myasserteq ( struct VEC  u,
Vec  v,
string  s 
)
inline

◆ myasserteq() [7/7]

bool myasserteq ( Vec  u,
struct VEC  v,
string  s 
)
inline

◆ native_cos()

float native_cos ( float  x)
inline

References x.

◆ native_divide()

float native_divide ( float  a,
float  b 
)
inline

References a, and compute_difference::b.

◆ native_sin()

float native_sin ( float  x)
inline

References x.

◆ native_sqrt()

float native_sqrt ( float  a)
inline

References a.

Referenced by lengthf(), and lengthv().

◆ normalizedf()

struct VEC normalizedf ( float const  x,
float const  y,
float const  z 
)
inline

◆ normalizedv()

struct VEC normalizedv ( struct VEC  v)
inline

◆ operator<<() [1/2]

std::ostream& operator<< ( std::ostream &  out,
struct MAT  m 
)

◆ operator<<() [2/2]

std::ostream& operator<< ( std::ostream &  out,
struct VEC  v 
)

◆ pproj()

struct VEC pproj ( struct VEC const  a,
struct VEC const  v 
)
inline

◆ proj()

struct VEC proj ( struct VEC const  a,
struct VEC const  v 
)
inline

◆ projectionMAT() [1/2]

struct MAT projectionMAT ( float const  x,
float const  y,
float const  z 
)
inline

◆ projectionMAT() [2/2]

struct MAT projectionMAT ( struct VEC const  a)
inline

Referenced by test_MAT_VEC().

◆ rotationMAT() [1/2]

struct MAT rotationMAT ( float const  x,
float const  y,
float const  z,
float const  t 
)
inline

◆ rotationMAT() [2/2]

struct MAT rotationMAT ( struct VEC const  a,
float const  t 
)
inline

Referenced by test_chi_xform(), and test_MAT_VEC().

◆ rotx()

void rotx ( struct VEC v,
float const  sin,
float const  cos 
)
inline

◆ roty()

void roty ( struct VEC v,
float const  sin,
float const  cos 
)
inline

◆ rotz()

void rotz ( struct VEC v,
float const  sin,
float const  cos 
)
inline

Referenced by main().

◆ rows() [1/2]

struct MAT rows ( float  xx,
float  xy,
float  xz,
float  yx,
float  yy,
float  yz,
float  zx,
float  zy,
float  zz 
)
inline

◆ rows() [2/2]

struct MAT rows ( struct VEC const  rx,
struct VEC const  ry,
struct VEC const  rz 
)
inline

◆ sqr()

float sqr ( float const &  x)
inline

◆ stub()

struct XFORM const stub ( struct VEC const  a,
struct VEC const  b,
struct VEC const  c 
)
inline

◆ stubc()

struct XFORM const stubc ( struct VEC const  cen,
struct VEC const  a,
struct VEC const  b,
struct VEC const  c 
)
inline

◆ stubcrev()

struct XFORM const stubcrev ( struct VEC const  cen,
struct VEC const  a,
struct VEC const  b,
struct VEC const  c 
)
inline

◆ stubrev()

struct XFORM const stubrev ( struct VEC const  a,
struct VEC const  b,
struct VEC const  c 
)
inline

Referenced by main().

◆ subvv()

struct VEC subvv ( struct VEC const  a,
struct VEC const  b 
)
inline

◆ test_chi_xform()

void test_chi_xform ( )

◆ test_MAT_VEC()

void test_MAT_VEC ( )

◆ transposed()

struct MAT transposed ( struct MAT const  m)
inline

◆ vec()

struct VEC vec ( float  x,
float  y,
float  z 
)
inline

◆ vvcxform()

struct XFORM const vvcxform ( struct VEC const  _x1,
struct VEC const  _x2,
struct VEC const  _y1,
struct VEC const  _y2,
struct VEC const  _c1,
struct VEC const  _c2 
)
inline

◆ xform()

struct XFORM xform ( struct MAT const  R,
struct VEC const  t 
)
inline

◆ xrev()

struct XFORM xrev ( struct XFORM const  x)
inline