Public Member Functions | Friends

sp::video::OpenCLDevice Class Reference

#include <spOpenCLDevice.hpp>

List of all members.

Public Member Functions

 OpenCLDevice ()
 ~OpenCLDevice ()
io::stringc getVersion () const
 Returns the version of the present OpenCL hardware implementation.
io::stringc getDescription () const
io::stringc getVendor () const
io::stringc getExtensionString () const
OpenCLProgramcreateProgram (const io::stringc &SourceString, const io::stringc &CompilationOptions="")
OpenCLProgramloadProgram (const io::stringc &Filename, const io::stringc &CompilationOptions="")
void deleteProgram (OpenCLProgram *Program)
 Deletes the specified OpenCL program.
OpenCLBuffercreateBuffer (const EOpenCLBufferStates State, u32 BufferSize)
OpenCLBuffercreateBuffer (const EOpenCLBufferStates State, video::Texture *TexBuffer)
OpenCLBuffercreateBuffer (const EOpenCLBufferStates State, video::MeshBuffer *MeshBuffer)
void deleteBuffer (OpenCLBuffer *Buffer)


class OpenCLBuffer
class OpenCLProgram

Detailed Description

OpenCL device class for GPGPU (General Purpose Computing on Graphics Processing Units).

Version 3.2

Constructor & Destructor Documentation

sp::video::OpenCLDevice::OpenCLDevice (  ) 
sp::video::OpenCLDevice::~OpenCLDevice (  ) 

Member Function Documentation

OpenCLBuffer* sp::video::OpenCLDevice::createBuffer ( const EOpenCLBufferStates  State,
u32  BufferSize 

Creates a new OpenCL memory buffer.

State,: Specifies the buffer state or rather if read and/or write access is enabled.
BufferSize,: Specifies the buffer size (in bytes).
Pointer to the new OpenCLBuffer object.
OpenCLBuffer* sp::video::OpenCLDevice::createBuffer ( const EOpenCLBufferStates  State,
video::Texture TexBuffer 
OpenCLBuffer* sp::video::OpenCLDevice::createBuffer ( const EOpenCLBufferStates  State,
video::MeshBuffer MeshBuffer 
OpenCLProgram* sp::video::OpenCLDevice::createProgram ( const io::stringc SourceString,
const io::stringc CompilationOptions = "" 

Creates a new OpenCL program.

SourceString,: Contains the whole OpenCL program source code.
CompilationOptions,: Contains the compilation options. Similar to a C++ compiler option. Here are a few options:

        "-D name" -> Predefine 'name' as a macro, with definition 1.
        "-cl-single-precision-constant" -> Treat double precision floating-point constant as single precision constant.
        "-cl-opt-disable" -> This option disables all optimizations. The default is optimizations are enabled.

For a detailed list take a look at the OpenCL API Docu.

Pointer to the new OpenCLProgram object.
void sp::video::OpenCLDevice::deleteBuffer ( OpenCLBuffer Buffer  ) 
void sp::video::OpenCLDevice::deleteProgram ( OpenCLProgram Program  ) 

Deletes the specified OpenCL program.

io::stringc sp::video::OpenCLDevice::getDescription (  )  const
io::stringc sp::video::OpenCLDevice::getExtensionString (  )  const
io::stringc sp::video::OpenCLDevice::getVendor (  )  const
io::stringc sp::video::OpenCLDevice::getVersion (  )  const

Returns the version of the present OpenCL hardware implementation.

OpenCLProgram* sp::video::OpenCLDevice::loadProgram ( const io::stringc Filename,
const io::stringc CompilationOptions = "" 

Loads a new OpenCL program from file.

See also:

Friends And Related Function Documentation

friend class OpenCLBuffer [friend]
friend class OpenCLProgram [friend]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines