diff options
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/CodeGen/CalculationFunction.m | 2 | ||||
-rw-r--r-- | Tools/CodeGen/CodeGen.m | 4 |
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_] := |