[−][src]Struct opencl3::memory::Buffer
An OpenCL buffer.
Implements the Drop trait to call release_mem_object when the object is dropped.
Implementations
impl Buffer
[src]
pub fn new(buffer: cl_mem) -> Buffer
[src]
pub fn create<T>(
context: &Context,
flags: cl_mem_flags,
count: size_t,
host_ptr: *mut c_void
) -> Result<Buffer, cl_int>
[src]
context: &Context,
flags: cl_mem_flags,
count: size_t,
host_ptr: *mut c_void
) -> Result<Buffer, cl_int>
Create a Buffer for a context.
context
- a valid OpenCL context.flags
- a bit-field used to specify allocation and usage information about the image memory object being created, see: Memory Flags.count
- the number of T objects to be allocated.host_ptr
- a pointer to the buffer data that may already be allocated by the application.
returns a Result containing the new OpenCL buffer object or the error code from the OpenCL C API function.
pub fn create_sub_buffer(
&self,
flags: cl_mem_flags,
buffer_create_type: cl_buffer_create_type,
buffer_create_info: *const c_void
) -> Result<Buffer, cl_int>
[src]
&self,
flags: cl_mem_flags,
buffer_create_type: cl_buffer_create_type,
buffer_create_info: *const c_void
) -> Result<Buffer, cl_int>
Create an new OpenCL buffer object from an existing buffer object.
flags
- a bit-field used to specify allocation and usage information about the sub-buffer memory object being created, see: Memory Flags.buffer_create_type
,buffer_create_info
- describe the type of buffer object to be created, see: SubBuffer Attributes.
returns a Result containing the new OpenCL buffer object or the error code from the OpenCL C API function.
pub fn get(&self) -> cl_mem
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Buffer
[src]
impl !Send for Buffer
[src]
impl !Sync for Buffer
[src]
impl Unpin for Buffer
[src]
impl UnwindSafe for Buffer
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,