pub struct Context(/* private fields */);Implementations§
source§impl Context
impl Context
pub fn pipeline( &self, name: &'static str ) -> Result<&ComputePipeline, TensorError>
pub fn request_shape_uniform(&self, shape: Shape) -> Arc<Buffer>
pub fn request_view_uniform(&self, view: View) -> Arc<Buffer>
source§impl<'a> Context
impl<'a> Context
pub fn zeros<T: Scalar, Tensor: TensorInit<'a, T>>( &self, shape: Shape ) -> Tensor
pub fn ones<T: Scalar, Tensor: TensorInit<'a, T>>(&self, shape: Shape) -> Tensor
pub fn tensor_from_data<T: Scalar, Tensor: TensorInit<'a, T>>( &self, shape: Shape, data: impl Into<Cow<'a, [T]>> ) -> Result<Tensor, TensorError>
pub fn tensor_init<T: Scalar, Tensor: TensorInit<'a, T>>( &self, shape: Shape ) -> Tensor
Trait Implementations§
source§impl PartialEq for Context
impl PartialEq for Context
impl Eq for Context
Auto Trait Implementations§
impl !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more