Module internal

Module internal 

Source
Expand description

This prelude is meant for code extending tract (like implementing new ops).

Re-exports§

pub use crate::axes::AxesMapping;
pub use crate::axes::Axis;
pub use crate::ops::element_wise::ElementWiseMiniOp;
pub use crate::ops::Cost;
pub use crate::ops::EvalOp;
pub use crate::ops::FrozenOpState;
pub use crate::ops::Op;
pub use crate::ops::OpState;
pub use crate::ops::Validation;
pub use crate::plan::SessionState;
pub use crate::plan::SessionStateHandler;
pub use crate::runtime::DefaultRuntime;
pub use crate::runtime::Runnable;
pub use crate::runtime::Runtime;
pub use crate::runtime::State;
pub use downcast_rs as tract_downcast_rs;
pub use crate::model::*;
pub use crate::ops::change_axes::*;
pub use crate::prelude::*;

Modules§

num_integer
Integer trait and functions.
tract_itertools
Extra iterator adaptors, functions and macros.
tract_ndarray
The ndarray crate provides an n-dimensional container for general elements and for numerics.
tract_num_traits
Numeric traits for generic mathematics
tract_smallvec
Small vectors in various sizes. These store a certain number of elements inline, and fall back to the heap for larger allocations. This can be a useful optimization for improving cache locality and reducing allocator traffic for workloads that fit within the inline buffer.

Macros§

anyhow
Construct an ad-hoc error from a string or existing non-anyhow error value.
args_1
args_2
args_3
args_4
args_5
args_6
args_7
args_8
as_op
bail
Return early with an error.
bin_to_super_type
dims
dispatch_copy
dispatch_copy_by_size
dispatch_datum
dispatch_datum_by_size
dispatch_floatlike
dispatch_hash
dispatch_numbers
dispatch_signed
element_wise
element_wise_oop
ensure
Return early with an error if a condition is not satisfied.
format_err
Construct an ad-hoc error from a string or existing non-anyhow error value.
impl_op_same_as
not_a_typed_op
op_as_typed_op
tvec

Structs§

Blob
HashMap
A hash map implemented with quadratic probing and SIMD lookup.
Opaque
PhantomData
Zero-sized type used to mark things that “act like” they own a T.
Symbol
SymbolScope
SymbolValues
Tensor
Tensor is a concrete tensor in tract.
TensorView
f16
A 16-bit floating point type implementing the IEEE 754-2008 standard binary16 a.k.a “half” format.

Enums§

Approximation
Cow
A clone-on-write smart pointer.
DatumType
GeometryBound
QParams
TDim

Traits§

ClampCast
Datum
DimLike
A super-trait for value acting as tensor dimensions in tract.
Hash
A hashable type.
IntoArcTensor
Convenient conversion to Arc.
IntoTensor
Convenient conversion to Tensor.
OpaqueFact
OpaquePayload
ResolveTo
ToDim
Convenience trait to convert values to TDim.
TractErrorContext
Provides the context method for Result.

Functions§

arr4
natural_strides
parse_tdim
rctensor0
rctensor1
rctensor2
rctensor3
rctensor4
round_ties_to_even
solve_for
tensor0
tensor1
tensor2
tensor3
tensor4
vector_size

Type Aliases§

StaticName
TVec
A Smallvec instantiation with 4 embeddable values.
TractError
TractResult

Derive Macros§

Hash
Derive macro generating an impl of the trait Hash.