aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2013-09-12 20:38:44 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2013-09-12 20:38:44 +0200
commit8cbc10d5e9135054682e8d20855069870b6baaff (patch)
treee4581f8967dc440665df2ec0baaf708b9a873462
parent53b75fdfb6731d7eb022ea93b51b3aeb333c4960 (diff)
CodeGenSymmetries.m: Remove old compatibility code
-rw-r--r--Tools/CodeGen/CodeGenSymmetries.m19
1 files changed, 1 insertions, 18 deletions
diff --git a/Tools/CodeGen/CodeGenSymmetries.m b/Tools/CodeGen/CodeGenSymmetries.m
index e8d521c..16c4e4c 100644
--- a/Tools/CodeGen/CodeGenSymmetries.m
+++ b/Tools/CodeGen/CodeGenSymmetries.m
@@ -60,20 +60,6 @@ DefFn[
Print["WARNING: defaulting to symmetries of a scalar for "<>ToString[gf]];
Return[{1,1,1}]]]];
-
-(* This function guesses the symmetries based on component names as we
- have not been given them *)
-DefFn[
- calcSymmetry[gf_] :=
- Module[
- {sym = {1,1,1} (* default *), q, string},
- string = ToString@gf;
- While[
- IntegerQ[q = ToExpression@StringTake[string, -1]],
- sym[[q]] = -sym[[q]];
- string = StringDrop[string, -1]];
- sym]];
-
(* Given a symmetries registration structure as defined above, return a
C CodeGen structure of a source file which will register the symmetries. *)
DefFn[
@@ -87,10 +73,7 @@ DefFn[
CodeGenC`SOURCELANGUAGE = "C";
spec = Map[{FullName -> implementationName <> "::" <> ToString@#,
- Sym -> If[reflectionSymmetries === False,
- calcSymmetry[#],
- calcSymmetry[#, Union@reflectionSymmetries]]} &,
- GFs];
+ Sym -> calcSymmetry[#, Union@reflectionSymmetries]} &, GFs];
tmp = {FileHeader["C"],