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 28, 2024
1 parent 62f30c5 commit 24a63c8
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/H5Tconv_complex.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
static herr_t H5T__conv_complex_loop(const H5T_t *src_p, const H5T_t *dst_p, const H5T_conv_ctx_t *conv_ctx,
size_t nelmts, size_t buf_stride, void *buf);
static herr_t H5T__conv_complex_part(const H5T_t *src_p, const H5T_t *dst_p, uint8_t *s, uint8_t *d,
const H5T_conv_ctx_t *conv_ctx, uint8_t *src_rev, bool *exception_handled);
const H5T_conv_ctx_t *conv_ctx, uint8_t *src_rev,
bool *exception_handled);

/*-------------------------------------------------------------------------
* Function: H5T__conv_complex
Expand Down Expand Up @@ -401,9 +402,10 @@ H5T__conv_complex_loop(const H5T_t *src_p, const H5T_t *dst_p, const H5T_conv_ct
else {
bool exception_handled = false;

if (H5T__conv_complex_part(src_p, dst_p, s + src_part_size, d + dst_part_size,
conv_ctx, src_rev, &exception_handled) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't convert imaginary part of complex number");
if (H5T__conv_complex_part(src_p, dst_p, s + src_part_size, d + dst_part_size, conv_ctx, src_rev,
&exception_handled) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't convert imaginary part of complex number");

/* If an exception was handled, go to the next element */
if (exception_handled) {
Expand Down Expand Up @@ -626,8 +628,8 @@ H5T__conv_complex_part(const H5T_t *src_p, const H5T_t *dst_p, uint8_t *s, uint8
H5T__reverse_order(src_rev, s, src_p);

except_ret = (conv_ctx->u.conv.cb_struct.func)(
H5T_CONV_EXCEPT_RANGE_HI, conv_ctx->u.conv.src_type_id, conv_ctx->u.conv.dst_type_id,
src_rev, d, conv_ctx->u.conv.cb_struct.user_data);
H5T_CONV_EXCEPT_RANGE_HI, conv_ctx->u.conv.src_type_id, conv_ctx->u.conv.dst_type_id, src_rev,
d, conv_ctx->u.conv.cb_struct.user_data);
}

if (except_ret == H5T_CONV_UNHANDLED) {
Expand Down Expand Up @@ -659,7 +661,9 @@ H5T__conv_complex_part(const H5T_t *src_p, const H5T_t *dst_p, uint8_t *s, uint8
if (H5T__bit_get_d(s, (mpos + (size_t)mant_msb) - 1, (size_t)1) && !denormalized) {
/* Don't do rounding if exponent is 111...110 and mantissa is 111...11.
* To do rounding and increment exponent in this case will create an infinity value. */
if ((H5T__bit_find(s, mpos + (size_t)mant_msb, msize - (size_t)mant_msb, H5T_BIT_LSB, false) >= 0 || expo < expo_max - 1)) {
if ((H5T__bit_find(s, mpos + (size_t)mant_msb, msize - (size_t)mant_msb, H5T_BIT_LSB, false) >=
0 ||
expo < expo_max - 1)) {
carry = H5T__bit_inc(s, mpos + (size_t)mant_msb - 1, 1 + msize - (size_t)mant_msb);
if (carry)
implied = 2;
Expand Down Expand Up @@ -716,8 +720,8 @@ H5T__conv_complex_part(const H5T_t *src_p, const H5T_t *dst_p, uint8_t *s, uint8
H5T__reverse_order(src_rev, s, src_p);

except_ret = (conv_ctx->u.conv.cb_struct.func)(
H5T_CONV_EXCEPT_RANGE_HI, conv_ctx->u.conv.src_type_id,
conv_ctx->u.conv.dst_type_id, src_rev, d, conv_ctx->u.conv.cb_struct.user_data);
H5T_CONV_EXCEPT_RANGE_HI, conv_ctx->u.conv.src_type_id, conv_ctx->u.conv.dst_type_id,
src_rev, d, conv_ctx->u.conv.cb_struct.user_data);
}

if (except_ret == H5T_CONV_UNHANDLED) {
Expand Down

0 comments on commit 24a63c8

Please sign in to comment.