Skip to content

Commit

Permalink
Committing clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 20, 2024
1 parent c23f698 commit f495638
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 41 deletions.
2 changes: 1 addition & 1 deletion java/src/hdf/hdf5lib/H5.java
Original file line number Diff line number Diff line change
Expand Up @@ -13763,7 +13763,7 @@ public synchronized static native void H5Tcompiler_conv(long src_id, long dst_id
**/
public static long H5Tcomplex_create(long base_id) throws HDF5LibraryException
{
long id = _H5Tcomplex_create(base_id);
long id = _H5Tcomplex_create(base_id);
if (id > 0) {
log.trace("OPEN_IDS: H5Tcomplex_create add {}", id);
OPEN_IDS.add(id);
Expand Down
44 changes: 22 additions & 22 deletions java/test/TestH5T.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,15 @@ public void testH5Tget_array_dims()
@Test
public void testH5Tcomplex_create()
{
String class_name;
long[] fields1 = { 0, 0, 0, 0, 0 };
long[] fields2 = { 0, 0, 0, 0, 0 };
long filetype_id = HDF5Constants.H5I_INVALID_HID;
long dt_size = -1;
int typeclass = -1;
int typeorder = HDF5Constants.H5T_ORDER_ERROR;
int prec1 = 0;
int prec2 = 0;
String class_name;
long[] fields1 = {0, 0, 0, 0, 0};
long[] fields2 = {0, 0, 0, 0, 0};
long filetype_id = HDF5Constants.H5I_INVALID_HID;
long dt_size = -1;
int typeclass = -1;
int typeorder = HDF5Constants.H5T_ORDER_ERROR;
int prec1 = 0;
int prec2 = 0;

try {
filetype_id = H5.H5Tcomplex_create(HDF5Constants.H5T_IEEE_F32LE);
Expand All @@ -266,19 +266,19 @@ public void testH5Tcomplex_create()
assertTrue("H5.H5Tget_size", dt_size == 8);

typeorder = H5.H5Tget_order(filetype_id);
assertTrue("H5.H5Tget_order", typeorder == HDF5Constants.H5T_ORDER_LE);

prec1 = H5.H5Tget_precision(HDF5Constants.H5T_IEEE_F32LE);
prec2 = H5.H5Tget_precision(filetype_id);
assertTrue("H5.H5Tget_precision", prec1 == prec2);

H5.H5Tget_fields(HDF5Constants.H5T_IEEE_F32LE, fields1);
H5.H5Tget_fields(filetype_id, fields2);
assertTrue("H5.H5Tget_fields[spos]", fields1[0] == fields2[0]);
assertTrue("H5.H5Tget_fields[epos]", fields1[1] == fields2[1]);
assertTrue("H5.H5Tget_fields[esize]", fields1[2] == fields2[2]);
assertTrue("H5.H5Tget_fields[mpos]", fields1[3] == fields2[3]);
assertTrue("H5.H5Tget_fields[msize]", fields1[4] == fields2[4]);
assertTrue("H5.H5Tget_order", typeorder == HDF5Constants.H5T_ORDER_LE);

prec1 = H5.H5Tget_precision(HDF5Constants.H5T_IEEE_F32LE);
prec2 = H5.H5Tget_precision(filetype_id);
assertTrue("H5.H5Tget_precision", prec1 == prec2);

H5.H5Tget_fields(HDF5Constants.H5T_IEEE_F32LE, fields1);
H5.H5Tget_fields(filetype_id, fields2);
assertTrue("H5.H5Tget_fields[spos]", fields1[0] == fields2[0]);
assertTrue("H5.H5Tget_fields[epos]", fields1[1] == fields2[1]);
assertTrue("H5.H5Tget_fields[esize]", fields1[2] == fields2[2]);
assertTrue("H5.H5Tget_fields[mpos]", fields1[3] == fields2[3]);
assertTrue("H5.H5Tget_fields[msize]", fields1[4] == fields2[4]);
}
catch (Throwable err) {
err.printStackTrace();
Expand Down
6 changes: 3 additions & 3 deletions test/dtypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,9 @@ test_detect(void)
if (H5Tdetect_class(H5T_NATIVE_INT, H5T_ENUM) != false)
TEST_ERROR;

/*--------------------------------------------------------------------------------
* Test class of complex number types.
*------------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------------
* Test class of complex number types.
*------------------------------------------------------------------------------*/
if (H5Tdetect_class(H5T_CPLX_IEEE_F16LE, H5T_COMPLEX) != true)
TEST_ERROR;
if (H5Tdetect_class(H5T_CPLX_IEEE_F16BE, H5T_COMPLEX) != true)
Expand Down
31 changes: 16 additions & 15 deletions test/tarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -1593,18 +1593,18 @@ test_array_complex(void)
{
float _Complex wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
float _Complex rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
H5T_class_t mclass; /* Datatype class for VL */
hsize_t sdims1[] = {SPACE1_DIM1}; /* Dataset dimensions */
hsize_t tdims1[] = {ARRAY1_DIM1}; /* Array type dimensions */
hid_t fid1; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
hid_t sid1; /* Dataspace ID */
hid_t tid1; /* Array Datatype ID */
hid_t tid2; /* Complex Number Datatype ID */
hid_t tid3; /* Atomic Datatype ID */
int ndims; /* Array rank for reading */
hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
herr_t ret; /* Generic return value */
H5T_class_t mclass; /* Datatype class for VL */
hsize_t sdims1[] = {SPACE1_DIM1}; /* Dataset dimensions */
hsize_t tdims1[] = {ARRAY1_DIM1}; /* Array type dimensions */
hid_t fid1; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
hid_t sid1; /* Dataspace ID */
hid_t tid1; /* Array Datatype ID */
hid_t tid2; /* Complex Number Datatype ID */
hid_t tid3; /* Atomic Datatype ID */
int ndims; /* Array rank for reading */
hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
herr_t ret; /* Generic return value */

/* Output message about test being performed */
MESSAGE(5, ("Testing 1-D Array of Complex Number Datatypes Functionality\n"));
Expand Down Expand Up @@ -1724,9 +1724,10 @@ test_array_complex(void)
for (size_t i = 0; i < SPACE1_DIM1; i++) {
for (size_t j = 0; j < ARRAY1_DIM1; j++) {
if (0 != memcmp(&wdata[i][j], &rdata[i][j], sizeof(float _Complex)))
TestErrPrintf("Complex number data doesn't match!, wdata[%d][%d]=%f%+fi, rdata[%d][%d]=%f%+fi\n",
(int)i, (int)j, (double)crealf(wdata[i][j]), (double)cimagf(wdata[i][j]),
(int)i, (int)j, (double)crealf(wdata[i][j]), (double)cimagf(wdata[i][j]));
TestErrPrintf(
"Complex number data doesn't match!, wdata[%d][%d]=%f%+fi, rdata[%d][%d]=%f%+fi\n",
(int)i, (int)j, (double)crealf(wdata[i][j]), (double)cimagf(wdata[i][j]), (int)i, (int)j,
(double)crealf(wdata[i][j]), (double)cimagf(wdata[i][j]));
}
}

Expand Down

0 comments on commit f495638

Please sign in to comment.