diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 15:31:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 15:31:32 (GMT) |
commit | 187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98 (patch) | |
tree | baffa167d0796786241aef6b0ce76d4adec3b66e /test/hyperslab.c | |
parent | 7a44581a84778a1346a2fd5b6cca7d9db905a321 (diff) | |
download | hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.zip hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.tar.gz hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.tar.bz2 |
Rename HD(f)printf() to (f)printf() (#3194)
Diffstat (limited to 'test/hyperslab.c')
-rw-r--r-- | test/hyperslab.c | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/test/hyperslab.c b/test/hyperslab.c index b17293f..79f37f9 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -82,19 +82,19 @@ print_array(uint8_t *array, size_t nx, size_t ny, size_t nz) for (i = 0; i < nx; i++) { if (nz > 1) - HDprintf("i=%lu:\n", (unsigned long)i); + printf("i=%lu:\n", (unsigned long)i); else - HDprintf("%03lu:", (unsigned long)i); + printf("%03lu:", (unsigned long)i); for (j = 0; j < ny; j++) { if (nz > 1) - HDprintf("%03lu:", (unsigned long)j); + printf("%03lu:", (unsigned long)j); for (k = 0; k < nz; k++) - HDprintf(" %3d", *array++); + printf(" %3d", *array++); if (nz > 1) - HDprintf("\n"); + printf("\n"); } /* end for */ - HDprintf("\n"); + printf("\n"); } /* end for */ } /* end print_array() */ @@ -118,7 +118,7 @@ print_ref(size_t nx, size_t ny, size_t nz) uint8_t *array; if (NULL != (array = (uint8_t *)HDmalloc(nx * ny * nz))) { - HDprintf("Reference array:\n"); + printf("Reference array:\n"); init_full(array, nx, ny, nz); print_array(array, nx, ny, nz); HDfree(array); @@ -175,7 +175,7 @@ test_fill(size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_t dk, size HDsnprintf(dim, sizeof(dim), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz); } /* end else */ HDsnprintf(s, sizeof(s), "Testing hyperslab fill %-11s variable hyperslab", dim); - HDprintf("%-70s", s); + printf("%-70s", s); HDfflush(stdout); /* Allocate array */ @@ -235,15 +235,15 @@ test_fill(size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_t dk, size * is going directly to a terminal. */ AT(); - HDprintf(" acc != ref_value\n"); - HDprintf(" i=%lu, j=%lu, k=%lu, " - "dx=%lu, dy=%lu, dz=%lu, " - "fill=%d\n", - (unsigned long)i, (unsigned long)j, (unsigned long)k, - (unsigned long)dx, (unsigned long)dy, (unsigned long)dz, - fill_value); + printf(" acc != ref_value\n"); + printf(" i=%lu, j=%lu, k=%lu, " + "dx=%lu, dy=%lu, dz=%lu, " + "fill=%d\n", + (unsigned long)i, (unsigned long)j, (unsigned long)k, + (unsigned long)dx, (unsigned long)dy, (unsigned long)dz, + fill_value); print_ref(nx, ny, nz); - HDprintf("\n Result is:\n"); + printf("\n Result is:\n"); print_array(dst, nx, ny, nz); } /* end if */ goto error; @@ -364,7 +364,7 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_ } /* end switch */ HDsnprintf(s, sizeof(s), "Testing hyperslab copy %-11s %s", dim, sub); - HDprintf("%-70s", s); + printf("%-70s", s); HDfflush(stdout); /* @@ -469,13 +469,13 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_ * going directly to a terminal. */ AT(); - HDprintf(" acc != ref_value\n"); - HDprintf(" i=%lu, j=%lu, k=%lu, " - "dx=%lu, dy=%lu, dz=%lu\n", - (unsigned long)i, (unsigned long)j, (unsigned long)k, - (unsigned long)dx, (unsigned long)dy, (unsigned long)dz); + printf(" acc != ref_value\n"); + printf(" i=%lu, j=%lu, k=%lu, " + "dx=%lu, dy=%lu, dz=%lu\n", + (unsigned long)i, (unsigned long)j, (unsigned long)k, + (unsigned long)dx, (unsigned long)dy, (unsigned long)dz); print_ref(nx, ny, nz); - HDprintf("\n Destination array is:\n"); + printf("\n Destination array is:\n"); print_array(dst, nx, ny, nz); } /* end if */ goto error; @@ -506,14 +506,14 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_ * going directly to a terminal. */ AT(); - HDprintf(" acc != ref_value + nx*ny*nz - " - "dx*dy*dz\n"); - HDprintf(" i=%lu, j=%lu, k=%lu, " - "dx=%lu, dy=%lu, dz=%lu\n", - (unsigned long)i, (unsigned long)j, (unsigned long)k, - (unsigned long)dx, (unsigned long)dy, (unsigned long)dz); + printf(" acc != ref_value + nx*ny*nz - " + "dx*dy*dz\n"); + printf(" i=%lu, j=%lu, k=%lu, " + "dx=%lu, dy=%lu, dz=%lu\n", + (unsigned long)i, (unsigned long)j, (unsigned long)k, + (unsigned long)dx, (unsigned long)dy, (unsigned long)dz); print_ref(nx, ny, nz); - HDprintf("\n Destination array is:\n"); + printf("\n Destination array is:\n"); print_array(dst, nx, ny, nz); } /* end if */ goto error; @@ -573,7 +573,7 @@ test_multifill(size_t nx) } fill, *src = NULL, *dst = NULL; hsize_t i, j; - HDprintf("%-70s", "Testing multi-byte fill value"); + printf("%-70s", "Testing multi-byte fill value"); HDfflush(stdout); /* Initialize the source and destination */ @@ -630,14 +630,14 @@ test_multifill(size_t nx) H5_FAILED(); if (!HDisatty(1)) { AT(); - HDprintf(" fill={%d,%g,%d}\n ", fill.left, fill.mid, fill.right); + printf(" fill={%d,%g,%d}\n ", fill.left, fill.mid, fill.right); for (j = 0; j < sizeof(fill); j++) - HDprintf(" %02x", ((uint8_t *)&fill)[j]); - HDprintf("\n dst[%lu]={%d,%g,%d}\n ", (unsigned long)i, dst[i].left, dst[i].mid, - dst[i].right); + printf(" %02x", ((uint8_t *)&fill)[j]); + printf("\n dst[%lu]={%d,%g,%d}\n ", (unsigned long)i, dst[i].left, dst[i].mid, + dst[i].right); for (j = 0; j < sizeof(dst[i]); j++) - HDprintf(" %02x", ((uint8_t *)(dst + i))[j]); - HDprintf("\n"); + printf(" %02x", ((uint8_t *)(dst + i))[j]); + printf("\n"); } /* end if */ goto error; } /* end if */ @@ -685,7 +685,7 @@ test_endian(size_t nx) hsize_t size[2]; /*size vector */ hsize_t i, j; - HDprintf("%-70s", "Testing endian conversion by stride"); + printf("%-70s", "Testing endian conversion by stride"); HDfflush(stdout); /* Initialize arrays */ @@ -718,10 +718,10 @@ test_endian(size_t nx) * to a terminal. */ AT(); - HDprintf(" i=%lu, j=%lu\n", (unsigned long)i, (unsigned long)j); - HDprintf(" Source array is:\n"); + printf(" i=%lu, j=%lu\n", (unsigned long)i, (unsigned long)j); + printf(" Source array is:\n"); print_array(src, nx, (size_t)4, (size_t)1); - HDprintf("\n Result is:\n"); + printf("\n Result is:\n"); print_array(dst, nx, (size_t)4, (size_t)1); } /* end if */ goto error; @@ -772,7 +772,7 @@ test_transpose(size_t nx, size_t ny) HDsnprintf(s, sizeof(s), "Testing 2d transpose by stride %4lux%-lud", (unsigned long)nx, (unsigned long)ny); - HDprintf("%-70s", s); + printf("%-70s", s); HDfflush(stdout); /* Initialize */ @@ -803,20 +803,20 @@ test_transpose(size_t nx, size_t ny) H5_FAILED(); if (!HDisatty(1)) { AT(); - HDprintf(" diff at i=%lu, j=%lu\n", (unsigned long)i, (unsigned long)j); - HDprintf(" Source is:\n"); + printf(" diff at i=%lu, j=%lu\n", (unsigned long)i, (unsigned long)j); + printf(" Source is:\n"); for (i = 0; i < nx; i++) { - HDprintf("%3lu:", (unsigned long)i); + printf("%3lu:", (unsigned long)i); for (j = 0; j < ny; j++) - HDprintf(" %6d", src[i * ny + j]); - HDprintf("\n"); + printf(" %6d", src[i * ny + j]); + printf("\n"); } /* end for */ - HDprintf("\n Destination is:\n"); + printf("\n Destination is:\n"); for (i = 0; i < ny; i++) { - HDprintf("%3lu:", (unsigned long)i); + printf("%3lu:", (unsigned long)i); for (j = 0; j < nx; j++) - HDprintf(" %6d", dst[i * nx + j]); - HDprintf("\n"); + printf(" %6d", dst[i * nx + j]); + printf("\n"); } /* end for */ } /* end if */ goto error; @@ -871,7 +871,7 @@ test_sub_super(size_t nx, size_t ny) HDsnprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)(2 * nx), (unsigned long)(2 * ny), (unsigned long)nx, (unsigned long)ny); - HDprintf("%-70s", s); + printf("%-70s", s); HDfflush(stdout); /* Initialize */ @@ -902,11 +902,11 @@ test_sub_super(size_t nx, size_t ny) H5_FAILED(); if (!HDisatty(1)) { AT(); - HDprintf(" full[%lu][%lu] != half[%lu][%lu]\n", (unsigned long)i * 2, - (unsigned long)j * 2, (unsigned long)i, (unsigned long)j); - HDprintf(" full is:\n"); + printf(" full[%lu][%lu] != half[%lu][%lu]\n", (unsigned long)i * 2, + (unsigned long)j * 2, (unsigned long)i, (unsigned long)j); + printf(" full is:\n"); print_array(full, 2 * nx, 2 * ny, (size_t)1); - HDprintf("\n half is:\n"); + printf("\n half is:\n"); print_array(half, nx, ny, (size_t)1); } /* end if */ goto error; @@ -921,7 +921,7 @@ test_sub_super(size_t nx, size_t ny) */ HDsnprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)nx, (unsigned long)ny, (unsigned long)(2 * nx), (unsigned long)(2 * ny)); - HDprintf("%-70s", s); + printf("%-70s", s); HDfflush(stdout); /* Setup stride */ @@ -961,9 +961,9 @@ test_sub_super(size_t nx, size_t ny) H5_FAILED(); if (!HDisatty(1)) { AT(); - HDprintf(" %s\n Half is:\n", s); + printf(" %s\n Half is:\n", s); print_array(half, nx, ny, (size_t)1); - HDprintf("\n Twice is:\n"); + printf("\n Twice is:\n"); print_array(twice, 2 * nx, 2 * ny, (size_t)1); } /* end if */ goto error; @@ -1117,8 +1117,8 @@ test_array_offset_n_calc(size_t n, size_t x, size_t y, size_t z) /* Check computed coordinates */ for (v = 0; v < ARRAY_OFFSET_NDIMS; v++) if (coords[v] != new_coords[v]) { - HDfprintf(stderr, "coords[%zu]=%" PRIuHSIZE ", new_coords[%zu]=%" PRIuHSIZE "\n", v, - coords[v], v, new_coords[v]); + fprintf(stderr, "coords[%zu]=%" PRIuHSIZE ", new_coords[%zu]=%" PRIuHSIZE "\n", v, coords[v], + v, new_coords[v]); TEST_ERROR; } /* end if */ } /* end for */ @@ -1169,18 +1169,18 @@ main(int argc, char *argv[]) else if (!HDstrcmp(argv[i], "medium")) size_of_test |= TEST_MEDIUM; else { - HDprintf("unrecognized argument: %s\n", argv[i]); + printf("unrecognized argument: %s\n", argv[i]); HDexit(EXIT_FAILURE); } /* end else */ } /* end for */ } /* end else */ - HDprintf("Test sizes: "); + printf("Test sizes: "); if (size_of_test & TEST_SMALL) - HDprintf(" SMALL"); + printf(" SMALL"); if (size_of_test & TEST_MEDIUM) - HDprintf(" MEDIUM"); - HDprintf("\n"); + printf(" MEDIUM"); + printf("\n"); /* Set the random # seed */ HDsrandom((unsigned)HDtime(NULL)); @@ -1384,13 +1384,13 @@ main(int argc, char *argv[]) /*--- END OF TESTS ---*/ if (nerrors) { - HDprintf("***** %d HYPERSLAB TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); + printf("***** %d HYPERSLAB TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); if (HDisatty(1)) - HDprintf("(Redirect output to a pager or a file to see debug output)\n"); + printf("(Redirect output to a pager or a file to see debug output)\n"); HDexit(EXIT_FAILURE); } /* end if */ - HDprintf("All hyperslab tests passed.\n"); + printf("All hyperslab tests passed.\n"); #ifdef H5_HAVE_THREADSAFE H5close(); |