pub trait TensorViewListAPI<T, B>where
B: DeviceRawAPI<T>,{
// Required method
fn view_list(
&self,
) -> Vec<TensorBase<Storage<DataRef<'_, <B as DeviceRawAPI<T>>::Raw>, T, B>, Vec<usize>>>;
}Expand description
Trait for list of tensor views.
Required Methods§
Sourcefn view_list(
&self,
) -> Vec<TensorBase<Storage<DataRef<'_, <B as DeviceRawAPI<T>>::Raw>, T, B>, Vec<usize>>>
fn view_list( &self, ) -> Vec<TensorBase<Storage<DataRef<'_, <B as DeviceRawAPI<T>>::Raw>, T, B>, Vec<usize>>>
Function to get a list of tensor views.
This is used to generalize functions that take multiple tensors as input. The input can be
- a slice of tensors (either owned or reference);
- a tuple of tensors (up to 9 elements).
Note that
- all tensors must have the same data type and backend;
- the dimension can be different, but will be converted to
IxD(dynamic dimension).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".