[−][src]Struct tension::DeviceBuffer
Buffer that stores data on device. Wrapper over OpenCL buffer.
Implementations
impl<T: Prm + Interop> DeviceBuffer<T>
[src]
pub unsafe fn new_uninit(location: &DeviceLocation, len: usize) -> Self
[src]
Create uninitialzed buffer. This is unsafe method, but it is helpful for allocation of storage for some subsequent operation.
pub fn new_filled(location: &DeviceLocation, len: usize, value: T) -> Self
[src]
Create buffer filled with a single value.
pub fn len(&self) -> usize
[src]
Length of the buffer.
pub fn location(&self) -> DeviceLocation
[src]
DeviceLocation of the buffer.
pub fn queue(&self) -> &Queue
[src]
Default command queue for buffer.
pub fn load(&self, dst: &mut [T])
[src]
Loads data from buffer to slice.
pub fn store(&mut self, src: &[T])
[src]
Stores data from slice to buffer.
pub fn copy_from(&mut self, src: &Self)
[src]
Copies content to self
from another buffer.
pub fn copy_to(&self, dst: &mut Self)
[src]
Copies content from self
to another buffer.
pub fn copy_from_host(&mut self, src: &HostBuffer<T>)
[src]
Copies content to self
from host buffer.
pub fn copy_to_host(&self, dst: &mut HostBuffer<T>)
[src]
Copies content from self
to host buffer.
pub fn clone_to(&self, location: &DeviceLocation) -> Self
[src]
Creates a new buffer in a specified location and copies the content to it.
Trait Implementations
impl<T: Prm + Interop> Clone for DeviceBuffer<T>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for DeviceBuffer<T> where
<T as Interop>::Dev: RefUnwindSafe,
<T as Interop>::Dev: RefUnwindSafe,
impl<T> Send for DeviceBuffer<T> where
<T as Interop>::Dev: Send,
<T as Interop>::Dev: Send,
impl<T> Sync for DeviceBuffer<T> where
<T as Interop>::Dev: Sync,
<T as Interop>::Dev: Sync,
impl<T> Unpin for DeviceBuffer<T> where
<T as Interop>::Dev: Unpin,
<T as Interop>::Dev: Unpin,
impl<T> UnwindSafe for DeviceBuffer<T> where
<T as Interop>::Dev: UnwindSafe,
<T as Interop>::Dev: UnwindSafe,
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,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,