Pipe

Struct Pipe 

Source
pub struct Pipe { /* private fields */ }
Expand description

An OpenCL pipe.
Has methods to return information from calls to clGetPipeInfo with the appropriate parameters.
Implements the Drop trait to call release_mem_object when the object is dropped.

Implementations§

Source§

impl Pipe

Source

pub const fn new(pipe: cl_mem) -> Self

Source

pub unsafe fn create( context: &Context, flags: cl_mem_flags, pipe_packet_size: cl_uint, pipe_max_packets: cl_uint, ) -> Result<Self>

Source

pub fn pipe_packet_size(&self) -> Result<cl_uint>

Source

pub fn pipe_max_packets(&self) -> Result<cl_uint>

Source

pub fn pipe_properties(&self) -> Result<Vec<intptr_t>>

Source

pub fn get_data(&self, param_name: cl_pipe_info) -> Result<Vec<u8>>

Get data about an OpenCL pipe object.
Calls clGetPipeInfo to get the desired information about the pipe object.

Trait Implementations§

Source§

impl ClMem for Pipe

Source§

fn get(&self) -> cl_mem

Source§

fn get_mut(&mut self) -> cl_mem

Source§

fn mem_type(&self) -> Result<cl_mem_object_type>

Source§

fn flags(&self) -> Result<cl_mem_flags>

Source§

fn size(&self) -> Result<size_t>

Source§

fn host_ptr(&self) -> Result<intptr_t>

Source§

fn map_count(&self) -> Result<cl_uint>

Source§

fn reference_count(&self) -> Result<cl_uint>

Source§

fn context(&self) -> Result<cl_context>

Source§

fn associated_memobject(&self) -> Result<cl_mem>

Source§

fn offset(&self) -> Result<size_t>

Source§

fn uses_svm_pointer(&self) -> Result<cl_uint>

Source§

fn properties(&self) -> Result<Vec<cl_ulong>>

CL_VERSION_3_0
Source§

fn get_mem_data(&self, param_name: cl_mem_info) -> Result<Vec<u8>>

Get memory data about an OpenCL memory object. Calls clGetMemObjectInfo to get the desired data about the memory object.
Source§

fn gl_object_info(&self) -> Result<(cl_GLuint, cl_GLuint)>

Query an OpenGL object used to create an OpenCL memory object. Read more
Source§

impl Debug for Pipe

Source§

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

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

impl Drop for Pipe

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl From<*mut c_void> for Pipe

Source§

fn from(pipe: cl_mem) -> Self

Converts to this type from the input type.
Source§

impl From<Pipe> for cl_mem

Source§

fn from(value: Pipe) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Pipe

§

impl RefUnwindSafe for Pipe

§

impl !Send for Pipe

§

impl !Sync for Pipe

§

impl Unpin for Pipe

§

impl UnwindSafe for Pipe

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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.

Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.