Represents a compute kernel. Once created, kernels are executed on a compute device using one of the following methods: command_queue::enqueue_nd_range_kernel() command_queue::enqueue_task() See also: program, command_queue const program& const std::string& Creates a new kernel object from program with name. cl_kernel bool true Creates a new kernel object for kernel. If retain is true (the default) the reference count for kernel will be incremented. const kernel & Creates a new kernel object as a copy of other. kernel && Move-constructs a new kernel object from other. const kernel & Copies the kernel from other. kernel && Transfers the ownership of the kernel from other. Destroys the kernel object. std::string Returns the name of the kernel. size_t Returns the number of arguments that the kernel function expects. program Returns the program for the kernel. context Returns the context for the kernel. T cl_kernel_info Returns information about the kernel. For example, to get the name of the kernel (without using the name() method): std::string function_name = kernel.get_info<std::string>(CL_KERNEL_FUNCTION_NAME); void size_t size_t const void* Sets the argument at index to value with size. void size_t const T& Sets the argument at index to value. Converts the kernel object to a cl_kernel. This allows for kernel objects to be passed directly to functions expecting a cl_kernel argument: boost::compute::kernel kernel = ... cl_uint arity; clGetKernelInfo(kernel, CL_KERNEL_NUM_ARGS, sizeof(cl_uint), &arity, 0); std::cout << "arity = " << arity << std::endl;