diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2012-03-21 16:00:17 +0100 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2012-03-21 16:00:17 +0100 |
commit | 7a42b045fa2257a94c9d98c9ceec7567322698a4 (patch) | |
tree | 5831a14ecf3fb94197d9ab62eb625b16601770a9 | |
parent | bd51eb6016fc88304785282e1d9eb87628e6009a (diff) |
Enable CaKernel support for Kranc scripts
-rw-r--r-- | Auxiliary/Grammars/kranc2.peg | 2 | ||||
-rw-r--r-- | Tools/CodeGen/KrancScript.m | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Auxiliary/Grammars/kranc2.peg b/Auxiliary/Grammars/kranc2.peg index 9111540..cb2d352 100644 --- a/Auxiliary/Grammars/kranc2.peg +++ b/Auxiliary/Grammars/kranc2.peg @@ -32,7 +32,7 @@ variables = begin[ \t]+variables{-end} ( end[ \t]+variables\b{brk}| {tensor})*{- temporaries = begin[ \t]+temporaries{-end} ( end[ \t]+temporaries\b{brk}| {tensor})*{-end} option = {inherit}|{use}|{disable}|{implement} inherit = inherit[ \t]+({uname}[ \t]*)+{-end} -feature = loopcontrol|vectors|opencl|jacobian|cse +feature = loopcontrol|vectors|opencl|jacobian|cse|cakernel use = use[ \t]+({feature}[ \t]*)+ disable = disable[ \t]+({feature}[ \t]*)+ implement = implement[ \t]+{uname}{-end} diff --git a/Tools/CodeGen/KrancScript.m b/Tools/CodeGen/KrancScript.m index a8add83..e757011 100644 --- a/Tools/CodeGen/KrancScript.m +++ b/Tools/CodeGen/KrancScript.m @@ -172,7 +172,7 @@ process["option"["implement"[imp_]]] := {Implementation -> process[imp]}; flags = {"loopcontrol"->UseLoopControl,"vectors"->UseVectors,"opencl"->UseOpenCL, - "jacobian"->UseJacobian, "cse" -> CSE}; + "jacobian"->UseJacobian, "cse" -> CSE, "cakernel" -> UseCaKernel}; process["option"["use"[features__]]] := Map[(lookup[flags,#] -> True) &,{features}/.(("feature"[n_]):>n)]; |