aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2009-04-27 11:29:45 -0500
committerIan Hinder <ian.hinder@aei.mpg.de>2009-04-27 21:52:21 +0200
commit5a954d37db3b107945cb8e386ef97b61926009a7 (patch)
treee1832eadb54240e27a2815c091ab68d57ed3f1bb /Tools/CodeGen
parent269ff945b9bbed7724db0d960c671a6e5f15b801 (diff)
Add (currently unused) macros and definitions for dealing with vectors of grid points. This may allow generating vectorised code in the future.
Diffstat (limited to 'Tools/CodeGen')
-rw-r--r--Tools/CodeGen/CalculationFunction.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/Tools/CodeGen/CalculationFunction.m b/Tools/CodeGen/CalculationFunction.m
index c5fb2f8..71a45fa 100644
--- a/Tools/CodeGen/CalculationFunction.m
+++ b/Tools/CodeGen/CalculationFunction.m
@@ -84,6 +84,7 @@ simpCollect[collectList_, eqrhs_, localvar_, debug_] :=
(* Take a grid function name and return a name suitable for use in a local
computation *)
localName[x_] := ToExpression[ToString[x] <> "L"];
+localNameVectorised[x_] := ToExpression[ToString[x] <> "V"];
(* Given a map (i.e. a list of rules { a -> A, b -> B, ... } return the
inverse map { A -> a, B -> b, ...} *)
@@ -131,7 +132,7 @@ assignVariableFromExpression[dest_, expr_] := Module[{tSym, cleanExpr, code},
cleanExpr = ReplacePowers[expr] /. sym`t -> tSym;
- If[SOURCELANGUAGE == "C",
+ If[SOURCELANGUAGE == "C",
code = ToString[dest == cleanExpr, CForm, PageWidth -> 80] <> ";\n",
code = ToString@dest <> ".eq." <> ToString[cleanExpr, FortranForm, PageWidth -> 80] <> "\n"
];