Type Definition blaze_rs::svm::SvmBox

source ·
pub type SvmBox<T, C = Global> = Box<T, Svm<C>>;
Available on crate feature svm only.
Expand description

A Box with an Svm allocator

Trait Implementations§

source§

impl<T: Sync, C: Context> KernelPointer<T> for SvmBox<[T], C>

source§

unsafe fn set_arg( &self, kernel: &mut RawKernel, wait: &mut Vec<RawEvent>, idx: u32 ) -> Result<()>

source§

fn complete(&self, event: &RawEvent) -> Result<()>

source§

impl<T: Sync, C: Context> KernelPointer<T> for SvmBox<T, C>

source§

unsafe fn set_arg( &self, kernel: &mut RawKernel, wait: &mut Vec<RawEvent>, idx: u32 ) -> Result<()>

source§

fn complete(&self, event: &RawEvent) -> Result<()>

source§

impl<T, C: Context> SvmPointer<T> for SvmBox<[T], C>

§

type Context = C

source§

fn allocator(&self) -> &Svm<C>

Returns a reference to the underlying Svm allocator
source§

fn as_ptr(&self) -> *const T

Returns the SVM pointer
source§

fn as_mut_ptr(&mut self) -> *mut T

Returns the mutable SVM pointer
source§

fn len(&self) -> usize

Returns the number of elements owned by the pointer
source§

impl<T: ?Sized, C: Context> SvmPointer<T> for SvmBox<T, C>

§

type Context = C

source§

fn allocator(&self) -> &Svm<C>

Returns a reference to the underlying Svm allocator
source§

fn as_ptr(&self) -> *const T

Returns the SVM pointer
source§

fn as_mut_ptr(&mut self) -> *mut T

Returns the mutable SVM pointer
source§

fn len(&self) -> usize

Returns the number of elements owned by the pointer