cl::Program Class Reference

Program interface that implements cl_program. More...

`#include <cl.hpp>`

Inheritance diagram for cl::Program:
[legend]
Collaboration diagram for cl::Program:
[legend]

## Public Types

typedef VECTOR_CLASS< std::pair< const void *, ::size_t > > | Binaries
typedef VECTOR_CLASS< std::pair< const char *, ::size_t > > | Sources
typedef VECTOR_CLASS< std::pair< const void *, ::size_t > > | Binaries
typedef VECTOR_CLASS< std::pair< const char *, ::size_t > > | Sources
Public Types inherited from cl::detail::Wrapper< cl_program >
typedef cl_program | cl_type
typedef cl_program | cl_type

## Public Member Functions

| Program (const STRING_CLASS &source, bool build=false, cl_int *err=NULL)
| Program (const Context &context, const STRING_CLASS &source, bool build=false, cl_int *err=NULL)
| Program (const Context &context, const Sources &sources, cl_int *err=NULL)
| Program (const Context &context, const VECTOR_CLASS< Device > &devices, const Binaries &binaries, VECTOR_CLASS< cl_int > *binaryStatus=NULL, cl_int *err=NULL)
| Program ()
__CL_EXPLICIT_CONSTRUCTORS | Program (const cl_program &program)
Program & | operator= (const cl_program &rhs)
| Program (const Program &program)
| Copy constructor to forward copy to the superclass correctly. Required for MSVC. More...
Program & | operator= (const Program &program)
| Copy assignment to forward copy to the superclass correctly. Required for MSVC. More...
cl_int | build (const VECTOR_CLASS< Device > &devices, const char *options=NULL, void(CL_CALLBACK *notifyFptr)(cl_program, void *)=NULL, void *data=NULL) const
cl_int | build (const char *options=NULL, void(CL_CALLBACK *notifyFptr)(cl_program, void *)=NULL, void *data=NULL) const
template<typename T >
cl_int | getInfo (cl_program_info name, T *param) const
template<cl_int name>
detail::param_traits< detail::cl_program_info, name >::param_type | getInfo (cl_int *err=NULL) const
template<typename T >
cl_int | getBuildInfo (const Device &device, cl_program_build_info name, T *param) const
template<cl_int name>
detail::param_traits< detail::cl_program_build_info, name >::param_type | getBuildInfo (const Device &device, cl_int *err=NULL) const
cl_int | createKernels (VECTOR_CLASS< Kernel > *kernels)
| Program (const STRING_CLASS &source, bool build=false, cl_int *err=NULL)
| Program (const Context &context, const STRING_CLASS &source, bool build=false, cl_int *err=NULL)
| Program (const Context &context, const Sources &sources, cl_int *err=NULL)
| Program (const Context &context, const VECTOR_CLASS< Device > &devices, const Binaries &binaries, VECTOR_CLASS< cl_int > *binaryStatus=NULL, cl_int *err=NULL)
| Program ()
__CL_EXPLICIT_CONSTRUCTORS | Program (const cl_program &program)
Program & | operator= (const cl_program &rhs)
| Program (const Program &program)
| Copy constructor to forward copy to the superclass correctly. Required for MSVC. More...
Program & | operator= (const Program &program)
| Copy assignment to forward copy to the superclass correctly. Required for MSVC. More...
cl_int | build (const VECTOR_CLASS< Device > &devices, const char *options=NULL, void(CL_CALLBACK *notifyFptr)(cl_program, void *)=NULL, void *data=NULL) const
cl_int | build (const char *options=NULL, void(CL_CALLBACK *notifyFptr)(cl_program, void *)=NULL, void *data=NULL) const
template<typename T >
cl_int | getInfo (cl_program_info name, T *param) const
template<cl_int name>
detail::param_traits< detail::cl_program_info, name >::param_type | getInfo (cl_int *err=NULL) const
template<typename T >
cl_int | getBuildInfo (const Device &device, cl_program_build_info name, T *param) const
template<cl_int name>
detail::param_traits< detail::cl_program_build_info, name >::param_type | getBuildInfo (const Device &device, cl_int *err=NULL) const
cl_int | createKernels (VECTOR_CLASS< Kernel > *kernels)
template<>
VECTOR_CLASS< char * > | getInfo (cl_int *err) const
template<>
VECTOR_CLASS< char * > | getInfo (cl_int *err) const
Public Member Functions inherited from cl::detail::Wrapper< cl_program >
| Wrapper ()
| Wrapper (const cl_type &obj)
| Wrapper (const Wrapper< cl_type > &rhs)
| Wrapper ()
| Wrapper (const cl_type &obj)
| Wrapper (const Wrapper< cl_type > &rhs)
| ~Wrapper ()
| ~Wrapper ()
Wrapper< cl_type > & | operator= (const Wrapper< cl_type > &rhs)
Wrapper< cl_type > & | operator= (const cl_type &rhs)
Wrapper< cl_type > & | operator= (const Wrapper< cl_type > &rhs)
Wrapper< cl_type > & | operator= (const cl_type &rhs)
cl_type | operator() () const
cl_type & | operator() ()
cl_type | operator() () const
cl_type & | operator() ()

