pub enum HostPtr {
Use,
Other(bool, bool),
}Variants§
Implementations§
source§impl HostPtr
impl HostPtr
pub const NONE: Self = _
sourcepub const USE: Self = Self::Use
pub const USE: Self = Self::Use
This flag is valid only if host_ptr is not NULL. If specified, it indicates that the application wants the OpenCL implementation to use memory referenced by host_ptr as the storage bits for the memory object.
sourcepub const ALLOC: Self = _
pub const ALLOC: Self = _
This flag specifies that the application wants the OpenCL implementation to allocate memory from host accessible memory.
sourcepub const COPY: Self = _
pub const COPY: Self = _
This flag is valid only if host_ptr is not NULL. If specified, it indicates that the application wants the OpenCL implementation to allocate memory for the memory object and copy the data from memory referenced by host_ptr.
sourcepub const ALLOC_COPY: Self = _
pub const ALLOC_COPY: Self = _
ALLOC and COPY combined
pub const fn new(alloc: bool, copy: bool) -> Self
pub const fn is_use(&self) -> bool
pub const fn is_alloc(&self) -> bool
pub const fn is_copy(&self) -> bool
pub const fn from_bits(flags: cl_mem_flags) -> Self
pub const fn to_bits(self) -> cl_mem_flags
Trait Implementations§
source§impl PartialEq<HostPtr> for HostPtr
impl PartialEq<HostPtr> for HostPtr
impl Copy for HostPtr
impl Eq for HostPtr
impl StructuralEq for HostPtr
impl StructuralPartialEq for HostPtr
Auto Trait Implementations§
impl RefUnwindSafe for HostPtr
impl Send for HostPtr
impl Sync for HostPtr
impl Unpin for HostPtr
impl UnwindSafe for HostPtr
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more