Struct parenchyma::Native
[−]
[src]
pub struct Native;
The native framework
Example
use parenchyma::{Backend, Native, SharedTensor}; let ref host: Backend = Backend::new::<Native>().unwrap(); let sh: SharedTensor = SharedTensor::with(host, [2, 2], vec![1., 2., 3., 4.]).unwrap(); let tensor = sh.read(host).unwrap(); println!("{:#?}", tensor);
Trait Implementations
impl Debug for Native
[src]
impl Framework for Native
[src]
const FRAMEWORK_NAME: &'static str = NATIVE
The name of the framework. Read more
fn available_hardware(&self) -> Vec<Hardware>
Returns the cached and available hardware.
impl<X> BoxContext<X> for Native where X: ExtensionPackage,
NativeContext<X>: Unsize<X::Extension>
[src]
NativeContext<X>: Unsize<X::Extension>
fn enclose(&self, _: Vec<Hardware>) -> Result<Box<Context<Package=X>>>
Create a context from a selection of hardware devices and then wrap it in a box.
impl TryDefault for Native
[src]
type Err = Error
The type returned in the event of an error.
fn try_default() -> Result<Native>
Returns the default value for a type.