diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2009-04-27 11:29:45 -0500 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2009-04-27 21:52:21 +0200 |
commit | 5a954d37db3b107945cb8e386ef97b61926009a7 (patch) | |
tree | e1832eadb54240e27a2815c091ab68d57ed3f1bb /Tools | |
parent | 269ff945b9bbed7724db0d960c671a6e5f15b801 (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')
-rw-r--r-- | Tools/CodeGen/CalculationFunction.m | 3 |
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" ]; |