|
13 | 13 | // See the License for the specific language governing permissions and |
14 | 14 | // limitations under the License. |
15 | 15 |
|
16 | | -#include <inttypes.h> // PRIu64 |
17 | 16 | #include <stddef.h> |
18 | 17 | #include <stdint.h> |
19 | 18 | #include <string.h> // memset |
@@ -44,19 +43,16 @@ void CheckStored(D d, DI di, size_t expected_pos, size_t actual_pos, |
44 | 43 | const AlignedFreeUniquePtr<T[]>& expected, const T* actual_u, |
45 | 44 | int line) { |
46 | 45 | if (expected_pos != actual_pos) { |
47 | | - hwy::Abort( |
48 | | - __FILE__, line, |
49 | | - "Size mismatch for %s: expected %" PRIu64 ", actual %" PRIu64 "\n", |
50 | | - TypeName(T(), Lanes(d)).c_str(), static_cast<uint64_t>(expected_pos), |
51 | | - static_cast<uint64_t>(actual_pos)); |
| 46 | + hwy::Abort(__FILE__, line, "Size mismatch for %s: expected %d, actual %d\n", |
| 47 | + TypeName(T(), Lanes(d)).c_str(), static_cast<int>(expected_pos), |
| 48 | + static_cast<int>(actual_pos)); |
52 | 49 | } |
53 | 50 | // Modified from AssertVecEqual - we may not be checking all lanes. |
54 | 51 | for (size_t i = 0; i < num_to_check; ++i) { |
55 | 52 | if (!IsEqual(expected[i], actual_u[i])) { |
56 | 53 | const size_t N = Lanes(d); |
57 | | - fprintf(stderr, "Mismatch at i=%" PRIu64 " of %" PRIu64 ", line %d:\n\n", |
58 | | - static_cast<uint64_t>(i), static_cast<uint64_t>(num_to_check), |
59 | | - line); |
| 54 | + fprintf(stderr, "Mismatch at i=%d of %d, line %d:\n\n", |
| 55 | + static_cast<int>(i), static_cast<int>(num_to_check), line); |
60 | 56 | Print(di, "mask", Load(di, mask_lanes.get()), 0, N); |
61 | 57 | Print(d, "in", Load(d, in.get()), 0, N); |
62 | 58 | Print(d, "expect", Load(d, expected.get()), 0, N); |
@@ -598,8 +594,7 @@ void PrintCompress32x4Tables() { |
598 | 594 |
|
599 | 595 | for (size_t i = 0; i < N; ++i) { |
600 | 596 | for (size_t idx_byte = 0; idx_byte < sizeof(T); ++idx_byte) { |
601 | | - printf("%" PRIu64 ",", |
602 | | - static_cast<uint64_t>(sizeof(T) * indices[i] + idx_byte)); |
| 597 | + printf("%d,", static_cast<int>(sizeof(T) * indices[i] + idx_byte)); |
603 | 598 | } |
604 | 599 | } |
605 | 600 | } |
@@ -630,8 +625,7 @@ void PrintCompressNot32x4Tables() { |
630 | 625 |
|
631 | 626 | for (size_t i = 0; i < N; ++i) { |
632 | 627 | for (size_t idx_byte = 0; idx_byte < sizeof(T); ++idx_byte) { |
633 | | - printf("%" PRIu64 ",", |
634 | | - static_cast<uint64_t>(sizeof(T) * indices[i] + idx_byte)); |
| 628 | + printf("%d,", static_cast<int>(sizeof(T) * indices[i] + idx_byte)); |
635 | 629 | } |
636 | 630 | } |
637 | 631 | } |
@@ -662,8 +656,7 @@ void PrintCompress64x2Tables() { |
662 | 656 |
|
663 | 657 | for (size_t i = 0; i < N; ++i) { |
664 | 658 | for (size_t idx_byte = 0; idx_byte < sizeof(T); ++idx_byte) { |
665 | | - printf("%" PRIu64 ",", |
666 | | - static_cast<uint64_t>(sizeof(T) * indices[i] + idx_byte)); |
| 659 | + printf("%d,", static_cast<int>(sizeof(T) * indices[i] + idx_byte)); |
667 | 660 | } |
668 | 661 | } |
669 | 662 | } |
@@ -694,8 +687,7 @@ void PrintCompressNot64x2Tables() { |
694 | 687 |
|
695 | 688 | for (size_t i = 0; i < N; ++i) { |
696 | 689 | for (size_t idx_byte = 0; idx_byte < sizeof(T); ++idx_byte) { |
697 | | - printf("%" PRIu64 ",", |
698 | | - static_cast<uint64_t>(sizeof(T) * indices[i] + idx_byte)); |
| 690 | + printf("%d,", static_cast<int>(sizeof(T) * indices[i] + idx_byte)); |
699 | 691 | } |
700 | 692 | } |
701 | 693 | } |
|
0 commit comments