cf4ocl (C Framework for OpenCL)
v2.1.0
Object-oriented framework for developing and benchmarking OpenCL projects in C/C++
|
Program wrapper class. More...
Public Types | |
typedef void(* | ccl_program_callback )(cl_program program, void *user_data) |
Prototype of callback functions for program build, compile and link. More... | |
typedef void(* | ccl_program_callback )(cl_program program, void *user_data) |
Prototype of callback functions for program build, compile and link. More... | |
Public Member Functions | |
cl_bool | ccl_program_build (CCLProgram *prg, const char *options, CCLErr **err) |
Utility function which builds (compiles and links) a program executable from the program source or binary. More... | |
cl_bool | ccl_program_build_full (CCLProgram *prg, cl_uint num_devices, CCLDevice *const *devs, const char *options, ccl_program_callback pfn_notify, void *user_data, CCLErr **err) |
Builds (compiles and links) a program executable from the program source or binary. More... | |
cl_bool | ccl_program_compile (CCLProgram *prg, cl_uint num_devices, CCLDevice *const *devs, const char *options, cl_uint num_input_headers, CCLProgram **prg_input_headers, const char **header_include_names, ccl_program_callback pfn_notify, void *user_data, CCLErr **err) |
Compile a program's source code. More... | |
void | ccl_program_destroy (CCLProgram *prg) |
Decrements the reference count of the program wrapper object. More... | |
CCLEvent * | ccl_program_enqueue_kernel (CCLProgram *prg, const char *kernel_name, CCLQueue *cq, cl_uint work_dim, const size_t *global_work_offset, const size_t *global_work_size, const size_t *local_work_size, CCLEventWaitList *evt_wait_lst, CCLErr **err,...) |
Enqueues a program kernel function for execution on a device. More... | |
CCLEvent * | ccl_program_enqueue_kernel_v (CCLProgram *prg, const char *kernel_name, CCLQueue *cq, cl_uint work_dim, const size_t *global_work_offset, const size_t *global_work_size, const size_t *local_work_size, CCLEventWaitList *evt_wait_lst, void **args, CCLErr **err) |
Enqueues a program kernel function for execution on a device. More... | |
CCLDevice *const * | ccl_program_get_all_devices (CCLProgram *prg, CCLErr **err) |
Get all device wrappers in program. More... | |
CCLProgramBinary * | ccl_program_get_binary (CCLProgram *prg, CCLDevice *dev, CCLErr **err) |
Get the program binary object for the specified device. More... | |
CCLDevice * | ccl_program_get_device (CCLProgram *prg, cl_uint index, CCLErr **err) |
Get CCLDevice wrapper at given index. More... | |
CCLKernel * | ccl_program_get_kernel (CCLProgram *prg, const char *kernel_name, CCLErr **err) |
Get the kernel wrapper object for the given program kernel function. More... | |
cl_uint | ccl_program_get_num_devices (CCLProgram *prg, CCLErr **err) |
Return number of devices in program. More... | |
cl_uint | ccl_program_get_opencl_version (CCLProgram *prg, CCLErr **err) |
Get the OpenCL version of the platform associated with this program. More... | |
CCLProgram * | ccl_program_link (CCLContext *ctx, cl_uint num_devices, CCLDevice *const *devs, const char *options, cl_uint num_input_programs, CCLProgram **input_prgs, ccl_program_callback pfn_notify, void *user_data, CCLErr **err) |
Link a set of compiled programs and create an executable program wrapper. More... | |
CCLProgram * | ccl_program_new_from_binaries (CCLContext *ctx, cl_uint num_devices, CCLDevice *const *devs, CCLProgramBinary **bins, cl_int *binary_status, CCLErr **err) |
Create a new program wrapper object from a list of binary code strings executable on the given device list, one binary string per device. More... | |
CCLProgram * | ccl_program_new_from_binary (CCLContext *ctx, CCLDevice *dev, CCLProgramBinary *binary, cl_int *binary_status, CCLErr **err) |
Create a new program wrapper object from binary code executable on a specific device. More... | |
CCLProgram * | ccl_program_new_from_binary_file (CCLContext *ctx, CCLDevice *dev, const char *filename, cl_int *binary_status, CCLErr **err) |
Create a new program wrapper object from a file containing binary code executable on a specific device. More... | |
CCLProgram * | ccl_program_new_from_binary_files (CCLContext *ctx, cl_uint num_devices, CCLDevice *const *devs, const char **filenames, cl_int *binary_status, CCLErr **err) |
Create a new program wrapper object from files containing binary code executable on the given device list, one file per device. More... | |
CCLProgram * | ccl_program_new_from_built_in_kernels (CCLContext *ctx, cl_uint num_devices, CCLDevice *const *devs, const char *kernel_names, CCLErr **err) |
Create a new program wrapper object from device built-in kernels. More... | |
CCLProgram * | ccl_program_new_from_source (CCLContext *ctx, const char *string, CCLErr **err) |
Create a new program wrapper object from a null-terminated source string. More... | |
CCLProgram * | ccl_program_new_from_source_file (CCLContext *ctx, const char *filename, CCLErr **err) |
Create a new program wrapper object from a source file. More... | |
CCLProgram * | ccl_program_new_from_source_files (CCLContext *ctx, cl_uint count, const char **filenames, CCLErr **err) |
Create a new program wrapper object from several source files. More... | |
CCLProgram * | ccl_program_new_from_sources (CCLContext *ctx, cl_uint count, const char **strings, const size_t *lengths, CCLErr **err) |
Create a new program wrapper object from several source code strings. More... | |
CCLProgram * | ccl_program_new_wrap (cl_program program) |
Get the program wrapper for the given OpenCL program. More... | |
cl_bool | ccl_program_save_all_binaries (CCLProgram *prg, const char *file_prefix, const char *file_suffix, char ***filenames, CCLErr **err) |
Save the program binaries for all associated devices to files, one file per device. More... | |
cl_bool | ccl_program_save_binary (CCLProgram *prg, CCLDevice *dev, const char *filename, CCLErr **err) |
Save the program binary code for a specified device to a file. More... | |
Public Member Functions inherited from ccl_wrapper | |
CCLWrapperInfo * | ccl_wrapper_get_info (CCLWrapper *wrapper1, CCLWrapper *wrapper2, cl_uint param_name, size_t min_size, CCLInfo info_type, cl_bool use_cache, CCLErr **err) |
Get information about any wrapped OpenCL object. More... | |
size_t | ccl_wrapper_get_info_size (CCLWrapper *wrapper1, CCLWrapper *wrapper2, cl_uint param_name, size_t min_size, CCLInfo info_type, cl_bool use_cache, CCLErr **err) |
Get information size. More... | |
void * | ccl_wrapper_get_info_value (CCLWrapper *wrapper1, CCLWrapper *wrapper2, cl_uint param_name, size_t min_size, CCLInfo info_type, cl_bool use_cache, CCLErr **err) |
Get pointer to information value. More... | |
cl_bool | ccl_wrapper_memcheck () |
Debug function which checks if memory allocated by wrappers has been properly freed. More... | |
void | ccl_wrapper_ref (CCLWrapper *wrapper) |
Increase the reference count of the wrapper object. More... | |
int | ccl_wrapper_ref_count (CCLWrapper *wrapper) |
Returns the wrapper object reference count. More... | |
void * | ccl_wrapper_unwrap (CCLWrapper *wrapper) |
Get the wrapped OpenCL object. More... | |
Program wrapper class.
Definition at line 42 of file ccl_program_wrapper.c.