Struct opencl3::kernel::Kernel[][src]

pub struct Kernel { /* fields omitted */ }
Expand description

An OpenCL kernel object.
Implements the Drop trait to call release_kernel when the object is dropped.

Implementations

Create a Kernel from an OpenCL cl_kernel.

  • kernel - a valid OpenCL cl_kernel.

returns a Result containing the new Kernel or the error code from the OpenCL C API function to get the number of kernel arguments.

Get the underlying OpenCL cl_kernel.

Create a Kernel from an OpenCL Program.

  • program - a built OpenCL Program.
  • name - the name of the OpenCL kernel.

returns a Result containing the new Kernel or the error code from the OpenCL C API function to get the number of kernel arguments.

Set the argument value for a specific argument of a kernel.

  • arg_index - the kernel argument index.
  • arg - a reference to the data for the argument at arg_index.

returns an empty Result or the error code from the OpenCL C API function.

Create a local memory buffer for a specific argument of a kernel.

  • arg_index - the kernel argument index.
  • size - the size of the local memory buffer in bytes.

returns an empty Result or the error code from the OpenCL C API function.

Set set a SVM pointer as the argument value for a specific argument of a kernel.

  • arg_index - the kernel argument index.
  • arg_ptr - the SVM pointer to the data for the argument at arg_index.

returns an empty Result or the error code from the OpenCL C API function.

Pass additional information other than argument values to a kernel.

  • param_name - the information to be passed to kernel, see: Kernel Execution Properties.
  • param_ptr - pointer to the data for the param_name.

returns an empty Result or the error code from the OpenCL C API function.

Get data about an OpenCL kernel. Calls clGetKernelInfo to get the desired data about the kernel.

Get data about arguments of an OpenCL kernel. Calls clGetKernelArgInfo to get the desired data about arguments of the kernel.

Get data about work groups of an OpenCL kernel. Calls clGetKernelArgInfo to get the desired data about work groups of the kernel.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.