]> git.unchartedbackwaters.co.uk Git - francis/ofc.git/commitdiff
Work on building types for code generation.
authorFrancis Russell <francis@unchartedbackwaters.co.uk>
Wed, 28 Mar 2012 17:30:37 +0000 (18:30 +0100)
committerFrancis Russell <francis@unchartedbackwaters.co.uk>
Wed, 28 Mar 2012 17:30:37 +0000 (18:30 +0100)
src/ofc/codegen/IterationTemplate.scala
src/ofc/codegen/LoopRange.scala [new file with mode: 0644]
src/ofc/codegen/Record.scala [new file with mode: 0644]
src/ofc/codegen/Statement.scala [new file with mode: 0644]
src/ofc/codegen/Symbol.scala
src/ofc/codegen/Type.scala [new file with mode: 0644]
src/ofc/generators/onetep/PPDFunctionSet.scala

index 723c045e0ff718094393c7df1c0490921ba72ff5..c7ea71e914c0d5ea327e44035941011bb3c5a94d 100644 (file)
@@ -1,4 +1,4 @@
 package ofc.codegen
 
-class IterationTemplate {
+class IterationTemplate(statement: Statement) {
 }
diff --git a/src/ofc/codegen/LoopRange.scala b/src/ofc/codegen/LoopRange.scala
new file mode 100644 (file)
index 0000000..985b09e
--- /dev/null
@@ -0,0 +1,4 @@
+package ofc.codegen
+
+class LoopRange(index: VariableSymbol, start: Expression, count: Expression, statement: Statement) extends Statement {
+}
diff --git a/src/ofc/codegen/Record.scala b/src/ofc/codegen/Record.scala
new file mode 100644 (file)
index 0000000..c8341a1
--- /dev/null
@@ -0,0 +1,3 @@
+package ofc.codegen
+
+class RecordType extends Type
diff --git a/src/ofc/codegen/Statement.scala b/src/ofc/codegen/Statement.scala
new file mode 100644 (file)
index 0000000..4028f7d
--- /dev/null
@@ -0,0 +1,4 @@
+package ofc.codegen
+
+trait Statement
+class NullStatement extends Statement
index 424c05249f89923e4e30fb48b39a43c6faded961..5993e1997172a204509c316e1816dab86e7b1253 100644 (file)
@@ -1,3 +1,4 @@
 package ofc.codegen
 
 class Symbol(name: String)
+class VariableSymbol(name: String) extends Symbol(name)
diff --git a/src/ofc/codegen/Type.scala b/src/ofc/codegen/Type.scala
new file mode 100644 (file)
index 0000000..0094ef0
--- /dev/null
@@ -0,0 +1,3 @@
+package ofc.codegen
+
+trait Type
index ebd25373d190961f99ad79971e953dff05a65b80..37a771d915cf7ade148614a4745bdc84fcdf1aa6 100644 (file)
@@ -1,6 +1,12 @@
 package ofc.generators.onetep
+import ofc.codegen._
 
 class PPDFunctionSet(val basis : String, data : String) extends FunctionSet {
+  def getReader = {
+    new IterationTemplate(new NullStatement())
+  }
+  def getDiscreteIndices = List.empty
+  def getSpatialIndices = List.empty
 /*
   class SphereIndex(parent: PPDFunctionSet) extends DiscreteIndex {
     def getName = "sphere_index"