[test] added support for max, min reduction and made it easy to add more

This commit is contained in:
Philippe Tillet
2019-09-12 16:11:57 -04:00
parent c4c93943df
commit f4beb713ab
14 changed files with 178 additions and 65 deletions

View File

@@ -466,7 +466,9 @@ Expr* Parser::ParseSubScripting(Expr* lhs) {
break;
case Token::ADD:
case Token::SUB:{
case Token::SUB:
case Token::MAX:
case Token::MIN:{
int info = UnaryOp::encodeRed(i, tok->tag_);
redInfo.push_back({i, info});
shape.push_back(lhsShape[i++]);