pub trait IntTensorOps<B>where
B: Backend,{
Show 98 methods
// Required methods
fn int_empty(
shape: Shape,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive;
fn int_into_data(
tensor: <B as Backend>::IntTensorPrimitive,
) -> impl Future<Output = TensorData> + Send + 'static;
fn int_from_data(
data: TensorData,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive;
fn int_device(
tensor: &<B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::Device;
fn int_to_device(
tensor: <B as Backend>::IntTensorPrimitive,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive;
fn int_reshape(
tensor: <B as Backend>::IntTensorPrimitive,
shape: Shape,
) -> <B as Backend>::IntTensorPrimitive;
fn int_slice(
tensor: <B as Backend>::IntTensorPrimitive,
indices: &[Range<usize>],
) -> <B as Backend>::IntTensorPrimitive;
fn int_slice_assign(
tensor: <B as Backend>::IntTensorPrimitive,
indices: &[Range<usize>],
value: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn int_into_float(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn int_mask_where(
tensor: <B as Backend>::IntTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
source: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn int_mask_fill(
tensor: <B as Backend>::IntTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive;
fn int_gather(
dim: usize,
tensor: <B as Backend>::IntTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn int_scatter(
dim: usize,
tensor: <B as Backend>::IntTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn int_select(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn int_select_assign(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn int_equal(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive;
fn int_equal_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive;
fn int_greater(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive;
fn int_greater_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive;
fn int_greater_equal(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive;
fn int_greater_equal_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive;
fn int_lower(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive;
fn int_lower_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive;
fn int_lower_equal(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive;
fn int_lower_equal_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive;
fn int_add(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn int_add_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive;
fn int_sub(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn int_sub_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive;
fn int_mul(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn int_mul_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive;
fn int_div(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn int_div_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive;
fn int_remainder(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn int_remainder_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive;
fn int_zeros(
shape: Shape,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive;
fn int_ones(
shape: Shape,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive;
fn int_sum(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn int_sum_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive;
fn int_prod(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn int_prod_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive;
fn int_mean_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive;
fn int_argmax(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive;
fn int_argmin(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive;
fn int_abs(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn int_swap_dims(
tensor: <B as Backend>::IntTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <B as Backend>::IntTensorPrimitive;
fn int_permute(
tensor: <B as Backend>::IntTensorPrimitive,
axes: &[usize],
) -> <B as Backend>::IntTensorPrimitive;
fn int_flip(
tensor: <B as Backend>::IntTensorPrimitive,
axes: &[usize],
) -> <B as Backend>::IntTensorPrimitive;
fn int_random(
shape: Shape,
distribution: Distribution,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive;
fn int_expand(
tensor: <B as Backend>::IntTensorPrimitive,
shape: Shape,
) -> <B as Backend>::IntTensorPrimitive;
fn bitwise_and(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn bitwise_and_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive;
fn bitwise_or(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn bitwise_or_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive;
fn bitwise_xor(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn bitwise_xor_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive;
fn bitwise_not(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn bitwise_left_shift(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn bitwise_left_shift_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive;
fn bitwise_right_shift(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive;
fn bitwise_right_shift_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive;
// Provided methods
fn int_repeat_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
times: usize,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_cat(
tensors: Vec<<B as Backend>::IntTensorPrimitive>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_not_equal(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn int_not_equal_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn int_powi(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_powf(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_powi_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_powf_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: f32,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_clamp_min(
tensor: <B as Backend>::IntTensorPrimitive,
min: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_clamp_max(
tensor: <B as Backend>::IntTensorPrimitive,
max: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_clamp(
tensor: <B as Backend>::IntTensorPrimitive,
min: <B as Backend>::IntElem,
max: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_neg(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_full(
shape: Shape,
fill_value: <B as Backend>::IntElem,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_mean(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_max(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_max_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_max_dim_with_indices(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive) { ... }
fn int_max_abs(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_max_abs_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_min(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_min_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_min_dim_with_indices(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive) { ... }
fn int_transpose(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_narrow(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
start: usize,
length: usize,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_chunk(
tensor: <B as Backend>::IntTensorPrimitive,
chunks: usize,
dim: usize,
) -> Vec<<B as Backend>::IntTensorPrimitive> { ... }
fn int_split(
tensor: <B as Backend>::IntTensorPrimitive,
split_size: usize,
dim: usize,
) -> Vec<<B as Backend>::IntTensorPrimitive> { ... }
fn int_split_with_sizes(
tensor: <B as Backend>::IntTensorPrimitive,
split_sizes: Vec<usize>,
dim: usize,
) -> Vec<<B as Backend>::IntTensorPrimitive> { ... }
fn int_arange_step(
range: Range<i64>,
step: usize,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_arange(
range: Range<i64>,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_any(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn int_any_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn int_all(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn int_all_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive { ... }
fn int_sign(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_sort(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive { ... }
fn int_sort_with_indices(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
descending: bool,
) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive) { ... }
fn int_argsort(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive { ... }
}
Expand description
Int Tensor API for basic and numeric operations, see tensor for documentation on each function.
Required Methods§
Sourcefn int_empty(
shape: Shape,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_empty( shape: Shape, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_into_data(
tensor: <B as Backend>::IntTensorPrimitive,
) -> impl Future<Output = TensorData> + Send + 'static
fn int_into_data( tensor: <B as Backend>::IntTensorPrimitive, ) -> impl Future<Output = TensorData> + Send + 'static
Sourcefn int_from_data(
data: TensorData,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_from_data( data: TensorData, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_device(
tensor: &<B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::Device
fn int_device( tensor: &<B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::Device
Sourcefn int_to_device(
tensor: <B as Backend>::IntTensorPrimitive,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_to_device( tensor: <B as Backend>::IntTensorPrimitive, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Moves the tensor to the given device.
Sourcefn int_reshape(
tensor: <B as Backend>::IntTensorPrimitive,
shape: Shape,
) -> <B as Backend>::IntTensorPrimitive
fn int_reshape( tensor: <B as Backend>::IntTensorPrimitive, shape: Shape, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_slice(
tensor: <B as Backend>::IntTensorPrimitive,
indices: &[Range<usize>],
) -> <B as Backend>::IntTensorPrimitive
fn int_slice( tensor: <B as Backend>::IntTensorPrimitive, indices: &[Range<usize>], ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_slice_assign(
tensor: <B as Backend>::IntTensorPrimitive,
indices: &[Range<usize>],
value: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_slice_assign( tensor: <B as Backend>::IntTensorPrimitive, indices: &[Range<usize>], value: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_into_float(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn int_into_float( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Sourcefn int_mask_where(
tensor: <B as Backend>::IntTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
source: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_mask_where( tensor: <B as Backend>::IntTensorPrimitive, mask: <B as Backend>::BoolTensorPrimitive, source: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_mask_fill(
tensor: <B as Backend>::IntTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_mask_fill( tensor: <B as Backend>::IntTensorPrimitive, mask: <B as Backend>::BoolTensorPrimitive, value: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_gather(
dim: usize,
tensor: <B as Backend>::IntTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_gather( dim: usize, tensor: <B as Backend>::IntTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Gather elements from the tensor at the given indices.
§Arguments
dim
- The dimension to gather from.tensor
- The tensor.indices
- The indices.
Sourcefn int_scatter(
dim: usize,
tensor: <B as Backend>::IntTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_scatter( dim: usize, tensor: <B as Backend>::IntTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, value: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_select(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_select( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, indices: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_select_assign(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_select_assign( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, indices: <B as Backend>::IntTensorPrimitive, value: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_equal(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_equal( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn int_equal_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive
fn int_equal_elem( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn int_greater(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_greater( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn int_greater_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive
fn int_greater_elem( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn int_greater_equal(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_greater_equal( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn int_greater_equal_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive
fn int_greater_equal_elem( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn int_lower(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_lower( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn int_lower_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive
fn int_lower_elem( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn int_lower_equal(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_lower_equal( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn int_lower_equal_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive
fn int_lower_equal_elem( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn int_add(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_add( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_add_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_add_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_sub(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_sub( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_sub_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_sub_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_mul(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_mul( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_mul_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_mul_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_div(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_div( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_div_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_div_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_remainder(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_remainder( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_remainder_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_remainder_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_zeros(
shape: Shape,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_zeros( shape: Shape, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_ones(
shape: Shape,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_ones( shape: Shape, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_sum(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_sum( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_sum_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_sum_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_prod(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_prod( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_prod_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_prod_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_mean_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_mean_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_argmax(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_argmax( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_argmin(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_argmin( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_abs(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_abs( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_swap_dims(
tensor: <B as Backend>::IntTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_swap_dims( tensor: <B as Backend>::IntTensorPrimitive, dim1: usize, dim2: usize, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_permute(
tensor: <B as Backend>::IntTensorPrimitive,
axes: &[usize],
) -> <B as Backend>::IntTensorPrimitive
fn int_permute( tensor: <B as Backend>::IntTensorPrimitive, axes: &[usize], ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_flip(
tensor: <B as Backend>::IntTensorPrimitive,
axes: &[usize],
) -> <B as Backend>::IntTensorPrimitive
fn int_flip( tensor: <B as Backend>::IntTensorPrimitive, axes: &[usize], ) -> <B as Backend>::IntTensorPrimitive
Reverse the order of elements in a tensor along the given axes.
§Arguments
tensor
- The tensor to reverse.axes
- The axes to reverse.
The tensor with the elements reversed.
Sourcefn int_random(
shape: Shape,
distribution: Distribution,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_random( shape: Shape, distribution: Distribution, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_expand(
tensor: <B as Backend>::IntTensorPrimitive,
shape: Shape,
) -> <B as Backend>::IntTensorPrimitive
fn int_expand( tensor: <B as Backend>::IntTensorPrimitive, shape: Shape, ) -> <B as Backend>::IntTensorPrimitive
Broadcasts the int tensor
to the given shape
.
Sourcefn bitwise_and(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn bitwise_and( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Bitwise AND operation for Int Tensors
Sourcefn bitwise_and_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn bitwise_and_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Bitwise AND operation for Int Tensors with a scalar
Sourcefn bitwise_or(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn bitwise_or( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Bitwise OR operation for Int Tensors
Sourcefn bitwise_or_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn bitwise_or_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Bitwise OR operation for Int Tensors with a scalar
Sourcefn bitwise_xor(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn bitwise_xor( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Bitwise XOR operation for Int Tensors
Sourcefn bitwise_xor_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn bitwise_xor_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Bitwise XOR operation for Int Tensors with a scalar
Sourcefn bitwise_not(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn bitwise_not( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Bitwise NOT operation for Int Tensors
Sourcefn bitwise_left_shift(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn bitwise_left_shift( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Bitwise left shift operation for Int Tensors
Sourcefn bitwise_left_shift_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn bitwise_left_shift_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Bitwise left shift operation for Int Tensors with a scalar
Sourcefn bitwise_right_shift(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn bitwise_right_shift( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Bitwise right shift operation for Int Tensors
Sourcefn bitwise_right_shift_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn bitwise_right_shift_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Bitwise right shift operation for Int Tensors with a scalar
Provided Methods§
Sourcefn int_repeat_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
times: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_repeat_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, times: usize, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_cat(
tensors: Vec<<B as Backend>::IntTensorPrimitive>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_cat( tensors: Vec<<B as Backend>::IntTensorPrimitive>, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_not_equal(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_not_equal( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn int_not_equal_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive
fn int_not_equal_elem( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn int_powi(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_powi( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_powf(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_powf( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_powi_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_powi_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_powf_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: f32,
) -> <B as Backend>::IntTensorPrimitive
fn int_powf_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: f32, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_clamp_min(
tensor: <B as Backend>::IntTensorPrimitive,
min: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_clamp_min( tensor: <B as Backend>::IntTensorPrimitive, min: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_clamp_max(
tensor: <B as Backend>::IntTensorPrimitive,
max: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_clamp_max( tensor: <B as Backend>::IntTensorPrimitive, max: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_clamp(
tensor: <B as Backend>::IntTensorPrimitive,
min: <B as Backend>::IntElem,
max: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_clamp( tensor: <B as Backend>::IntTensorPrimitive, min: <B as Backend>::IntElem, max: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_neg(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_neg( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_full(
shape: Shape,
fill_value: <B as Backend>::IntElem,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_full( shape: Shape, fill_value: <B as Backend>::IntElem, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_mean(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_mean( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_max(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_max( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_max_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_max_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_max_dim_with_indices(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn int_max_dim_with_indices( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Sourcefn int_max_abs(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_max_abs( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_max_abs_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_max_abs_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_min(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_min( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_min_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_min_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_min_dim_with_indices(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn int_min_dim_with_indices( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Sourcefn int_transpose(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_transpose( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_narrow(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
start: usize,
length: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_narrow( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, start: usize, length: usize, ) -> <B as Backend>::IntTensorPrimitive
Returns a new tensor with the given dimension narrowed to the given range.
§Arguments
dim
- The dimension along which the tensor will be narrowed.start
- The starting point of the given range.length
- The ending point of the given range.
§Panics
- If the dimension is greater than the number of dimensions of the tensor.
- If the given range exceeds the number of elements on the given dimension.
§Returns
A new tensor with the given dimension narrowed to the given range.
Sourcefn int_chunk(
tensor: <B as Backend>::IntTensorPrimitive,
chunks: usize,
dim: usize,
) -> Vec<<B as Backend>::IntTensorPrimitive>
fn int_chunk( tensor: <B as Backend>::IntTensorPrimitive, chunks: usize, dim: usize, ) -> Vec<<B as Backend>::IntTensorPrimitive>
Sourcefn int_split(
tensor: <B as Backend>::IntTensorPrimitive,
split_size: usize,
dim: usize,
) -> Vec<<B as Backend>::IntTensorPrimitive>
fn int_split( tensor: <B as Backend>::IntTensorPrimitive, split_size: usize, dim: usize, ) -> Vec<<B as Backend>::IntTensorPrimitive>
Sourcefn int_split_with_sizes(
tensor: <B as Backend>::IntTensorPrimitive,
split_sizes: Vec<usize>,
dim: usize,
) -> Vec<<B as Backend>::IntTensorPrimitive>
fn int_split_with_sizes( tensor: <B as Backend>::IntTensorPrimitive, split_sizes: Vec<usize>, dim: usize, ) -> Vec<<B as Backend>::IntTensorPrimitive>
Sourcefn int_arange_step(
range: Range<i64>,
step: usize,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_arange_step( range: Range<i64>, step: usize, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_arange(
range: Range<i64>,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_arange( range: Range<i64>, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_any(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_any( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn int_any_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn int_any_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
Tests if any element in the int tensor
evaluates to True along a given dimension dim
.
§Arguments
tensor
- The tensor to test.dim
- The axis along which to test.
§Returns
A boolean tensor Tensor<B, D, Bool>
with the same size as input tensor
, except in the dim
axis
where the size is 1. The elem in the dim
axis is True if any element along this dim in the input
evaluates to True, False otherwise.
Sourcefn int_all(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_all( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Sourcefn int_all_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn int_all_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
Tests if all elements in the int tensor
evaluate to True along a given dimension dim
.
§Arguments
tensor
- The tensor to test.dim
- The axis along which to test.
§Returns
A boolean tensor Tensor<B, D, Bool>
with the same size as input tensor
, except in the dim
axis
where the size is 1. The elem in the dim
axis is True if all elements along this dim in the input
evaluates to True, False otherwise.
Sourcefn int_sign(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_sign( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sourcefn int_sort(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive
fn int_sort( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, descending: bool, ) -> <B as Backend>::IntTensorPrimitive
Sort the elements of the input tensor
by value along a given dimension.
This sort is unstable (i.e., may reorder equal elements).
§Arguments
tensor
- The input tensor.dim
- The axis along which to sort.descending
- The sorting order.
§Returns
A tensor with the same shape as the input tensor, where the elements are sorted by value.
Sourcefn int_sort_with_indices(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
descending: bool,
) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn int_sort_with_indices( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, descending: bool, ) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Sort the elements of the input tensor
by value along a given dimension.
This sort is unstable (i.e., may reorder equal elements).
§Arguments
tensor
- The input tensor.dim
- The axis along which to sort.
§Returns
A tensor with the same shape as the input tensor and corresponding indices, where the elements are sorted by value and the indices map back to the original input tensor.
Sourcefn int_argsort(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive
fn int_argsort( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, descending: bool, ) -> <B as Backend>::IntTensorPrimitive
Returns the indices that sort the elements of the input tensor
by value
along a given dimension.
This sort is unstable (i.e., may reorder equal elements).
§Arguments
tensor
- The input tensor.dim
- The axis along which to sort.descending
- The sorting order.
§Returns
A tensor with the same shape as the input tensor the indices map back to the original input tensor.
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.