Skip to content

Commit

Permalink
CodeGen.mt: Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhinder committed Mar 19, 2014
1 parent e0c1d54 commit 0f059e0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Tests/CodeGen.mt
Expand Up @@ -80,7 +80,7 @@ Test[
]

Test[
VectoriseExpression[1./1024/dx]
VectoriseExpression[1./1024 pow[dx,-1]]
,
kdiv[ToReal[Evaluate[1./1024]],dx]
,
Expand Down Expand Up @@ -123,10 +123,18 @@ Test[
TestID->"ProcessExpression-GFLocal-vec"
]

Test[
withVectorisation@ProcessExpression[(Parameter[width])^2, True]
,
ToReal[pow[width, 2]]
,
TestID->"ProcessExpression-torealpow"
]

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]]
kmul[kexp[kmul[ToReal[pow[width, -2]], kmul[ToReal[-0.5`30.], kmul[r, r]]]], ToReal[amplitude]]
,
TestID->"ProcessExpression-ExpPow"
]

0 comments on commit 0f059e0

Please sign in to comment.