## Additional Inherited Members

Protected Member Functions inherited from cl::detail::Wrapper< cl_program >
cl_int | retain () const
cl_int | retain () const
cl_int | release () const
cl_int | release () const
Protected Attributes inherited from cl::detail::Wrapper< cl_program >
cl_type | object_

## Detailed Description

Program interface that implements cl_program.

Definition at line 4867 of file cl.hpp.

## Member Typedef Documentation

## Binaries [1/2]

typedef VECTOR_CLASS<std::pair<const void*, ::size_t> > cl::Program::Binaries

Definition at line 4870 of file cl.hpp.

## Binaries [2/2]

typedef VECTOR_CLASS<std::pair<const void*, ::size_t> > cl::Program::Binaries

Definition at line 4870 of file cl.hpp.

## Sources [1/2]

typedef VECTOR_CLASS<std::pair<const char*, ::size_t> > cl::Program::Sources

Definition at line 4871 of file cl.hpp.

## Sources [2/2]

typedef VECTOR_CLASS<std::pair<const char*, ::size_t> > cl::Program::Sources

Definition at line 4871 of file cl.hpp.

## Constructor & Destructor Documentation

## Program() [1/14]

cl::Program::Program | ( | const STRING_CLASS & | source,
|  | bool | build = `false`,
|  | cl_int * | err = `NULL`
| ) |  |

inline

Definition at line 4873 of file cl.hpp.

## Program() [2/14]

cl::Program::Program | ( | const Context & | context,
|  | const STRING_CLASS & | source,
|  | bool | build = `false`,
|  | cl_int * | err = `NULL`
| ) |  |

inline

Definition at line 4908 of file cl.hpp.

## Program() [3/14]

cl::Program::Program | ( | const Context & | context,
|  | const Sources & | sources,
|  | cl_int * | err = `NULL`
| ) |  |

inline

Definition at line 4942 of file cl.hpp.

## Program() [4/14]

cl::Program::Program | ( | const Context & | context,
|  | const VECTOR_CLASS< Device > & | devices,
|  | const Binaries & | binaries,
|  | VECTOR_CLASS< cl_int > * | binaryStatus = `NULL`,
|  | cl_int * | err = `NULL`
| ) |  |

inline

Construct a program object from a list of devices and a per-device list of binaries.

Parameters

  context | A valid OpenCL context in which to construct the program.
  devices | A vector of OpenCL device objects for which the program will be created.
  binaries | A vector of pairs of a pointer to a binary object and its length.
  binaryStatus | An optional vector that on completion will be resized to match the size of binaries and filled with values to specify if each binary was successfully loaded. Set to CL_SUCCESS if the binary was successfully loaded. Set to CL_INVALID_VALUE if the length is 0 or the binary pointer is NULL. Set to CL_INVALID_BINARY if the binary provided is not valid for the matching device.

  err

  if non-NULL will be set to CL_SUCCESS on successful operation or one of the following errors: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if the length of devices is zero; or if the length of binaries does not match the length of devices; or if any entry in binaries is NULL or has length 0. CL_INVALID_DEVICE if OpenCL devices listed in devices are not in the list of devices associated with context. CL_INVALID_BINARY if an invalid program binary was encountered for any device. binaryStatus will return specific status for each device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.

Definition at line 4986 of file cl.hpp.

