Skip to content

Commit

Permalink
Convert some assert-only usage of output_types() -> types() (#6779)
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-johnson committed May 24, 2022
1 parent 83a90e7 commit ad1e7f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tutorial/lesson_14_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ int main(int argc, char **argv) {
// You can also query any defined Func for the types it produces.
Func f1;
f1(x) = cast<uint8_t>(x);
assert(f1.output_types()[0] == UInt(8));
assert(f1.types()[0] == UInt(8));

Func f2;
f2(x) = {x, sin(x)};
assert(f2.output_types()[0] == Int(32) &&
f2.output_types()[1] == Float(32));
assert(f2.types()[0] == Int(32) &&
f2.types()[1] == Float(32));
}

// Type promotion rules.
Expand Down

0 comments on commit ad1e7f6

Please sign in to comment.