HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VM_SPUMath.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: VM_SPUMath.h ( RAY Library, C++)
7  *
8  * COMMENTS: A class to handle spu-ized operations below the
9  * accessibility level of SPUT.
10  */
11 
12 #ifndef __VM_SPUMath__
13 #define __VM_SPUMath__
14 
15 #include "VM_API.h"
16 #include <SYS/SYS_Types.h>
17 
18 // This enum must match with SPU_VM_OPCODE in SPU_Fluid.h
19 typedef enum
20 {
29 } VM_SPUOp;
30 
32 {
33 public:
34  virtual ~VM_SPUMath() {}
35 
36  // Return true when it is possible to use spu operations for the given
37  // vector size.
38  virtual bool canRun(int n) const = 0;
39 
40  virtual void arrayOp(VM_SPUOp op,
41  fpreal32 *d,
42  const fpreal32 *a,
43  const fpreal32 *b,
44  const fpreal32 *c, int n) = 0;
45  virtual void scalarOp(VM_SPUOp op,
46  fpreal32 *d,
47  const fpreal32 *a,
48  const fpreal32 *b,
49  fpreal32 c, int n) = 0;
50  virtual void scalarOp(VM_SPUOp op,
51  fpreal32 *d,
52  const fpreal32 *a,
53  fpreal32 b,
54  fpreal32 c, int n) = 0;
55  virtual fpreal32 dot(const fpreal32 *a,
56  const fpreal32 *b, int n) = 0;
57 
58  virtual void multVec(fpreal32 *result,
59  const fpreal32 *v,
60  const int32 *offsets,
61  const void *cells,
62  int bits, int nrows, int ncols) = 0;
63 };
64 
65 #endif
virtual ~VM_SPUMath()
Definition: VM_SPUMath.h:34
VM_SPUOp
Definition: VM_SPUMath.h:19
const GLdouble * v
Definition: glcorearb.h:836
#define VM_API
Definition: VM_API.h:10
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2620
GLdouble n
Definition: glcorearb.h:2007
fpreal64 dot(const CE_VectorT< T > &a, const CE_VectorT< T > &b)
Definition: CE_Vector.h:218
int nrows
Definition: png.h:1821
int int32
Definition: SYS_Types.h:35
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
float fpreal32
Definition: SYS_Types.h:191