dvda-0.4: Efficient automatic differentiation and code generation

Safe HaskellNone

Dvda.Algorithm.Construct

Synopsis

Documentation

data Algorithm a Source

Constructors

Algorithm 

Fields

algInDims :: Int
 
algOutDims :: Int
 
algOps :: [AlgOp a]
 
algWorkSize :: Int
 

data AlgOp a Source

Instances

Show a => Show (AlgOp a) 

newtype Node Source

Constructors

Node Int 

Instances

newtype InputIdx Source

Constructors

InputIdx Int 

Instances

newtype OutputIdx Source

Constructors

OutputIdx Int 

Instances

constructAlgorithm :: Vector (Expr a) -> Vector (Expr a) -> IO (Algorithm a)Source

create a SSA algorithm from a vector of symbolic inputs and outputs

squashWorkVector :: Algorithm a -> Algorithm aSource

Converts SSA to live variables. This reduces the size of the work vector by re-using dead registers. Does this break if it's called more than once? Maybe these should have different types