All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cl::Program Class Reference

Program interface that implements cl_program. More...

`#include <cl2.hpp>`

Inherits cl::detail::Wrapper< cl_program >.

## Public Types

typedef vector< vector < unsigned char > > | Binaries
typedef vector< string > | Sources
Public Types inherited from cl::detail::Wrapper< cl_program >
typedef cl_program | cl_type

## Public Member Functions

| Program (const string &source, bool build=false, cl_int *err=NULL)
| Program (const Context &context, const string &source, bool build=false, cl_int *err=NULL)
| Program (const Sources &sources, cl_int *err=NULL)
| Program (const Context &context, const Sources &sources, cl_int *err=NULL)
| Program (const Context &context, const vector< Device > &devices, const Binaries &binaries, vector< cl_int > *binaryStatus=NULL, cl_int *err=NULL)
| Program (const Context &context, const vector< Device > &devices, const string &kernelNames, cl_int *err=NULL)
| Program ()
| Program (const cl_program &program, bool retainObject=false)
| Constructor from cl_mem - takes ownership. More...
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...
| Program (Program &&program) CL_HPP_NOEXCEPT_
| Move constructor to forward move to the superclass correctly. Required for MSVC. More...
Program & | operator= (Program &&program)
| Move assignment to forward move to the superclass correctly. Required for MSVC. More...
cl_int | build (const vector< 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
cl_int | compile (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
template<cl_int name>
vector< std::pair< cl::Device, typename detail::param_traits < detail::cl_program_build_info, name >::param_type > > | getBuildInfo (cl_int *err=NULL) const
cl_int | createKernels (vector< Kernel > *kernels)
template<>
cl_int | getInfo (cl_program_info name, vector< vector< unsigned char >> *param) const
template<>
vector< vector< unsigned char > > | getInfo (cl_int *err) const
Public Member Functions inherited from cl::detail::Wrapper< cl_program >
| Wrapper ()
| Wrapper (const cl_type &obj, bool retainObject)
| Wrapper (const Wrapper< cl_type > &rhs)
| Wrapper (Wrapper< cl_type > &&rhs) CL_HPP_NOEXCEPT_
| ~Wrapper ()
Wrapper< cl_type > & | operator= (const Wrapper< cl_type > &rhs)
Wrapper< cl_type > & | operator= (Wrapper< cl_type > &&rhs)
Wrapper< cl_type > & | operator= (const cl_type &rhs)
const cl_type & | operator() () const
cl_type & | operator() ()
const cl_type | get () const
cl_type | get ()

## Additional Inherited Members

Protected Member Functions inherited from cl::detail::Wrapper< cl_program >
cl_int | retain () 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.

## Member Typedef Documentation

typedef vector<vector<unsigned char> > cl::Program::Binaries

typedef vector<string> cl::Program::Sources

## Constructor & Destructor Documentation

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

inline

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

inline

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

inline

Create a program from a vector of source strings and the default context. Does not compile or link the program.

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

inline

Create a program from a vector of source strings and a provided context. Does not compile or link the program.

cl::Program::Program | ( | const Context & | context,
|  | const vector< Device > & | devices,
|  | const Binaries & | binaries,
|  | vector< 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.

cl::Program::Program | ( | const Context & | context,
|  | const vector< Device > & | devices,
|  | const string & | kernelNames,
|  | cl_int * | err = `NULL`
| ) |  |

inline

Create program using builtin kernels.

Parameters

  kernelNames | Semi-colon separated list of builtin kernel names

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

inline

cl::Program::Program | ( | const cl_program & | program,
|  | bool | retainObject = `false`
| ) |  |

inlineexplicit

Constructor from cl_mem - takes ownership.

Parameters

  retainObject | will cause the constructor to retain its cl object. Defaults to false to maintain compatibility with earlier versions.

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

inline

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

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

inline

Move constructor to forward move to the superclass correctly. Required for MSVC.

## Member Function Documentation

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

inline

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

inline

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

inline

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

inline

template<typename T >

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

inline

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

template<cl_int name>

vector<std::pair<cl::Device, typename detail::param_traits<detail::cl_program_build_info, name>::param_type> > cl::Program::getBuildInfo | ( | cl_int * | err = `NULL` | ) | const

inline

Build info function that returns a vector of device/info pairs for the specified info type and for all devices in the program. On an error reading the info for any device, an empty vector of info will be returned.

template<typename T >

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

inline

template<cl_int name>

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

inline

template<>

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

inline

template<>

cl_int cl::Program::getInfo | ( | cl_program_info | name,
|  | vector< vector< unsigned char >> * | param
| ) |  | const

inline

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

inline

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

inline

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

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

inline

Move assignment to forward move to the superclass correctly. Required for MSVC.

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

- /home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/gpu/cl2.hpp