pub trait GPUArray: ArrayProtocol {
// Required methods
fn to_gpu(&self) -> CoreResult<Box<dyn GPUArray>>;
fn to_cpu(&self) -> CoreResult<Box<dyn ArrayProtocol>>;
fn is_on_gpu(&self) -> bool;
fn device_info(&self) -> HashMap<String, String>;
}
Expand description
Trait for arrays that can support GPU operations.
Required Methods§
Sourcefn to_gpu(&self) -> CoreResult<Box<dyn GPUArray>>
fn to_gpu(&self) -> CoreResult<Box<dyn GPUArray>>
Move the array to GPU.
Sourcefn to_cpu(&self) -> CoreResult<Box<dyn ArrayProtocol>>
fn to_cpu(&self) -> CoreResult<Box<dyn ArrayProtocol>>
Move the array from GPU to CPU.
Sourcefn device_info(&self) -> HashMap<String, String>
fn device_info(&self) -> HashMap<String, String>
Get information about the GPU device that holds this array.