Trait blaze_rs::svm::SvmPointer
source · pub unsafe trait SvmPointer<T: ?Sized> {
type Context: Context;
// Required methods
fn allocator(&self) -> &Svm<Self::Context>;
fn as_ptr(&self) -> *const T;
fn as_mut_ptr(&mut self) -> *mut T;
fn len(&self) -> usize;
}Available on crate feature
svm only.Expand description
Object that wraps, in some way, a pointer to SVM memory
Safety
For an SvmPointer implementation to be safe, as_ptr and as_mut_ptr must return the same SVM-allocated pointer.
Required Associated Types§
Required Methods§
sourcefn as_mut_ptr(&mut self) -> *mut T
fn as_mut_ptr(&mut self) -> *mut T
Returns the mutable SVM pointer