summaryrefslogtreecommitdiff
path: root/lib/chillcg/src/CG_chillBuilder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chillcg/src/CG_chillBuilder.cc')
-rwxr-xr-xlib/chillcg/src/CG_chillBuilder.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/chillcg/src/CG_chillBuilder.cc b/lib/chillcg/src/CG_chillBuilder.cc
index 966c20f..74622d7 100755
--- a/lib/chillcg/src/CG_chillBuilder.cc
+++ b/lib/chillcg/src/CG_chillBuilder.cc
@@ -246,12 +246,11 @@ namespace omega {
CG_outputRepr *CGOR;
CG_chillRepr *CGCR;
char macroname[32];
- char op;
- if (fname == std::string("max")) op = '>';
- else op = '<';
- // TODO >, check number of args etc
- chillAST_Node *ternary = lessthanmacro( ((CG_chillRepr*) list[0])->chillnodes[0],
- ((CG_chillRepr*) list[1])->chillnodes[0]);
+ const char * op;
+ if (fname == std::string("max")) op = ">";
+ else op = "<";
+ chillAST_Node *ternary = minmaxTernary( op, ((CG_chillRepr*) list[0])->chillnodes[0],
+ ((CG_chillRepr*) list[1])->chillnodes[0]);
CG_chillRepr *repr = new CG_chillRepr( ternary );
return repr;
}