pub trait TensorIndexing {
// Required methods
fn gather(
&mut self,
operand: &Tensor,
start_indices: &Tensor,
config: &GatherConfig,
) -> Result<Tensor>;
fn scatter(
&mut self,
operand: &Tensor,
scatter_indices: &Tensor,
updates: &Tensor,
config: &ScatterConfig,
) -> Result<Tensor>;
fn slice(&mut self, input: &Tensor, config: &SliceConfig) -> Result<Tensor>;
fn dynamic_slice(
&mut self,
input: &Tensor,
starts: &Tensor,
slice_sizes: &[usize],
) -> Result<Tensor>;
fn dynamic_update_slice(
&mut self,
operand: &Tensor,
update: &Tensor,
starts: &Tensor,
) -> Result<Tensor>;
fn pad(&mut self, input: &Tensor, config: &PadConfig) -> Result<Tensor>;
fn concatenate(&mut self, inputs: &[&Tensor], axis: usize) -> Result<Tensor>;
fn reverse(&mut self, input: &Tensor, axes: &[usize]) -> Result<Tensor>;
}Expand description
Indexing, slicing, and padding operations.
§Examples
use tenferro_tensor::TensorIndexing;
fn accepts_indexing<B: TensorIndexing>(_backend: &mut B) {}