Struct ocl::enums::ArgVal [] [src]

pub struct ArgVal<'a> { /* fields omitted */ }

A reference to a kernel argument value.

Example:

This example is not tested
let kernel = core::create_kernel(&program, "multiply")?;
core::set_kernel_arg(&kernel, 0, ArgVal::scalar(&10.0f32))?;
core::set_kernel_arg(&kernel, 1, ArgVal::mem(&buffer))?;

Methods

impl<'a> ArgVal<'a>
[src]

[src]

Returns a new ArgVal referring to a Mem object.

[src]

Returns a new ArgVal corresponding to a null Mem object.

[src]

Returns a new ArgVal referring to a Sampler object.

[src]

Returns a new ArgVal referring to a null Sampler object.

[src]

Returns a new ArgVal referring to a scalar or vector primitive.

[src]

Returns a new ArgVal referring to a scalar primitive.

[src]

Returns a new ArgVal referring to a vector primitive.

[src]

Returns a new ArgVal corresponding to a __local argument.

To specify a __local argument size in bytes, use ::raw instead (with value: std::ptr::null()).

[src]

Returns a new ArgVal containing the size in bytes and a raw pointer to the argument value.

Safety

Caller must ensure that the value pointed to by value lives until the call to ::set_kernel_arg returns and that size accurately reflects the total number of bytes that should be read.

[src]

Returns the size (in bytes) and raw pointer to the contained kernel argument value.

[src]

Returns true if this ArgVal represents a null Mem or Sampler object.

Trait Implementations

impl<'a> Clone for ArgVal<'a>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for ArgVal<'a>
[src]

[src]

Formats the value using the given formatter. Read more