pub struct Bool;Expand description
A type-level representation of the kind of a bool tensor.
Trait Implementations§
source§impl<B> BasicAutodiffOps<B> for Boolwhere
B: AutodiffBackend,
impl<B> BasicAutodiffOps<B> for Boolwhere
B: AutodiffBackend,
source§fn inner<const D: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D>,
) -> <<Bool as BasicAutodiffOps<B>>::InnerKind as TensorKind<<B as AutodiffBackend>::InnerBackend>>::Primitive<D>
fn inner<const D: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D>, ) -> <<Bool as BasicAutodiffOps<B>>::InnerKind as TensorKind<<B as AutodiffBackend>::InnerBackend>>::Primitive<D>
Returns the inner tensor without the autodiff information. Read more
source§fn from_inner<const D: usize>(
inner: <<Bool as BasicAutodiffOps<B>>::InnerKind as TensorKind<<B as AutodiffBackend>::InnerBackend>>::Primitive<D>,
) -> <Bool as TensorKind<B>>::Primitive<D>
fn from_inner<const D: usize>( inner: <<Bool as BasicAutodiffOps<B>>::InnerKind as TensorKind<<B as AutodiffBackend>::InnerBackend>>::Primitive<D>, ) -> <Bool as TensorKind<B>>::Primitive<D>
Convert a tensor to the autodiff backend. Read more
source§impl<B> BasicOps<B> for Boolwhere
B: Backend,
impl<B> BasicOps<B> for Boolwhere
B: Backend,
source§fn empty<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <Bool as TensorKind<B>>::Primitive<D>
fn empty<const D: usize>( shape: Shape<D>, device: &<B as Backend>::Device, ) -> <Bool as TensorKind<B>>::Primitive<D>
Creates an empty tensor with the given shape. Read more
source§fn shape<const D: usize>(
tensor: &<Bool as TensorKind<B>>::Primitive<D>,
) -> Shape<D>
fn shape<const D: usize>( tensor: &<Bool as TensorKind<B>>::Primitive<D>, ) -> Shape<D>
Returns the shape of the tensor. Read more
source§fn reshape<const D1: usize, const D2: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D1>,
shape: Shape<D2>,
) -> <Bool as TensorKind<B>>::Primitive<D2>
fn reshape<const D1: usize, const D2: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D1>, shape: Shape<D2>, ) -> <Bool as TensorKind<B>>::Primitive<D2>
Reshapes the tensor. Read more
source§fn transpose<const D: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D>,
) -> <Bool as TensorKind<B>>::Primitive<D>
fn transpose<const D: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D>, ) -> <Bool as TensorKind<B>>::Primitive<D>
Transposes a tensor. Read more
source§fn swap_dims<const D: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D>,
dim1: usize,
dim2: usize,
) -> <Bool as TensorKind<B>>::Primitive<D>
fn swap_dims<const D: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D>, dim1: usize, dim2: usize, ) -> <Bool as TensorKind<B>>::Primitive<D>
Swaps two dimensions of a tensor. Read more
source§fn slice<const D1: usize, const D2: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D1>,
ranges: [Range<usize>; D2],
) -> <Bool as TensorKind<B>>::Primitive<D1>
fn slice<const D1: usize, const D2: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D1>, ranges: [Range<usize>; D2], ) -> <Bool as TensorKind<B>>::Primitive<D1>
Select tensor elements corresponding for the given ranges. Read more
source§fn slice_assign<const D1: usize, const D2: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D1>,
ranges: [Range<usize>; D2],
value: <Bool as TensorKind<B>>::Primitive<D1>,
) -> <Bool as TensorKind<B>>::Primitive<D1>
fn slice_assign<const D1: usize, const D2: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D1>, ranges: [Range<usize>; D2], value: <Bool as TensorKind<B>>::Primitive<D1>, ) -> <Bool as TensorKind<B>>::Primitive<D1>
Assigns the given value to the tensor elements corresponding for the given ranges. Read more
source§fn device<const D: usize>(
tensor: &<Bool as TensorKind<B>>::Primitive<D>,
) -> <B as Backend>::Device
fn device<const D: usize>( tensor: &<Bool as TensorKind<B>>::Primitive<D>, ) -> <B as Backend>::Device
Returns the device on which the tensor is allocated. Read more
source§fn to_device<const D: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D>,
device: &<B as Backend>::Device,
) -> <Bool as TensorKind<B>>::Primitive<D>
fn to_device<const D: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D>, device: &<B as Backend>::Device, ) -> <Bool as TensorKind<B>>::Primitive<D>
Moves the tensor to the given device. Read more
source§async fn into_data_async<const D: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D>,
) -> TensorData
async fn into_data_async<const D: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D>, ) -> TensorData
Extracts the data from the tensor asynchronously. Read more
source§fn from_data<const D: usize>(
data: TensorData,
device: &<B as Backend>::Device,
) -> <Bool as TensorKind<B>>::Primitive<D>
fn from_data<const D: usize>( data: TensorData, device: &<B as Backend>::Device, ) -> <Bool as TensorKind<B>>::Primitive<D>
Creates a tensor from the given data. Read more
source§fn repeat_dim<const D: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D>,
dim: usize,
times: usize,
) -> <Bool as TensorKind<B>>::Primitive<D>
fn repeat_dim<const D: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D>, dim: usize, times: usize, ) -> <Bool as TensorKind<B>>::Primitive<D>
Repeat the tensor along the given dimension. Read more
source§fn equal<const D: usize>(
lhs: <Bool as TensorKind<B>>::Primitive<D>,
rhs: <Bool as TensorKind<B>>::Primitive<D>,
) -> Tensor<B, D, Bool>
fn equal<const D: usize>( lhs: <Bool as TensorKind<B>>::Primitive<D>, rhs: <Bool as TensorKind<B>>::Primitive<D>, ) -> Tensor<B, D, Bool>
Equates the given tensors. Read more
source§fn not_equal<const D: usize>(
lhs: <Bool as TensorKind<B>>::Primitive<D>,
rhs: <Bool as TensorKind<B>>::Primitive<D>,
) -> Tensor<B, D, Bool>
fn not_equal<const D: usize>( lhs: <Bool as TensorKind<B>>::Primitive<D>, rhs: <Bool as TensorKind<B>>::Primitive<D>, ) -> Tensor<B, D, Bool>
Applies element-wise non-equality comparison between the given tensors. Read more
source§fn cat<const D: usize>(
vectors: Vec<<Bool as TensorKind<B>>::Primitive<D>>,
dim: usize,
) -> <Bool as TensorKind<B>>::Primitive<D>
fn cat<const D: usize>( vectors: Vec<<Bool as TensorKind<B>>::Primitive<D>>, dim: usize, ) -> <Bool as TensorKind<B>>::Primitive<D>
Concatenates the given tensors along the given dimension. Read more
source§fn any<const D: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D>,
) -> Tensor<B, 1, Bool>
fn any<const D: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D>, ) -> Tensor<B, 1, Bool>
Tests if any element in the
tensor evaluates to True. Read moresource§fn any_dim<const D: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D>,
dim: usize,
) -> Tensor<B, D, Bool>
fn any_dim<const D: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D>, dim: usize, ) -> Tensor<B, D, Bool>
Tests if any element in the tensor evaluates to True along a given dimension dim. Read more
source§fn all<const D: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D>,
) -> Tensor<B, 1, Bool>
fn all<const D: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D>, ) -> Tensor<B, 1, Bool>
Tests if all elements in the
tensor evaluate to True. Read moresource§fn all_dim<const D: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D>,
dim: usize,
) -> Tensor<B, D, Bool>
fn all_dim<const D: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D>, dim: usize, ) -> Tensor<B, D, Bool>
source§fn permute<const D: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D>,
axes: [usize; D],
) -> <Bool as TensorKind<B>>::Primitive<D>
fn permute<const D: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D>, axes: [usize; D], ) -> <Bool as TensorKind<B>>::Primitive<D>
Permutes the dimensions of a tensor. Read more
source§fn expand<const D1: usize, const D2: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D1>,
shape: Shape<D2>,
) -> <Bool as TensorKind<B>>::Primitive<D2>
fn expand<const D1: usize, const D2: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D1>, shape: Shape<D2>, ) -> <Bool as TensorKind<B>>::Primitive<D2>
Broadcasts the given tensor to the specified shape. Read more
source§fn flip<const D: usize>(
tensor: <Bool as TensorKind<B>>::Primitive<D>,
axes: &[usize],
) -> <Bool as TensorKind<B>>::Primitive<D>
fn flip<const D: usize>( tensor: <Bool as TensorKind<B>>::Primitive<D>, axes: &[usize], ) -> <Bool as TensorKind<B>>::Primitive<D>
Flips the tensor along the given axes. Read more
source§fn elem_type_name() -> &'static str
fn elem_type_name() -> &'static str
Returns the name of the element type.
Auto Trait Implementations§
impl Freeze for Bool
impl RefUnwindSafe for Bool
impl Send for Bool
impl Sync for Bool
impl Unpin for Bool
impl UnwindSafe for Bool
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more