Derive Macro rust_cuda_derive::LendRustToCuda

source ·
#[derive(LendRustToCuda)]
{
    // Attributes available to this derive:
    #[cuda]
}
Expand description

Provides the #[derive(LendRustToCuda) derive macro for the rust_cuda::lend::RustToCuda utility trait, which enables the usage of the rust_cuda::lend::LendToCuda trait that allows Rust data structures to be shared with CUDA kernels.

At the moment, only structs are supported by this derive macro.

The derive also accepts a #[cuda(...)] attribute. You can annotate the entire struct with the #[cuda(...)] to configure the implementation as follows:

Additionally, the #[cuda(...)] attribute can also be applied individually to the fields of the struct to customise the implementation as follows: