go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Public Types | Public Member Functions | Private Attributes
itk::OpenCLProgram Class Reference

#include <itkOpenCLProgram.h>

Detailed Description

The OpenCLProgram class represents an OpenCL program object.

Definition at line 37 of file itkOpenCLProgram.h.

Public Types

typedef OpenCLProgram Self
 

Public Member Functions

bool Build (const std::string &extraBuildOptions=std::string())
 
bool Build (const std::list< OpenCLDevice > &devices, const std::string &extraBuildOptions=std::string())
 
OpenCLKernel CreateKernel (const std::string &name) const
 
std::list< OpenCLKernelCreateKernels () const
 
OpenCLContextGetContext () const
 
std::list< OpenCLDeviceGetDevices () const
 
std::string GetFileName () const
 
std::string GetLog () const
 
cl_program GetProgramId () const
 
bool IsNull () const
 
 OpenCLProgram ()
 
 OpenCLProgram (OpenCLContext *context, cl_program id, const std::string &fileName=std::string())
 
 OpenCLProgram (const OpenCLProgram &other)
 
OpenCLProgramoperator= (const OpenCLProgram &other)
 
 ~OpenCLProgram ()
 

Private Attributes

OpenCLContextm_Context
 
std::string m_FileName
 
cl_program m_Id
 

Member Typedef Documentation

Standard class typedefs.

Definition at line 42 of file itkOpenCLProgram.h.

Constructor & Destructor Documentation

itk::OpenCLProgram::OpenCLProgram ( )

Constructs a null OpenCL program object.

itk::OpenCLProgram::OpenCLProgram ( OpenCLContext context,
cl_program  id,
const std::string &  fileName = std::string() 
)

Constructs an OpenCL program object from the native identifier id, and associates it with context and debug file fileName. This class will take over ownership of id and will release it in the destructor.

itk::OpenCLProgram::OpenCLProgram ( const OpenCLProgram other)

Constructs a copy of other.

itk::OpenCLProgram::~OpenCLProgram ( )

Releases this OpenCL program object. If this is the last reference to the program, it will be destroyed.

Member Function Documentation

bool itk::OpenCLProgram::Build ( const std::string &  extraBuildOptions = std::string())

Builds this program from the sources and binaries that were supplied, with extra build compiler options specified by extraBuildOptions. The main compiler options are provided during CMake configuration (see group OPENCL in CMake). Returns true if the program was built; false otherwise.

See also
GetLog(), CreateKernel()
bool itk::OpenCLProgram::Build ( const std::list< OpenCLDevice > &  devices,
const std::string &  extraBuildOptions = std::string() 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Builds this program from the sources and binaries that were supplied, with extra build compiler options specified by extraBuildOptions. The main compiler options are provided during CMake configuration (see group OPENCL in CMake). If devices is not empty, the program will only be built for devices in the specified list. Otherwise the program will be built for all devices on the program's context. Returns true if the program was built; false otherwise.

See also
GetLog(), CreateKernel()
OpenCLKernel itk::OpenCLProgram::CreateKernel ( const std::string &  name) const

Creates a kernel for the entry point associated with name in this program.

See also
Build()
std::list< OpenCLKernel > itk::OpenCLProgram::CreateKernels ( ) const

Creates a list of kernels for all of the entry points in this program.

OpenCLContext* itk::OpenCLProgram::GetContext ( ) const
inline

Returns the OpenCL context that this program was created within.

Definition at line 67 of file itkOpenCLProgram.h.

std::list< OpenCLDevice > itk::OpenCLProgram::GetDevices ( ) const

Returns the list of devices that this program is associated with.

See also
GetBinaries()
std::string itk::OpenCLProgram::GetFileName ( ) const
inline

Returns the debug filename that this program was created within.

Definition at line 73 of file itkOpenCLProgram.h.

std::string itk::OpenCLProgram::GetLog ( ) const

Returns the error GetLog that resulted from the last build().

See also
Build()
cl_program itk::OpenCLProgram::GetProgramId ( ) const
inline

Returns the native OpenCL identifier for this program.

Definition at line 70 of file itkOpenCLProgram.h.

bool itk::OpenCLProgram::IsNull ( ) const
inline

Returns null if this OpenCL program object is null.

Definition at line 64 of file itkOpenCLProgram.h.

OpenCLProgram& itk::OpenCLProgram::operator= ( const OpenCLProgram other)

Assigns other to this object.

Field Documentation

OpenCLContext* itk::OpenCLProgram::m_Context
private

Definition at line 114 of file itkOpenCLProgram.h.

std::string itk::OpenCLProgram::m_FileName
private

Definition at line 116 of file itkOpenCLProgram.h.

cl_program itk::OpenCLProgram::m_Id
private

Definition at line 115 of file itkOpenCLProgram.h.



Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo