Skip to main content

Crate baracuda_types_derive

Crate baracuda_types_derive 

Source
Expand description

Proc-macros for baracuda-types: #[derive(DeviceRepr)].

#[derive(KernelArg)] is deliberately not provided: KernelArg is already implemented for &T where T: DeviceRepr via a blanket impl, so deriving DeviceRepr is sufficient for a type to be usable as a kernel argument via &my_value.

Derive Macros§

DeviceRepr
#[derive(DeviceRepr)] — implement baracuda_types::DeviceRepr for a #[repr(C)] or #[repr(transparent)] struct whose fields are all DeviceRepr. Enums and unions are rejected (use a #[repr(C)] struct).