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 Oct 9, 2024
1 parent 756db47 commit 6accc9f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 36 deletions.
24 changes: 11 additions & 13 deletions src/H5Tconv_float.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,16 @@ H5T__conv_f_f_loop(const H5T_t *src_p, const H5T_t *dst_p, const H5T_conv_ctx_t
/* The conversion loop */
for (size_t elmtno = 0; elmtno < nelmts; elmtno++) {
H5T_conv_float_specval_t specval_type; /* floating-point value type (regular, +/-Inf, +/-0, NaN) */
H5T_conv_ret_t except_ret =
H5T_CONV_UNHANDLED; /* return of conversion exception callback function */
ssize_t bitno = 0; /* bit number */
int64_t expo; /* exponent */
size_t implied; /* destination implied bits */
size_t mpos; /* offset to useful mant in src */
size_t msize = 0; /* useful size of mantissa in src */
size_t mrsh; /* amount to right shift mantissa */
bool reverse = true; /* if reversed the order of destination */
bool denormalized = false; /* is either source or destination denormalized? */
bool carry = false; /* carry after rounding mantissa */
H5T_conv_ret_t except_ret = H5T_CONV_UNHANDLED; /* return of conversion exception callback function */
ssize_t bitno = 0; /* bit number */
int64_t expo; /* exponent */
size_t implied; /* destination implied bits */
size_t mpos; /* offset to useful mant in src */
size_t msize = 0; /* useful size of mantissa in src */
size_t mrsh; /* amount to right shift mantissa */
bool reverse = true; /* if reversed the order of destination */
bool denormalized = false; /* is either source or destination denormalized? */
bool carry = false; /* carry after rounding mantissa */

/*
* If the source and destination buffers overlap then use a
Expand Down Expand Up @@ -870,8 +869,7 @@ H5T__conv_f_i_loop(const H5T_t *src_p, const H5T_t *dst_p, const H5T_conv_ctx_t
/* The conversion loop */
for (size_t elmtno = 0; elmtno < nelmts; elmtno++) {
H5T_conv_float_specval_t specval_type; /* floating-point value type (regular, +/-Inf, +/-0, NaN) */
H5T_conv_ret_t except_ret =
H5T_CONV_UNHANDLED; /* return of conversion exception callback function */
H5T_conv_ret_t except_ret = H5T_CONV_UNHANDLED; /* return of conversion exception callback function */
uint64_t sign; /* source sign bit value */
hssize_t expo; /* source exponent */
hssize_t shift_val; /* shift value when shifting mantissa by exponent */
Expand Down
28 changes: 14 additions & 14 deletions test/dt_arith.c
Original file line number Diff line number Diff line change
Expand Up @@ -3649,7 +3649,7 @@ test_conv_flt_1_hw_conv_from_double(void *hw_dst, unsigned char *src_buf, size_t
#ifdef H5_HAVE_C99_COMPLEX_NUMBERS
*((H5_float_complex *)hw_dst) = (H5_float_complex)aligned;
#else
*((H5_float_complex *)hw_dst) = H5_CMPLXF(aligned, 0.0F);
*((H5_float_complex *)hw_dst) = H5_CMPLXF(aligned, 0.0F);
#endif

/* Check for overflow and underflow */
Expand All @@ -3663,7 +3663,7 @@ test_conv_flt_1_hw_conv_from_double(void *hw_dst, unsigned char *src_buf, size_t
#ifdef H5_HAVE_C99_COMPLEX_NUMBERS
*((H5_double_complex *)hw_dst) = (H5_double_complex)aligned;
#else
*((H5_double_complex *)hw_dst) = H5_CMPLX(aligned, 0.0);
*((H5_double_complex *)hw_dst) = H5_CMPLX(aligned, 0.0);
#endif
break;
case LDBL_COMPLEX:
Expand Down Expand Up @@ -3775,7 +3775,7 @@ test_conv_flt_1_hw_conv_from_ldouble(void *hw_dst, unsigned char *src_buf, size_
#ifdef H5_HAVE_C99_COMPLEX_NUMBERS
*((H5_float_complex *)hw_dst) = (H5_float_complex)aligned;
#else
*((H5_float_complex *)hw_dst) = H5_CMPLXF(aligned, 0.0F);
*((H5_float_complex *)hw_dst) = H5_CMPLXF(aligned, 0.0F);
#endif

/* Check for overflow and underflow */
Expand All @@ -3789,7 +3789,7 @@ test_conv_flt_1_hw_conv_from_ldouble(void *hw_dst, unsigned char *src_buf, size_
#ifdef H5_HAVE_C99_COMPLEX_NUMBERS
*((H5_double_complex *)hw_dst) = (H5_double_complex)aligned;
#else
*((H5_double_complex *)hw_dst) = H5_CMPLX(aligned, 0.0);
*((H5_double_complex *)hw_dst) = H5_CMPLX(aligned, 0.0);
#endif

/* Check for overflow and underflow */
Expand Down Expand Up @@ -3864,14 +3864,14 @@ test_conv_flt_1_hw_conv_from_fcomplex(void *hw_dst, unsigned char *src_buf, size
#ifdef H5_HAVE_C99_COMPLEX_NUMBERS
*((float *)hw_dst) = (float)aligned;
#else
*((float *)hw_dst) = crealf(aligned);
*((float *)hw_dst) = crealf(aligned);
#endif
break;
case FLT_DOUBLE:
#ifdef H5_HAVE_C99_COMPLEX_NUMBERS
*((double *)hw_dst) = (double)aligned;
#else
*((double *)hw_dst) = (double)crealf(aligned);
*((double *)hw_dst) = (double)crealf(aligned);
#endif
break;
case FLT_LDOUBLE:
Expand All @@ -3892,7 +3892,7 @@ test_conv_flt_1_hw_conv_from_fcomplex(void *hw_dst, unsigned char *src_buf, size
#ifdef H5_HAVE_C99_COMPLEX_NUMBERS
*((H5__Float16 *)hw_dst) = (H5__Float16)aligned;
#else
*((H5__Float16 *)hw_dst) = (H5__Float16)real_val;
*((H5__Float16 *)hw_dst) = (H5__Float16)real_val;
#endif

/* Check for overflow and underflow */
Expand Down Expand Up @@ -3979,7 +3979,7 @@ test_conv_flt_1_hw_conv_from_dcomplex(void *hw_dst, unsigned char *src_buf, size
#ifdef H5_HAVE_C99_COMPLEX_NUMBERS
*((float *)hw_dst) = (float)aligned;
#else
*((float *)hw_dst) = (float)real_val;
*((float *)hw_dst) = (float)real_val;
#endif

/* Check for overflow and underflow */
Expand All @@ -3993,7 +3993,7 @@ test_conv_flt_1_hw_conv_from_dcomplex(void *hw_dst, unsigned char *src_buf, size
#ifdef H5_HAVE_C99_COMPLEX_NUMBERS
*((double *)hw_dst) = (double)aligned;
#else
*((double *)hw_dst) = (double)creal(aligned);
*((double *)hw_dst) = (double)creal(aligned);
#endif
break;
case FLT_LDOUBLE:
Expand All @@ -4011,7 +4011,7 @@ test_conv_flt_1_hw_conv_from_dcomplex(void *hw_dst, unsigned char *src_buf, size
#ifdef H5_HAVE_C99_COMPLEX_NUMBERS
*((H5__Float16 *)hw_dst) = (H5__Float16)aligned;
#else
*((H5__Float16 *)hw_dst) = (H5__Float16)creal(aligned);
*((H5__Float16 *)hw_dst) = (H5__Float16)creal(aligned);
#endif

/* Check for overflow and underflow */
Expand Down Expand Up @@ -4137,7 +4137,7 @@ test_conv_flt_1_hw_conv_from_lcomplex(void *hw_dst, unsigned char *src_buf, size
#ifdef H5_HAVE_C99_COMPLEX_NUMBERS
*((float *)hw_dst) = (float)aligned;
#else
*((float *)hw_dst) = (float)real_val;
*((float *)hw_dst) = (float)real_val;
#endif

/* Check for overflow and underflow */
Expand All @@ -4153,7 +4153,7 @@ test_conv_flt_1_hw_conv_from_lcomplex(void *hw_dst, unsigned char *src_buf, size
#ifdef H5_HAVE_C99_COMPLEX_NUMBERS
*((double *)hw_dst) = (double)aligned;
#else
*((double *)hw_dst) = (double)real_val;
*((double *)hw_dst) = (double)real_val;
#endif

/* Check for overflow and underflow */
Expand All @@ -4178,7 +4178,7 @@ test_conv_flt_1_hw_conv_from_lcomplex(void *hw_dst, unsigned char *src_buf, size
#ifdef H5_HAVE_C99_COMPLEX_NUMBERS
*((H5__Float16 *)hw_dst) = (H5__Float16)aligned;
#else
*((H5__Float16 *)hw_dst) = (H5__Float16)creall(aligned);
*((H5__Float16 *)hw_dst) = (H5__Float16)creall(aligned);
#endif

/* Check for overflow and underflow */
Expand Down Expand Up @@ -4206,7 +4206,7 @@ test_conv_flt_1_hw_conv_from_lcomplex(void *hw_dst, unsigned char *src_buf, size
#ifdef H5_HAVE_C99_COMPLEX_NUMBERS
*((H5_float_complex *)hw_dst) = (H5_float_complex)aligned;
#else
*((H5_float_complex *)hw_dst) = H5_CMPLXF((float)real_val, (float)imag_val);
*((H5_float_complex *)hw_dst) = H5_CMPLXF((float)real_val, (float)imag_val);
#endif

/* Check for overflow and underflow */
Expand Down
2 changes: 1 addition & 1 deletion test/dtypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -12546,7 +12546,7 @@ static int
test_complex_type_versionbounds(void)
{
H5F_libver_t versions[] = {H5F_LIBVER_EARLIEST, H5F_LIBVER_V18, H5F_LIBVER_V110,
H5F_LIBVER_V112, H5F_LIBVER_V114, H5F_LIBVER_V116};
H5F_LIBVER_V112, H5F_LIBVER_V114, H5F_LIBVER_V116};
hsize_t arr_dim[] = {5}; /* Length of the array */
hid_t file = H5I_INVALID_HID; /* File ID */
hid_t space = H5I_INVALID_HID; /* Dataspace ID */
Expand Down
16 changes: 8 additions & 8 deletions tools/test/h5dump/h5dumpgentest.c
Original file line number Diff line number Diff line change
Expand Up @@ -12271,19 +12271,19 @@ gent_complex(void)

struct {
H5_float_complex arr[F95_XDIM][F95_YDIM];
} * dset_fc;
} *dset_fc;

struct {
H5_double_complex arr[F95_XDIM][F95_YDIM];
} * dset_dc;
} *dset_dc;

struct {
H5_ldouble_complex arr[F95_XDIM][F95_YDIM];
} * dset_ldc;
} *dset_ldc;

struct {
hvl_t arr[F95_XDIM];
} * dset_var_fc;
} *dset_var_fc;

fid = H5Fcreate(FILE95, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

Expand Down Expand Up @@ -12522,19 +12522,19 @@ gent_complex_be(void)

struct {
H5_float_complex arr[F96_XDIM][F96_YDIM];
} * dset_fc;
} *dset_fc;

struct {
H5_double_complex arr[F96_XDIM][F96_YDIM];
} * dset_dc;
} *dset_dc;

struct {
H5_ldouble_complex arr[F96_XDIM][F96_YDIM];
} * dset_ldc;
} *dset_ldc;

struct {
hvl_t arr[F96_XDIM];
} * dset_var_fc;
} *dset_var_fc;

fid = H5Fcreate(FILE96, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

Expand Down

0 comments on commit 6accc9f

Please sign in to comment.