Skip to content

Commit

Permalink
CodeGen.mt: Add and update tests for powers in vectorised expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhinder committed Mar 19, 2014
1 parent c87374e commit befaebd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Tests/CodeGen.mt
Expand Up @@ -98,7 +98,7 @@ Test[
Test[
VectoriseExpression[fmin[1,exp[Subtract[1,rL*pow[ToReal[SpatialShiftGammaCoeffRadius],-1]]]]]
,
kfmin[ToReal[1], kexp[knmsub[ToReal[SpatialShiftGammaCoeffRadius^(-1)], rL, ToReal[1]]]]
kfmin[ToReal[1], kexp[knmsub[ToReal[pow[SpatialShiftGammaCoeffRadius,-1]], rL, ToReal[1]]]]
,
TestID->"ProcessExpression-vec-param"
]
Expand All @@ -123,5 +123,10 @@ Test[
TestID->"ProcessExpression-GFLocal-vec"
]



Test[
withVectorisation@ProcessExpression[Parameter[amplitude] Exp[-(1/2) (r/Parameter[width])^2], True]
,
kmul[kexp[kmul[ToReal[pow[width^2, -1]], kmul[ToReal[-0.5`30.], kmul[r, r]]]], ToReal[amplitude]]
,
TestID->"ProcessExpression-ExpPow"
]

0 comments on commit befaebd

Please sign in to comment.