Enum collenchyma::memory::MemoryType
[−]
[src]
pub enum MemoryType { Native(FlatBox), OpenCL(OpenCLMemory), Cuda(CudaMemory), }
Container for all known IMemory implementations
Variants
Native(FlatBox)
A Native Memory representation.
OpenCL(OpenCLMemory)
A OpenCL Memory representation.
Cuda(CudaMemory)
A Cuda Memory representation.
Methods
impl MemoryType
[src]
fn as_native(&self) -> Option<&FlatBox>
Extract the FlatBox if MemoryType is Native.
fn as_mut_native(&mut self) -> Option<&mut FlatBox>
Extract the FlatBox mutably if MemoryType is Native.
fn into_native(self) -> Option<FlatBox>
Consumes the Memory and returns an owned OpenCL Memory.
fn as_opencl(&self) -> Option<&OpenCLMemory>
Extract the OpenCL Memory if MemoryType is OpenCL.
fn as_mut_opencl(&mut self) -> Option<&mut OpenCLMemory>
Extract the OpenCL Memory mutably if MemoryType is OpenCL.
fn into_opencl(self) -> Option<OpenCLMemory>
Consumes the Memory and returns an owned OpenCL Memory.
fn as_cuda(&self) -> Option<&CudaMemory>
Extract the Cuda Memory if MemoryType is Cuda
fn as_mut_cuda(&mut self) -> Option<&mut CudaMemory>
Extract the Cuda Memory mutably if MemoryType is Cuda
fn into_cuda(self) -> Option<CudaMemory>
Consumes the Memory and returns an owned Cuda Memory.