mlx_rs::ops::indexing

Trait IndexOp

Source
pub trait IndexOp<Idx>: TryIndexOp<Idx> {
    // Provided methods
    fn index_device(&self, i: Idx, stream: impl AsRef<Stream>) -> Array { ... }
    fn index(&self, i: Idx) -> Array { ... }
}
Expand description

Trait for custom indexing operations.

This is implemented for all types that implement TryIndexOp.

Provided Methods§

Source

fn index_device(&self, i: Idx, stream: impl AsRef<Stream>) -> Array

Index the array with the given index.

Source

fn index(&self, i: Idx) -> Array

Index the array with the given index.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, Idx> IndexOp<Idx> for T
where T: TryIndexOp<Idx>,