Skip to main content

KernelArgument

Trait KernelArgument 

Source
pub unsafe trait KernelArgument {
    // Required method
    unsafe fn as_raw_arg(&self) -> &[u8] ⓘ;
}
Expand description

Types which can be passed as SYCL kernel arguments.

§Safety

A type implementing this trait must mirror the representation and alignment of the corresponding SYCL kernel argument structure.

Required Methods§

Source

unsafe fn as_raw_arg(&self) -> &[u8] ⓘ

Converts self to a raw byte representation.

§Safety

This function returns a reference to raw bytes. These bytes will be passed to FFI functions. The caller must make sure these functions respect Rust’s aliasing rules.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Pod, A: UsmAlloc> KernelArgument for &UsmBox<T, A>

Source§

impl<T: Pod, A: UsmAlloc> KernelArgument for &mut UsmBox<T, A>

Source§

impl<T: Pod, A: UsmAlloc> KernelArgument for UsmBox<T, A>

Source§

impl<T: Pod> KernelArgument for T