## Program() [5/14]

cl::Program::Program | ( |  | ) |

inline

Definition at line 5072 of file cl.hpp.

## Program() [6/14]

__CL_EXPLICIT_CONSTRUCTORS cl::Program::Program | ( | const cl_program & | program | ) |

inline

Definition at line 5074 of file cl.hpp.

## Program() [7/14]

cl::Program::Program | ( | const Program & | program | ) |

inline

Copy constructor to forward copy to the superclass correctly. Required for MSVC.

Definition at line 5085 of file cl.hpp.

## Program() [8/14]

cl::Program::Program | ( | const STRING_CLASS & | source,
|  | bool | build = `false`,
|  | cl_int * | err = `NULL`
| ) |  |

inline

Definition at line 4873 of file cl.hpp.

## Program() [9/14]

cl::Program::Program | ( | const Context & | context,
|  | const STRING_CLASS & | source,
|  | bool | build = `false`,
|  | cl_int * | err = `NULL`
| ) |  |

inline

Definition at line 4908 of file cl.hpp.

## Program() [10/14]

cl::Program::Program | ( | const Context & | context,
|  | const Sources & | sources,
|  | cl_int * | err = `NULL`
| ) |  |

inline

Definition at line 4942 of file cl.hpp.

## Program() [11/14]

cl::Program::Program | ( | const Context & | context,
|  | const VECTOR_CLASS< Device > & | devices,
|  | const Binaries & | binaries,
|  | VECTOR_CLASS< cl_int > * | binaryStatus = `NULL`,
|  | cl_int * | err = `NULL`
| ) |  |

inline

Construct a program object from a list of devices and a per-device list of binaries.

Parameters

  context | A valid OpenCL context in which to construct the program.
  devices | A vector of OpenCL device objects for which the program will be created.
  binaries | A vector of pairs of a pointer to a binary object and its length.
  binaryStatus | An optional vector that on completion will be resized to match the size of binaries and filled with values to specify if each binary was successfully loaded. Set to CL_SUCCESS if the binary was successfully loaded. Set to CL_INVALID_VALUE if the length is 0 or the binary pointer is NULL. Set to CL_INVALID_BINARY if the binary provided is not valid for the matching device.

  err

  if non-NULL will be set to CL_SUCCESS on successful operation or one of the following errors: CL_INVALID_CONTEXT if context is not a valid context. CL_INVALID_VALUE if the length of devices is zero; or if the length of binaries does not match the length of devices; or if any entry in binaries is NULL or has length 0. CL_INVALID_DEVICE if OpenCL devices listed in devices are not in the list of devices associated with context. CL_INVALID_BINARY if an invalid program binary was encountered for any device. binaryStatus will return specific status for each device. CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.

Definition at line 4986 of file cl.hpp.

## Program() [12/14]

cl::Program::Program | ( |  | ) |

inline

Definition at line 5072 of file cl.hpp.

## Program() [13/14]

__CL_EXPLICIT_CONSTRUCTORS cl::Program::Program | ( | const cl_program & | program | ) |

inline

Definition at line 5074 of file cl.hpp.

## Program() [14/14]

cl::Program::Program | ( | const Program & | program | ) |

inline

Copy constructor to forward copy to the superclass correctly. Required for MSVC.

Definition at line 5085 of file cl.hpp.

## Member Function Documentation

## build() [1/4]

cl_int cl::Program::build | ( | const char * | options = `NULL`,
|  | void(CL_CALLBACK *notifyFptr)(cl_program, void *) | = `NULL`,
|  | void * | data = `NULL`
| ) |  | const

inline

Definition at line 5136 of file cl.hpp.

## build() [2/4]

cl_int cl::Program::build | ( | const char * | options = `NULL`,
|  | void(CL_CALLBACK *notifyFptr)(cl_program, void *) | = `NULL`,
|  | void * | data = `NULL`
| ) |  | const

inline

Definition at line 5136 of file cl.hpp.

## build() [3/4]

cl_int cl::Program::build | ( | const VECTOR_CLASS< Device > & | devices,
|  | const char * | options = `NULL`,
|  | void(CL_CALLBACK *notifyFptr)(cl_program, void *) | = `NULL`,
|  | void * | data = `NULL`
| ) |  | const

