aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2010-03-08 14:56:50 -0600
committerIan Hinder <ian.hinder@aei.mpg.de>2010-03-08 14:56:50 -0600
commitf6f5a7d421af26fbc240e1f92466af2206b1228e (patch)
treec889cd69c225e9bb835da26a5314ee9314a5c178
parent11fc168e7e12be14956b4472e85838abf6d25128 (diff)
Remove const statements where possible
-rw-r--r--Tools/CodeGen/CalculationFunction.m2
-rw-r--r--Tools/CodeGen/CodeGen.m4
2 files changed, 3 insertions, 3 deletions
diff --git a/Tools/CodeGen/CalculationFunction.m b/Tools/CodeGen/CalculationFunction.m
index cad6bbf..2f05811 100644
--- a/Tools/CodeGen/CalculationFunction.m
+++ b/Tools/CodeGen/CalculationFunction.m
@@ -156,7 +156,7 @@ assignVariableFromExpression[dest_, expr_] := Module[{tSym, type, cleanExpr, cod
cleanExpr = ReplacePowers[expr] /. sym`t -> tSym;
If[SOURCELANGUAGE == "C",
- code = type <> " const " <> ToString[dest] <> " = " <> ToString[cleanExpr, CForm, PageWidth -> Infinity] <> ";\n",
+ code = type <> " " <> ToString[dest] <> " = " <> ToString[cleanExpr, CForm, PageWidth -> Infinity] <> ";\n",
code = ToString@dest <> ".eq." <> ToString[cleanExpr, FortranForm, PageWidth -> 120] <> "\n"
];
diff --git a/Tools/CodeGen/CodeGen.m b/Tools/CodeGen/CodeGen.m
index 1fb2a05..e7799a1 100644
--- a/Tools/CodeGen/CodeGen.m
+++ b/Tools/CodeGen/CodeGen.m
@@ -294,8 +294,8 @@ MaybeAssignVariableInLoop[dest_, src_, cond_] :=
DeclareMaybeAssignVariableInLoop[type_, dest_, src_, mmaCond_, codeCond_] :=
If [mmaCond,
- {type, " const ", dest, " = (", codeCond, ") ? (", src, ") : 0.0", EOL[]},
- {type, " const ", dest, " = ", src, EOL[]}];
+ {type, " ", dest, " = (", codeCond, ") ? (", src, ") : 0.0", EOL[]},
+ {type, " ", dest, " = ", src, EOL[]}];
(* TODO: move these into OpenMP loop *)
DeclareVariablesInLoopVectorised[dests_, temps_, srcs_] :=