Struct blaze_rs::core::RawPipe

source ·
#[repr(transparent)]
pub struct RawPipe(_);
Available on crate feature cl2 only.

Implementations§

source§

impl RawPipe

source

pub fn new( access: MemAccess, host_access: bool, packet_size: u32, max_packets: u32 ) -> Result<Self>

source

pub fn new_in( ctx: &RawContext, access: MemAccess, host_access: bool, packet_size: u32, max_packets: u32 ) -> Result<Self>

source

pub fn packet_size(&self) -> Result<NonZeroU32>

Return pipe packet size specified when pipe is created.

source

pub fn max_packets(&self) -> Result<NonZeroU32>

Return max. number of packets specified when pipe is created.

Methods from Deref<Target = RawMemObject>§

source

pub unsafe fn retain(&self) -> Result<()>

source

pub fn id(&self) -> cl_mem

source

pub fn id_ref(&self) -> &cl_mem

source

pub fn id_ref_mut(&mut self) -> &mut cl_mem

source

pub fn ty(&self) -> Result<MemObjectType>

Returns the memory obejct’s type

source

pub fn associated_memobject(&self) -> Result<Option<RawMemObject>>

Available on crate feature cl1_1 only.

Return memory object from which memobj is created.

source

pub fn flags(&self) -> Result<MemFlags>

Return the flags argument value specified when memobj is created.

source

pub fn size(&self) -> Result<usize>

Return actual size of the data store associated with memobj in bytes.

source

pub fn host_ptr(&self) -> Result<Option<NonNull<c_void>>>

If memobj is created with a host_ptr specified, return the host_ptr argument value specified when memobj is created.

source

pub fn map_count(&self) -> Result<u32>

Map count. The map count returned should be considered immediately stale. It is unsuitable for general use in applications. This feature is provided for debugging.

source

pub fn reference_count(&self) -> Result<u32>

Return memobj reference count. The reference count returned should be considered immediately stale. It is unsuitable for general use in applications. This feature is provided for identifying memory leaks.

source

pub fn context(&self) -> Result<RawContext>

Return context specified when memory object is created.

source

pub fn offset(&self) -> Result<usize>

Available on crate feature cl1_1 only.

Return offset if memobj is a sub-buffer object created using create_sub_buffer. Returns 0 if memobj is not a subbuffer object.

source

pub fn uses_svm_pointer(&self) -> Result<bool>

Return true if memobj is a buffer object that was created with CL_MEM_USE_HOST_PTR or is a sub-buffer object of a buffer object that was created with CL_MEM_USE_HOST_PTR and the host_ptr specified when the buffer object was created is a SVM pointer; otherwise returns false.

source

pub fn on_destruct(&self, f: impl 'static + FnOnce() + Send) -> Result<()>

Available on crate feature cl1_1 only.

Adds a callback to be executed when the memory object is destructed by OpenCL.

source

pub fn on_destruct_boxed(&self, f: Box<dyn FnOnce() + Send>) -> Result<()>

Available on crate feature cl1_1 only.
source

pub unsafe fn on_destruct_raw( &self, f: unsafe extern "C" fn(memobj: cl_mem, user_data: *mut c_void), user_data: *mut c_void ) -> Result<()>

Available on crate feature cl1_1 only.

Trait Implementations§

source§

impl Clone for RawPipe

source§

fn clone(&self) -> RawPipe

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RawPipe

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for RawPipe

§

type Target = RawMemObject

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for RawPipe

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl Hash for RawPipe

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<RawPipe> for RawPipe

source§

fn eq(&self, other: &RawPipe) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for RawPipe

source§

impl StructuralEq for RawPipe

source§

impl StructuralPartialEq for RawPipe

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> AsMem for Twhere T: Deref<Target = impl AsMem + 'static>,

source§

impl<T> AsMutMem for Twhere T: DerefMut<Target = impl AsMutMem + 'static>,

source§

fn as_mut_mem(&mut self) -> &mut RawMemObject

source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.