inline

Definition at line 5112 of file cl.hpp.

## build() [4/4]

cl_int cl::Program::build | ( | const VECTOR_CLASS< Device > & | devices,
|  | const char * | options = `NULL`,
|  | void(CL_CALLBACK *notifyFptr)(cl_program, void *) | = `NULL`,
|  | void * | data = `NULL`
| ) |  | const

inline

Definition at line 5112 of file cl.hpp.

## createKernels() [1/2]

cl_int cl::Program::createKernels | ( | VECTOR_CLASS< Kernel > * | kernels | ) |

inline

Definition at line 5217 of file cl.hpp.

## createKernels() [2/2]

cl_int cl::Program::createKernels | ( | VECTOR_CLASS< Kernel > * | kernels | ) |

inline

Definition at line 5217 of file cl.hpp.

## getBuildInfo() [1/4]

template<cl_int name>

detail::param_traits<detail::cl_program_build_info, name>::param_type cl::Program::getBuildInfo | ( | const Device & | device,
|  | cl_int * | err = `NULL`
| ) |  | const

inline

Definition at line 5206 of file cl.hpp.

## getBuildInfo() [2/4]

template<cl_int name>

detail::param_traits<detail::cl_program_build_info, name>::param_type cl::Program::getBuildInfo | ( | const Device & | device,
|  | cl_int * | err = `NULL`
| ) |  | const

inline

Definition at line 5206 of file cl.hpp.

## getBuildInfo() [3/4]

template<typename T >

cl_int cl::Program::getBuildInfo | ( | const Device & | device,
|  | cl_program_build_info | name,
|  | T * | param
| ) |  | const

inline

Definition at line 5195 of file cl.hpp.

## getBuildInfo() [4/4]

template<typename T >

cl_int cl::Program::getBuildInfo | ( | const Device & | device,
|  | cl_program_build_info | name,
|  | T * | param
| ) |  | const

inline

Definition at line 5195 of file cl.hpp.

## getInfo() [1/6]

template<>

VECTOR_CLASS<char *> cl::Program::getInfo | ( | cl_int * | err | ) | const

inline

Definition at line 4705 of file cl.hpp.

## getInfo() [2/6]

template<>

VECTOR_CLASS<char *> cl::Program::getInfo | ( | cl_int * | err | ) | const

inline

Definition at line 4705 of file cl.hpp.

## getInfo() [3/6]

template<cl_int name>

detail::param_traits<detail::cl_program_info, name>::param_type cl::Program::getInfo | ( | cl_int * | err = `NULL` | ) | const

inline

Definition at line 5183 of file cl.hpp.

## getInfo() [4/6]

template<cl_int name>

detail::param_traits<detail::cl_program_info, name>::param_type cl::Program::getInfo | ( | cl_int * | err = `NULL` | ) | const

inline

Definition at line 5183 of file cl.hpp.

## getInfo() [5/6]

template<typename T >

cl_int cl::Program::getInfo | ( | cl_program_info | name,
|  | T * | param
| ) |  | const

inline

Definition at line 5174 of file cl.hpp.

## getInfo() [6/6]

template<typename T >

cl_int cl::Program::getInfo | ( | cl_program_info | name,
|  | T * | param
| ) |  | const

inline

Definition at line 5174 of file cl.hpp.

## operator=() [1/4]

Program& cl::Program::operator= | ( | const cl_program & | rhs | ) |

inline

Definition at line 5076 of file cl.hpp.

## operator=() [2/4]

Program& cl::Program::operator= | ( | const cl_program & | rhs | ) |

inline

Definition at line 5076 of file cl.hpp.

## operator=() [3/4]

Program& cl::Program::operator= | ( | const Program & | program | ) |

inline

Copy assignment to forward copy to the superclass correctly. Required for MSVC.

Definition at line 5090 of file cl.hpp.

## operator=() [4/4]

Program& cl::Program::operator= | ( | const Program & | program | ) |

inline

Copy assignment to forward copy to the superclass correctly. Required for MSVC.

Definition at line 5090 of file cl.hpp.

The documentation for this class was generated from the following file:

- /build/asl-1Fw6fH/asl-0.1.7/debian/tmp/usr/include/ASL/acl/cl.hpp