Trait cudarc::driver::safe::DeviceRepr
source · pub unsafe trait DeviceRepr {
// Provided method
fn as_kernel_param(&self) -> *mut c_void { ... }
}
Expand description
Something that can be copied to device memory and turned into a parameter for result::launch_kernel.
§Safety
This is unsafe because a struct should likely
be #[repr(C)]
to be represented in cuda memory,
and not all types are valid.