A generic interface to GPU port devices.
More...
#include <yarp/dev/GPUInterface.h>
|
virtual | ~IGPUDevice () |
|
virtual int | width ()=0 |
| It returns the current workspace's width. More...
|
|
virtual int | height ()=0 |
| It returns the current workspace's height. More...
|
|
virtual bool | resize (int width, int height)=0 |
| It changes the dimensions of the current working space (the texture used for communication with the GPU). More...
|
|
virtual void | changebpp (int bytespp)=0 |
| It changes the number of bytes per pixel (data matrix element). More...
|
|
virtual void | changetype (int newtype)=0 |
| It changes the size of each pixel (the type each pixel's element is). More...
|
|
virtual int | load (char *name)=0 |
| Load a program for the GPU. More...
|
|
virtual void | setargument (int prg, char *name, float val)=0 |
| Set a program's argument to 'val' (float). More...
|
|
virtual void | setargument (int prg, int val)=0 |
|
virtual void | setargument (int prg, float val)=0 |
|
virtual void | setargument (int prg, char *name, float *vector, int len)=0 |
| Set a program's argument to 'vector' (1D vector for single values). More...
|
|
virtual void | execute (int prg, unsigned char *in, unsigned char *out)=0 |
| Execute a loaded program on a given matrix (eg: an image). More...
|
|
virtual void | execute (int prg, unsigned char *in, unsigned char *in2, unsigned char *out)=0 |
| Execute a loaded program on 2 given matrices (eg: images). More...
|
|
virtual void | execute (int prg, yarp::sig::Image *in, yarp::sig::Image *out)=0 |
| Execute a loaded program on a given matrix (eg: an image). More...
|
|
virtual void | execute (int prg, yarp::sig::Image *in, yarp::sig::Image *in2, yarp::sig::Image *out)=0 |
| Execute a loaded program on 2 given matrices (eg: images). More...
|
|
A generic interface to GPU port devices.
Definition at line 29 of file GPUInterface.h.
◆ ~IGPUDevice()
virtual yarp::dev::IGPUDevice::~IGPUDevice |
( |
| ) |
|
|
inlinevirtual |
◆ changebpp()
virtual void yarp::dev::IGPUDevice::changebpp |
( |
int |
bytespp | ) |
|
|
pure virtual |
It changes the number of bytes per pixel (data matrix element).
Matrices are passed as 1D vectors.
- Parameters
-
bytespp | the new number of bytes per pixel |
◆ changetype()
virtual void yarp::dev::IGPUDevice::changetype |
( |
int |
newtype | ) |
|
|
pure virtual |
It changes the size of each pixel (the type each pixel's element is).
- Parameters
-
newtype | the new pixel's elements type (cfr. enum YarpVocabPixelTypesEnum under image.h) |
◆ execute() [1/4]
virtual void yarp::dev::IGPUDevice::execute |
( |
int |
prg, |
|
|
unsigned char * |
in, |
|
|
unsigned char * |
in2, |
|
|
unsigned char * |
out |
|
) |
| |
|
pure virtual |
Execute a loaded program on 2 given matrices (eg: images).
- Parameters
-
prg | a previously loaded program |
in | the first matrix containing the data to be processed |
in2 | the second matrix containing the data to be processed |
out | the program's results |
◆ execute() [2/4]
virtual void yarp::dev::IGPUDevice::execute |
( |
int |
prg, |
|
|
unsigned char * |
in, |
|
|
unsigned char * |
out |
|
) |
| |
|
pure virtual |
Execute a loaded program on a given matrix (eg: an image).
- Parameters
-
prg | a previously loaded program |
in | the matrix containing the data to be processed |
out | the program's results |
◆ execute() [3/4]
Execute a loaded program on 2 given matrices (eg: images).
- Parameters
-
prg | a previously loaded program |
in | the first sig::ImageOf containing the data to be processed |
in2 | the second sig::ImageOf containing the data to be processed |
out | the program's results (sig::ImageOf) |
◆ execute() [4/4]
Execute a loaded program on a given matrix (eg: an image).
- Parameters
-
prg | a previously loaded program |
in | the sig::ImageOf containing the data to be processed |
out | the program's results (sig::ImageOf) |
◆ height()
virtual int yarp::dev::IGPUDevice::height |
( |
| ) |
|
|
pure virtual |
It returns the current workspace's height.
- Returns
- height of current workspace
◆ load()
virtual int yarp::dev::IGPUDevice::load |
( |
char * |
name | ) |
|
|
pure virtual |
Load a program for the GPU.
- Parameters
-
name | the name of the program to load from the HD |
- Returns
- an object representing the program casted to int (for compatibility purpose)
◆ resize()
virtual bool yarp::dev::IGPUDevice::resize |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
pure virtual |
It changes the dimensions of the current working space (the texture used for communication with the GPU).
- Parameters
-
width | the new width |
height | the new height |
- Returns
- true if successful
◆ setargument() [1/4]
virtual void yarp::dev::IGPUDevice::setargument |
( |
int |
prg, |
|
|
char * |
name, |
|
|
float * |
vector, |
|
|
int |
len |
|
) |
| |
|
pure virtual |
Set a program's argument to 'vector' (1D vector for single values).
- Parameters
-
prg | a program |
name | the name of the argument to set |
vector | the value/s to set |
len | the vector's length |
◆ setargument() [2/4]
virtual void yarp::dev::IGPUDevice::setargument |
( |
int |
prg, |
|
|
char * |
name, |
|
|
float |
val |
|
) |
| |
|
pure virtual |
Set a program's argument to 'val' (float).
- Parameters
-
prg | a program |
name | the name of the argument to set |
vector | the value to set |
◆ setargument() [3/4]
virtual void yarp::dev::IGPUDevice::setargument |
( |
int |
prg, |
|
|
float |
val |
|
) |
| |
|
pure virtual |
◆ setargument() [4/4]
virtual void yarp::dev::IGPUDevice::setargument |
( |
int |
prg, |
|
|
int |
val |
|
) |
| |
|
pure virtual |
◆ width()
virtual int yarp::dev::IGPUDevice::width |
( |
| ) |
|
|
pure virtual |
It returns the current workspace's width.
- Returns
- width of current workspace
The documentation for this class was generated from the following file: