Skip to content

Commit

Permalink
fix unrecognized print format specifier for int8/uint8 (NVIDIA#1303)
Browse files Browse the repository at this point in the history
* fix unrecognized print format specifier for int8/uint8

* use c++ static_cast instead of c cast style
  • Loading branch information
reed-lau authored Jan 30, 2024
1 parent 092f14d commit 8825fbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/cute/util/print.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ print(char c) {
CUTE_HOST_DEVICE
void
print(signed char a) {
printf("%hhd", a);
printf("%d", static_cast<int>(a));
}

CUTE_HOST_DEVICE
void
print(unsigned char a) {
printf("%hhu", a);
printf("%u", static_cast<unsigned int>(a));
}

CUTE_HOST_DEVICE
Expand Down

0 comments on commit 8825fbf

Please sign in to comment.