diff options
author | Erik Schnetter <schnetter@gmail.com> | 2012-07-25 22:27:54 +0200 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2012-07-25 22:27:54 +0200 |
commit | 2c2bde2690d7e422e85d4441dbed0000de9140f8 (patch) | |
tree | a7a250c9e8d775efe534e78d9af755a09079ed10 /Tools/CodeGen/CodeGenCactus.m | |
parent | 58b12c2af966fb4beaf794c79e900b8a29e48e2f (diff) |
Handle Sign function while vectorising
Diffstat (limited to 'Tools/CodeGen/CodeGenCactus.m')
-rw-r--r-- | Tools/CodeGen/CodeGenCactus.m | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Tools/CodeGen/CodeGenCactus.m b/Tools/CodeGen/CodeGenCactus.m index c9ba816..222b030 100644 --- a/Tools/CodeGen/CodeGenCactus.m +++ b/Tools/CodeGen/CodeGenCactus.m @@ -569,6 +569,7 @@ DefFn[ fmin[x_,y_] -> kfmin[x,y], log[x_] -> klog[x], pow[x_,y_] -> kpow[x,y], + sgn[x_] -> ksgn[x], sqrt[x_] -> ksqrt[x]}; (* Optimise *) @@ -805,6 +806,7 @@ DefFn[ rhs = rhs //. Max[xx_, yy__] -> fmax[xx, Max[yy]]; rhs = rhs //. Min[xx_, yy__] -> fmin[xx, Min[yy]]; rhs = rhs //. Abs[x_] -> fabs[x]; + rhs = rhs //. Sign[x_] -> sgn[x]; rhs = rhs //. IntAbs[x_] -> abs[x]; If[vectorise === True, |