Trait ha_ndarray::Constant

source ·
pub trait Constant<T: CType>: PlatformInstance {
    type Buffer: BufferInstance<T>;

    // Required method
    fn constant(&self, value: T, size: usize) -> Result<Self::Buffer, Error>;
}
Expand description

Constructor for a new buffer filled with a single value

Required Associated Types§

source

type Buffer: BufferInstance<T>

The type of buffer use by this platform

Required Methods§

source

fn constant(&self, value: T, size: usize) -> Result<Self::Buffer, Error>

Construct a new buffer filled with a single value.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: CType> Constant<T> for Platform

§

type Buffer = Buffer<T>

source§

impl<T: CType> Constant<T> for Host

§

type Buffer = Buffer<T>

source§

impl<T: CType> Constant<T> for Heap

§

type Buffer = Vec<T>

source§

impl<T: CType> Constant<T> for Stack