Skip to content

Commit

Permalink
Add CArray to the expression language
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhinder committed Mar 18, 2014
1 parent 4713bc4 commit a4b5f38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Tools/CodeGen/CodeGenKranc.m
Expand Up @@ -291,6 +291,9 @@
code = LineBreak[FlattenBlock[code], 70] <> "\n";
{code}];

Format[CArray[id_, {args__}], CForm] :=
SequenceForm[id, "[", Sequence @@ Riffle[{args}, ","], "]"];

GenerateCodeFromExpression[expr_, vectorise_, noSimplify:Boolean : False] :=
Module[{cleanExpr, code},
cleanExpr = ProcessExpression[expr, vectorise, noSimplify];
Expand Down
3 changes: 3 additions & 0 deletions Tools/CodeGen/Kranc.m
Expand Up @@ -154,4 +154,7 @@
"cse" -> CSE,
"cakernel" -> UseCaKernel};

(* CodeGenKranc.m *)
CArray;

EndPackage[];

0 comments on commit a4b5f38

Please sign in to comment.