[][src]Module tract_hir::internal

Re-exports

pub use super::prelude::*;
pub use crate::infer::*;
pub use shapefactoid;
pub use to_typed;
pub use crate::ops::expandable::expand;
pub use crate::ops::expandable::Expansion;

Modules

compact
dsl
order

Evaluation order for nodes.

tract_downcast_rs

Rust enums are great for types where all variations are known beforehand. But a container of user-defined types requires an open-ended type like a trait object. Some applications may want to cast these trait objects back to the original concrete types to access additional functionality and performant inlined implementations.

tract_itertools

Extra iterator adaptors, functions and macros.

tract_linalg
tract_ndarray

The ndarray crate provides an n-dimensional container for general elements and for numerics.

tract_num_traits

Numeric traits for generic mathematics

translator

Macros

Hash

Derive macro generating an impl of the trait Hash.

args_1
args_2
args_3
args_4
args_5
args_6
args_7
args_8
as_op
bail

Exits a function early with an error

bin_to_super_type
dispatch_copy
dispatch_datum
dispatch_datum_by_size
dispatch_floatlike
dispatch_numbers
element_wise
element_wise_oop
not_a_pulsed_op
not_a_typed_op
op_as_typed_op
pulsed_op_to_typed_op
tvec

Structs

Arc

A thread-safe reference-counting pointer. 'Arc' stands for 'Atomically Reference Counted'.

AxisChange
AxisChangeConsequence
AxisInfo

Translation invariance property.

AxisTracking
BaseNode

A Node in an Model.

Blob
HashMap

A hash map implemented with quadratic probing and SIMD lookup.

InletId

Identifier for a node input in the graph.

Invariants
ModelImpl

Main model class

ModelPatch

A change to apply to a model.

NormalizedFact

Tensor information for Normalized models.

OutletFact

Information for each outlet of a node

OutletId

Identifier for a node output in the graph.

PhantomData

Zero-sized type used to mark things that "act like" they own a T.

PulsedFact
SessionState
ShapeFact

Fully determined dimension of a tensor.

SimplePlan
SimpleState
StreamFact

Streaming information for a streamed tensor.

Tensor

Tensor is a concrete tensor in tract.

TractError

The Error type.

TypedFact

Fully determined tensor information for TypedModel.

f16

Enums

AxisOp
Cost
Cow

A clone-on-write smart pointer.

DatumType
InOut
TDim
TractErrorKind

The kind of an error.

Validation

Level of precision to be expected in implementations comparisons.

Traits

Datum
DimLike

A super-trait for value acting as tensor dimensions in tract.

DynHash
ElementWiseMiniOp
Fact

Type information about a tensor: shape, and element type, in various state of determination.

Hash

A hashable type.

IntoArcTensor

Convenient conversion to Arc.

IntoTensor

Convenient conversion to Tensor.

MaybeProduct
Model

Common methods for all variants of model.

ModelDsl

Extensions on ModelImpl to explore and build graph models more easily.

ModelDslConst

Extension to add constants to model that tolerates them.

ModelSpecialOps
ModelWireNode
Op

A base operation

OpState
PulsedOp
StatefullOp
StatelessOp
ToDim

Convenience trait to convert values to TDim.

TractResultExt

Additional methods for Result, for easy interaction with this crate.

TypedOp

Functions

arr4
change_axes
eval_order

Find an evaluation order for a model, using its default inputs and outputs as boundaries.

for_model
full_axis_tracking
hash_f32
rctensor0
rctensor1
rctensor2
rctensor3
rctensor4
tensor0
tensor1
tensor2
tensor3
tensor4

Type Definitions

Node
NormalizedModel

A model with determined types and shapes, where constant have been eliminated from the graph.

NormalizedModelPatch

A ModelPatch for NormalizedModel.

NormalizedNode

A Node for NormalizedModel.

NormalizedSimplePlan

An execution plan for NormalizedModel.

NormalizedSimpleState

An execution state for TypedModel.

PulsedModel
PulsedNode
RunnableModel

A runnable model with fixed inputs and outputs.

TVec

A Smallvec instantiation with 4 embeddable values.

TractResult

Convenient wrapper around std::Result.

TypedModel

A model with completely determined types and shapes.

TypedModelPatch

A ModelPatch for TypedModel.

TypedNode

Node for TypedModel graph

TypedSimplePlan

An execution plan for TypedModel.

TypedSimpleState

An execution state for TypedModel.