ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
viennacl::ocl::program Class Reference

Wrapper class for an OpenCL program. More...

#include <program.hpp>

Public Member Functions

 program ()
 
 program (cl_program program_handle, viennacl::ocl::context const &program_context, std::string const &prog_name=std::string())
 
 program (program const &other)
 
viennacl::ocl::programoperator= (const program &other)
 
viennacl::ocl::context const * p_context () const
 
std::string const & name () const
 
viennacl::ocl::kerneladd_kernel (cl_kernel kernel_handle, std::string const &kernel_name)
 Adds a kernel to the program. More...
 
viennacl::ocl::kernelget_kernel (std::string const &name)
 Returns the kernel with the provided name. More...
 
const viennacl::ocl::handle< cl_program > & handle () const
 

Detailed Description

Wrapper class for an OpenCL program.

This class was written when the OpenCL C++ bindings haven't been standardized yet. Regardless, it takes care about some additional details and is supposed to provide higher convenience by holding the kernels defined in the program.

Examples:
custom-context.cpp, and custom-kernels.cpp.

Definition at line 42 of file program.hpp.

Constructor & Destructor Documentation

viennacl::ocl::program::program ( )
inline

Definition at line 47 of file program.hpp.

viennacl::ocl::program::program ( cl_program  program_handle,
viennacl::ocl::context const &  program_context,
std::string const &  prog_name = std::string() 
)
inline

Definition at line 48 of file program.hpp.

viennacl::ocl::program::program ( program const &  other)
inline

Definition at line 51 of file program.hpp.

Member Function Documentation

viennacl::ocl::kernel & viennacl::ocl::program::add_kernel ( cl_kernel  kernel_handle,
std::string const &  kernel_name 
)
inline

Adds a kernel to the program.

Examples:
custom-context.cpp.

Definition at line 765 of file context.hpp.

viennacl::ocl::kernel & viennacl::ocl::program::get_kernel ( std::string const &  name)
inline

Returns the kernel with the provided name.

Examples:
custom-kernels.cpp.

Definition at line 773 of file context.hpp.

const viennacl::ocl::handle<cl_program>& viennacl::ocl::program::handle ( ) const
inline

Definition at line 72 of file program.hpp.

std::string const& viennacl::ocl::program::name ( ) const
inline

Definition at line 64 of file program.hpp.

viennacl::ocl::program& viennacl::ocl::program::operator= ( const program other)
inline

Definition at line 53 of file program.hpp.

viennacl::ocl::context const* viennacl::ocl::program::p_context ( ) const
inline

Definition at line 62 of file program.hpp.


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