Paraiso-0.0.0.0: a code generator for partial differential equations solvers.

Language.Paraiso.OM.Graph

Description

all the components for constructing Orthotope Machine data flow draph.

Synopsis

Documentation

data (Vector vector, C gauge) => Setup vector gauge Source

An OM Setup, a set of information needed before you start building a Kernel. It's basically a list of static orthotopes (its identifier, Realm and Type carried in the form of NamedValue)

Constructors

Setup 

Instances

(C gauge, Vector vector) => Eq (Setup vector gauge) 
(C gauge, Vector vector) => Show (Setup vector gauge) 

data (Vector vector, C gauge) => Kernel vector gauge a Source

A Kernel for OM does a bunch of calculations on OM.

Constructors

Kernel 

Fields

kernelName :: Name
 
dataflow :: Graph vector gauge a
 

Instances

(Show a, Show (vector gauge), C gauge, Vector vector) => Show (Kernel vector gauge a) 
(Vector v, C g) => Nameable (Kernel v g a) 

type Graph vector gauge a = Gr (Node vector gauge a) EdgeSource

The dataflow graph for Orthotope Machine. a is an additional annotation.

nmap :: (Vector v, C g) => (a -> b) -> Graph v g a -> Graph v g bSource

Map the Graph annotation from one type to another. Unfortunately we cannot make one data both the instances of Graph and Functor, so nmap is a standalone function.

getA :: Node v g a -> aSource

get annotation of the node.

data Annotation Source

you can insert Annotations to control the code generation processes.

Constructors

Comment String 
Balloon 

data Node vector gauge a Source

The Node for the dataflow Graph of the Orthotope machine. The dataflow graph is a 2-part graph consisting of NValue and NInst nodes.

Constructors

NValue DynValue a

A value node. An NValue node only connects to NInst nodes. An NValue node has one and only one input edge, and has arbitrary number of output edges.

NInst (Inst vector gauge) a

An instruction node. An NInst node only connects to NValue nodes. The number of input and output edges an NValue node has is specified by its Arity.

Instances

(Vector v, C g) => Functor (Node v g) 
(Show a, Show (vector gauge)) => Show (Node vector gauge a) 

data Edge Source

The Edge label for the dataflow Graph. | It keeps track of the order of the arguments.

Constructors

EUnord

an unordered edge.

EOrd Int

edges where the order matters.

Instances

data Inst vector gauge Source

Constructors

Imm Dynamic 
Load Name 
Store Name 
Reduce Operator 
Broadcast 
Shift (vector gauge) 
LoadIndex (Axis vector) 
Arith Operator 

Instances

Show (vector gauge) => Show (Inst vector gauge) 
Arity (Inst vector gauge)