Loading...
Searching...
No Matches
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

using | Self = OpenCLProgram

## Public Member Functions

bool | Build (const std::list< OpenCLDevice > &devices, const std::string &extraBuildOptions=std::string())
bool | Build (const std::string &extraBuildOptions=std::string())
OpenCLKernel | CreateKernel (const std::string &name) const
std::list< OpenCLKernel > | CreateKernels () const
OpenCLContext * | GetContext () const
std::list< OpenCLDevice > | GetDevices () const
std::string | GetFileName () const
std::string | GetLog () const
cl_program | GetProgramId () const
bool | IsNull () const
| OpenCLProgram ()
| OpenCLProgram (const OpenCLProgram &other)
| OpenCLProgram (OpenCLContext *context, cl_program id, const std::string &fileName=std::string())
OpenCLProgram & | operator= (const OpenCLProgram &other)
| ~OpenCLProgram ()

## Private Attributes

OpenCLContext * | m_Context
std::string | m_FileName
cl_program | m_Id

## Member Typedef Documentation

## Self

using itk::OpenCLProgram::Self = OpenCLProgram

Standard class typedefs.

Definition at line 41 of file itkOpenCLProgram.h.

## Constructor & Destructor Documentation

## OpenCLProgram() [1/3]

itk::OpenCLProgram::OpenCLProgram | ( |  | ) |

Constructs a null OpenCL program object.

## OpenCLProgram() [2/3]

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.

## OpenCLProgram() [3/3]

itk::OpenCLProgram::OpenCLProgram | ( | const OpenCLProgram & | other | ) |

Constructs a copy of other.

## ~OpenCLProgram()

itk::OpenCLProgram::~OpenCLProgram | ( |  | ) |

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

## Member Function Documentation

## Build() [1/2]

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()

## Build() [2/2]

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()

## 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()

## CreateKernels()

std::list< OpenCLKernel > itk::OpenCLProgram::CreateKernels | ( |  | ) | const

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

## GetContext()

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

inline

Returns the OpenCL context that this program was created within.

Definition at line 71 of file itkOpenCLProgram.h.

## GetDevices()

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

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

See also
  GetBinaries()

## GetFileName()

std::string itk::OpenCLProgram::GetFileName | ( |  | ) | const

inline

Returns the debug filename that this program was created within.

Definition at line 85 of file itkOpenCLProgram.h.

## GetLog()

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

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

See also
  Build()

## GetProgramId()

cl_program itk::OpenCLProgram::GetProgramId | ( |  | ) | const

inline

Returns the native OpenCL identifier for this program.

Definition at line 78 of file itkOpenCLProgram.h.

## IsNull()

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

inline

Returns null if this OpenCL program object is null.

Definition at line 64 of file itkOpenCLProgram.h.

## operator=()

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

Assigns other to this object.

## Field Documentation

## m_Context

OpenCLContext* itk::OpenCLProgram::m_Context

private

Definition at line 133 of file itkOpenCLProgram.h.

## m_FileName

std::string itk::OpenCLProgram::m_FileName

private

Definition at line 135 of file itkOpenCLProgram.h.

## m_Id

cl_program itk::OpenCLProgram::m_Id

private

Definition at line 134 of file itkOpenCLProgram.h.

Generated on 1768596610 for elastix by 1.15.0 |