aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen/CodeGenCactus.m
diff options
context:
space:
mode:
authorBarry Wardell <barry.wardell@gmail.com>2012-02-05 11:33:56 +0000
committerBarry Wardell <barry.wardell@gmail.com>2012-02-09 10:14:45 +0000
commit15b9115dcc6c6301fad18a9444aa81b4768ca0ba (patch)
treed9bf61198d88bb4134515d6d6a349c7c281a18bb /Tools/CodeGen/CodeGenCactus.m
parent3f0dc8ca3ddee5c78c6922abc9707d464a2d0506 (diff)
Undo hack which broke vectorisation.
Diffstat (limited to 'Tools/CodeGen/CodeGenCactus.m')
-rw-r--r--Tools/CodeGen/CodeGenCactus.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/CodeGen/CodeGenCactus.m b/Tools/CodeGen/CodeGenCactus.m
index f49e791..ef7b317 100644
--- a/Tools/CodeGen/CodeGenCactus.m
+++ b/Tools/CodeGen/CodeGenCactus.m
@@ -636,7 +636,7 @@ DefFn[
ReplacePowers[expr_, vectorise:Boolean, noSimplify:Boolean : False] :=
Module[
{rhs},
- rhs = expr /. Power[xx_, -1] -> INV[xx] /. ToReal[x_] :> x; (* FIXME: this breaks vectorisation *)
+ rhs = expr /. Power[xx_, -1] -> INV[xx];
If[SOURCELANGUAGE == "C",
{rhs = rhs //. Power[xx_, 2 ] -> SQR[xx];
rhs = rhs //. Power[xx_, 3 ] -> CUB[xx];
@@ -703,7 +703,7 @@ DefFn[
rhs = rhs //. Power[E, power_] -> exp[power];
rhs = rhs //. Log[x_] -> log[x];
(* rhs = rhs //. Power[x_, n_Integer] -> pown[x,n]; *)
- rhs = rhs //. Power[x_, power_] -> pow[x,"(CCTK_REAL) "<>ToString[power]];
+ rhs = rhs //. Power[x_, power_] :> pow[x,power];
rhs = rhs //. Sin[x_] -> sin[x];
rhs = rhs //. Cos[x_] -> cos[x];
rhs = rhs //. Tan[x_] -> tan[x];