Skip to content

Commit

Permalink
Remove remaining dregs of tuple_select (oops)
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-johnson committed Jun 26, 2024
1 parent cab27d8 commit 6fd5c6f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion python_bindings/src/halide/halide_/PyIROperator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void define_operators(py::module &m) {
// We don't want to throw an error here, since the catch(...) would catch it,
// and it would be hard to distinguish from other errors. Just set the string here
// and jump to the error reporter outside the catch.
tuple_error_msg = "tuple_select() may not mix Expr and Tuple for the condition elements.";
tuple_error_msg = "select() on Tuples may not mix Expr and Tuple for the condition elements.";
goto handle_tuple_error;
}

Expand Down
8 changes: 0 additions & 8 deletions src/IROperator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1516,10 +1516,6 @@ Expr select(Expr condition, Expr true_value, Expr false_value) {
return Select::make(std::move(condition), std::move(true_value), std::move(false_value));
}

Tuple tuple_select(const Tuple &condition, const Tuple &true_value, const Tuple &false_value) {
return select(condition, true_value, false_value);
}

Tuple select(const Tuple &condition, const Tuple &true_value, const Tuple &false_value) {
user_assert(condition.size() == true_value.size() && true_value.size() == false_value.size())
<< "select() on Tuples requires all Tuples to have identical sizes.";
Expand All @@ -1530,10 +1526,6 @@ Tuple select(const Tuple &condition, const Tuple &true_value, const Tuple &false
return result;
}

Tuple tuple_select(const Expr &condition, const Tuple &true_value, const Tuple &false_value) {
return select(condition, true_value, false_value);
}

Tuple select(const Expr &condition, const Tuple &true_value, const Tuple &false_value) {
user_assert(true_value.size() == false_value.size())
<< "select() on Tuples requires all Tuples to have identical sizes.";
Expand Down

0 comments on commit 6fd5c6f

Please sign in to comment.