Struct ocl::Kernel [] [src]

pub struct Kernel { /* fields omitted */ }

A kernel which represents a 'procedure'.

Corresponds to code which must have already been compiled into a program.

Clonability

Cloning a kernel after creation should virtually never be necessary (and may indicate that your design needs improvement). If you really really need to clone and store something, clone the kernel core with ::core_as_ref.clone() and use ocl::core::enqueue_kernel(...) to enqueue.

TODO: Add more details, examples, etc. TODO: Add information about panics and errors. TODO: Finish arg info formatting.

Methods

impl Kernel
[src]

Returns a new kernel.

Sets the default global work offset (builder-style).

Used when enqueuing kernel commands. Superseded if specified while making a call to enqueue or building a queue command with ::cmd.

Sets the default global work size (builder-style).

Used when enqueuing kernel commands. Superseded if specified while making a call to enqueue or building a queue command with ::cmd.

Sets the default local work size (builder-style).

Used when enqueuing kernel commands. Superseded if specified while making a call to enqueue or building a queue command with ::cmd.

Adds a new argument to the kernel specifying the buffer object represented by 'buffer' (builder-style). Argument is added to the bottom of the argument order.

Adds a new argument to the kernel specifying the image object represented by 'image' (builder-style). Argument is added to the bottom of the argument order.

Adds a new argument to the kernel specifying the sampler object represented by 'sampler' (builder-style). Argument is added to the bottom of the argument order.

Adds a new argument specifying the value: scalar (builder-style). Argument is added to the bottom of the argument order.

Adds a new argument specifying the value: vector (builder-style). Argument is added to the bottom of the argument order.

Adds a new argument specifying the allocation of a local variable of size length * sizeof(T) bytes (builder_style).

Local variables are used to share data between work items in the same workgroup.

Adds a new named argument (in order) specifying the value: scalar (builder-style).

Named arguments can be easily modified later using ::set_arg_scl_named().

Adds a new named argument (in order) specifying the value: vector (builder-style).

Named arguments can be easily modified later using ::set_arg_vec_named().

Adds a new named argument specifying the buffer object represented by 'buffer' (builder-style). Argument is added to the bottom of the argument order.

Named arguments can be easily modified later using ::set_arg_buf_named().

Adds a new named argument specifying the image object represented by 'image' (builder-style). Argument is added to the bottom of the argument order.

Named arguments can be easily modified later using ::set_arg_img_named().

Adds a new named argument specifying the sampler object represented by 'sampler' (builder-style). Argument is added to the bottom of the argument order.

Named arguments can be easily modified later using ::set_arg_smp_named().

Modifies the kernel argument named: name.

Panics [FIXME]

Modifies the kernel argument named: name.

Panics [FIXME]

Modifies the kernel argument named: name.

Panics [FIXME]

Modifies the kernel argument named: name.

Panics [FIXME]

Sets the value of a named sampler argument.

Panics [FIXME]

Returns a command builder which is used to chain parameters of an 'enqueue' command together.

Enqueues this kernel on the default queue and returns the result.

Shorthand for .cmd().enq()

Changes the default queue.

Returns a ref for chaining i.e.:

kernel.set_default_queue(queue).enqueue(....);

Even when used as above, the queue is changed permanently, not just for the one call. Changing the queue is cheap so feel free to change as often as needed.

If you want to change the queue for only a single call, use: ::cmd.queue(...)...enq()...

The new queue must be associated with a device associated with the kernel's program.

Returns the default core::CommandQueue for this kernel.

Returns the default global work offset.

Returns the default global work size.

Returns the default local work size.

Returns the number of arguments specified for this kernel.

Returns a reference to the core pointer wrapper, usable by functions in the core module.

Returns information about this kernel.

Returns argument information for this kernel.

Returns work group information for this kernel.

Methods from Deref<Target=KernelCore>

Returns a pointer, do not store it.

Returns the program associated with this kernel.

Trait Implementations

impl Debug for Kernel
[src]

Formats the value using the given formatter.

impl Display for Kernel
[src]

Formats the value using the given formatter.

impl Deref for Kernel
[src]

The resulting type after dereferencing

The method called to dereference a value

impl DerefMut for Kernel
[src]

The method called to mutably dereference a value