Skip to content

Commit

Permalink
Format source
Browse files Browse the repository at this point in the history
  • Loading branch information
derobins committed Sep 14, 2023
1 parent 1e8d031 commit 0729a58
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
54 changes: 27 additions & 27 deletions src/H5Tconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -4329,19 +4329,19 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
olap = nelmts;
}
else if (src_p->shared->size >= dst_p->shared->size) {
double olap_d = ceil((double)(dst_p->shared->size) /
(double)(src_p->shared->size - dst_p->shared->size));
olap = (size_t)olap_d;
double olap_d =
ceil((double)(dst_p->shared->size) / (double)(src_p->shared->size - dst_p->shared->size));
olap = (size_t)olap_d;
sp = dp = (uint8_t *)buf;
direction = 1;
}
else {
double olap_d = ceil((double)(src_p->shared->size) /
(double)(dst_p->shared->size - src_p->shared->size));
olap = (size_t)olap_d;
sp = (uint8_t *)buf + (nelmts - 1) * src_p->shared->size;
dp = (uint8_t *)buf + (nelmts - 1) * dst_p->shared->size;
direction = -1;
double olap_d =
ceil((double)(src_p->shared->size) / (double)(dst_p->shared->size - src_p->shared->size));
olap = (size_t)olap_d;
sp = (uint8_t *)buf + (nelmts - 1) * src_p->shared->size;
dp = (uint8_t *)buf + (nelmts - 1) * dst_p->shared->size;
direction = -1;
}

/*
Expand Down Expand Up @@ -7958,19 +7958,19 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
olap = nelmts;
}
else if (src_p->shared->size >= dst_p->shared->size) {
double olap_d = ceil((double)(dst_p->shared->size) /
(double)(src_p->shared->size - dst_p->shared->size));
olap = (size_t)olap_d;
double olap_d =
ceil((double)(dst_p->shared->size) / (double)(src_p->shared->size - dst_p->shared->size));
olap = (size_t)olap_d;
sp = dp = (uint8_t *)buf;
direction = 1;
}
else {
double olap_d = ceil((double)(src_p->shared->size) /
(double)(dst_p->shared->size - src_p->shared->size));
olap = (size_t)olap_d;
sp = (uint8_t *)buf + (nelmts - 1) * src_p->shared->size;
dp = (uint8_t *)buf + (nelmts - 1) * dst_p->shared->size;
direction = -1;
double olap_d =
ceil((double)(src_p->shared->size) / (double)(dst_p->shared->size - src_p->shared->size));
olap = (size_t)olap_d;
sp = (uint8_t *)buf + (nelmts - 1) * src_p->shared->size;
dp = (uint8_t *)buf + (nelmts - 1) * dst_p->shared->size;
direction = -1;
}

/* Allocate enough space for the buffer holding temporary
Expand Down Expand Up @@ -8583,19 +8583,19 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
olap = nelmts;
}
else if (src_p->shared->size >= dst_p->shared->size) {
double olap_d = ceil((double)(dst_p->shared->size) /
(double)(src_p->shared->size - dst_p->shared->size));
olap = (size_t)olap_d;
double olap_d =
ceil((double)(dst_p->shared->size) / (double)(src_p->shared->size - dst_p->shared->size));
olap = (size_t)olap_d;
sp = dp = (uint8_t *)buf;
direction = 1;
}
else {
double olap_d = ceil((double)(src_p->shared->size) /
(double)(dst_p->shared->size - src_p->shared->size));
olap = (size_t)olap_d;
sp = (uint8_t *)buf + (nelmts - 1) * src_p->shared->size;
dp = (uint8_t *)buf + (nelmts - 1) * dst_p->shared->size;
direction = -1;
double olap_d =
ceil((double)(src_p->shared->size) / (double)(dst_p->shared->size - src_p->shared->size));
olap = (size_t)olap_d;
sp = (uint8_t *)buf + (nelmts - 1) * src_p->shared->size;
dp = (uint8_t *)buf + (nelmts - 1) * dst_p->shared->size;
direction = -1;
}

/* Allocate enough space for the buffer holding temporary
Expand Down
12 changes: 6 additions & 6 deletions src/H5Zscaleoffset.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,12 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
#define H5Z_scaleoffset_max_min_3(i, d_nelmts, buf, filval, max, min, D_val) \
{ \
i = 0; \
while (i < d_nelmts && fabs((double)(buf[i] - filval)) < pow(10.0, -D_val)) \
while (i < d_nelmts && fabs((double)(buf[i] - filval)) < pow(10.0, -D_val)) \
i++; \
if (i < d_nelmts) \
min = max = buf[i]; \
for (; i < d_nelmts; i++) { \
if (fabs((double)(buf[i] - filval)) < pow(10.0, -D_val)) \
if (fabs((double)(buf[i] - filval)) < pow(10.0, -D_val)) \
continue; /* ignore fill value */ \
if (buf[i] > max) \
max = buf[i]; \
Expand Down Expand Up @@ -1562,11 +1562,11 @@ H5Z__scaleoffset_precompress_fd(void *data, unsigned d_nelmts, enum H5Z_scaleoff
FUNC_ENTER_PACKAGE

if (type == t_float)
H5Z_scaleoffset_precompress_3(float, powf, fabsf, roundf, lroundf, llroundf, data, d_nelmts,
filavail, cd_values, minbits, minval, D_val);
H5Z_scaleoffset_precompress_3(float, powf, fabsf, roundf, lroundf, llroundf, data, d_nelmts, filavail,
cd_values, minbits, minval, D_val);
else if (type == t_double)
H5Z_scaleoffset_precompress_3(double, pow, fabs, round, lround, llround, data, d_nelmts,
filavail, cd_values, minbits, minval, D_val);
H5Z_scaleoffset_precompress_3(double, pow, fabs, round, lround, llround, data, d_nelmts, filavail,
cd_values, minbits, minval, D_val);

done:
FUNC_LEAVE_NOAPI(ret_value)
Expand Down

0 comments on commit 0729a58

Please sign in to comment.