Module rust_cuda::safety

source ·

Traits§

  • Types whose in-memory bit representation on the CPU host is safe to copy to and read back on the GPU device while maintaining the same semantics, iff the type layout on the CPU matches the type layout on the GPU.
  • Types for which mutable references can be safely shared with each CUDA thread without breaking Rust’s no-mutable-aliasing memory safety guarantees.
  • Types which contain no pointers or references and can thus live entirely on the stack.