From 340f3d1a30449912d73a49cba41be76d29ace36b Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Sat, 8 Oct 2016 13:31:36 -0600 Subject: fixes --- lib/chillcg/src/CG_chillBuilder.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib') 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; } -- cgit v1.2.3-70-g09d2