pub struct ArgVal<'a> { /* private fields */ }
Expand description
Implementations§
Source§impl<'a> ArgVal<'a>
impl<'a> ArgVal<'a>
Sourcepub fn sampler(sampler: &'a Sampler) -> ArgVal<'a>
pub fn sampler(sampler: &'a Sampler) -> ArgVal<'a>
Returns a new ArgVal
referring to a Sampler
object.
Sourcepub fn sampler_null() -> ArgVal<'a>
pub fn sampler_null() -> ArgVal<'a>
Returns a new ArgVal
referring to a null Sampler
object.
Sourcepub fn primitive<T>(prm: &'a T) -> ArgVal<'a>where
T: OclPrm,
pub fn primitive<T>(prm: &'a T) -> ArgVal<'a>where
T: OclPrm,
Returns a new ArgVal
referring to a scalar or vector primitive.
Sourcepub fn scalar<T>(scalar: &'a T) -> ArgVal<'a>where
T: OclPrm,
pub fn scalar<T>(scalar: &'a T) -> ArgVal<'a>where
T: OclPrm,
Returns a new ArgVal
referring to a scalar primitive.
Sourcepub fn vector<T>(vector: &'a T) -> ArgVal<'a>where
T: OclPrm,
pub fn vector<T>(vector: &'a T) -> ArgVal<'a>where
T: OclPrm,
Returns a new ArgVal
referring to a vector primitive.
Sourcepub fn local<T>(length: &usize) -> ArgVal<'a>where
T: OclPrm,
pub fn local<T>(length: &usize) -> ArgVal<'a>where
T: OclPrm,
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()
).
Sourcepub unsafe fn from_raw(
size: size_t,
value: *const c_void,
is_mem: bool,
) -> ArgVal<'a>
pub unsafe fn from_raw( size: size_t, value: *const c_void, is_mem: bool, ) -> ArgVal<'a>
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.
Sourcepub fn as_raw(&self) -> (size_t, *const c_void)
pub fn as_raw(&self) -> (size_t, *const c_void)
Returns the size (in bytes) and raw pointer to the contained kernel argument value.
Sourcepub fn is_mem_null(&self) -> bool
pub fn is_mem_null(&self) -> bool
Returns true
if this ArgVal
represents a null Mem
or Sampler
object.