pub trait KernelArgument {
    // Required method
    fn as_c_void(&self) -> *mut c_void;

    // Provided method
    fn shared_mem(&self) -> u32 { ... }
}
Expand description

Abstraction for kernel arguments.

Kernel arguments implement this trait, so that they can be converted it into the correct pointers needed by the actual kernel call.

Required Methods§

source

fn as_c_void(&self) -> *mut c_void

Converts into a C void pointer.

Provided Methods§

source

fn shared_mem(&self) -> u32

Returns the shared memory size. This is usally 0, except for LocalBuffers. This informations is used to allocate the memory correctly.

Implementations on Foreign Types§

source§

impl KernelArgument for i32

source§

impl KernelArgument for u32

Implementors§