~/bend-docscommunity

src/tensor/permute_values_records.bend open laws/TODOs

raw source on the hub · import bendtorch-core@0.1.0.0/src/tensor/permute_values_records.bend as Permute_values_records

13 imports
import Base
import ../shape/core.bend as Shape
import ./core.bend as Core
import ./axis_spec.bend as Axis
import ./transpose_spec.bend as Transpose
import ./observation.bend as Values
import ./transform_observation.bend as Observation
import ../storage/LAWS.bend as StorageLaws
import ./lifecycle.bend as Lifecycle
import ./layout.bend as Layout
import ./transforms.bend as Transforms
import ./contracts/replayed.bend as Replayed
import ./contracts/LAWS.bend as Contracts

Types

type PermuteContract source · line 15 · raw

@-input:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-values:List<&2, F32> -> @-axes:List<&2, U32> -> Type

type TransposeContract source · line 30 · raw

@-input:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-values:List<&2, F32> -> @-a:U32 -> @-b:U32 -> Type

Definitions

def permuted_words source · line 47 · raw

@+input:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+fill:F32 -> @+ops:List<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/LAWS.Op> -> @+axes:List<&2, U32> -> @+count:Nat -> List<&2, F32>

The words of a permuted copy in index order: word k is the source's word at permute_source(input, axes, k).

def PermutedWith source · line 59 · raw

@+input:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+fill:F32 -> @+ops:List<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/LAWS.Op> -> @+axes:List<&2, U32> -> @+plan:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/layout.Plan<input, axes> -> @-P:(@_:Pair(0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Dynamic, Result<&2, &1, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/transforms.Error, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Dynamic>) -> Type) -> Type

What the transport form of permute_replayed and transpose_replayed asks of P: P holds for the returned source, replayed with any history that keeps its words, next to the output, of the plan's shape, replayed over +0.0 with any history whose words are permuted_words.