summaryrefslogtreecommitdiffstats
path: root/src/H5Vprivate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Vprivate.h')
-rw-r--r--src/H5Vprivate.h47
1 files changed, 31 insertions, 16 deletions
diff --git a/src/H5Vprivate.h b/src/H5Vprivate.h
index 063d92a..156e6bd 100644
--- a/src/H5Vprivate.h
+++ b/src/H5Vprivate.h
@@ -100,9 +100,12 @@ H5V_vector_reduce_product(unsigned n, const hsize_t *v)
{
hsize_t ans = 1;
- if (n && !v) return 0;
+ /* Use FUNC_ENTER_NOINIT here to avoid performance issues */
+ FUNC_ENTER_NOINIT(H5V_vector_reduce_product);
+
+ if (n && !v) HRETURN(0);
while (n--) ans *= *v++;
- return ans;
+ FUNC_LEAVE(ans);
}
/*-------------------------------------------------------------------------
@@ -125,11 +128,14 @@ H5V_vector_reduce_product(unsigned n, const hsize_t *v)
static H5_inline htri_t UNUSED
H5V_vector_zerop_u(int n, const hsize_t *v)
{
- if (!v) return TRUE;
+ /* Use FUNC_ENTER_NOINIT here to avoid performance issues */
+ FUNC_ENTER_NOINIT(H5V_vector_zerop_u);
+
+ if (!v) HRETURN(TRUE);
while (n--) {
- if (*v++) return FALSE;
+ if (*v++) HRETURN(FALSE);
}
- return TRUE;
+ FUNC_LEAVE(TRUE);
}
/*-------------------------------------------------------------------------
@@ -152,11 +158,14 @@ H5V_vector_zerop_u(int n, const hsize_t *v)
static H5_inline htri_t UNUSED
H5V_vector_zerop_s(int n, const hssize_t *v)
{
- if (!v) return TRUE;
+ /* Use FUNC_ENTER_NOINIT here to avoid performance issues */
+ FUNC_ENTER_NOINIT(H5V_vector_zerop_s);
+
+ if (!v) HRETURN(TRUE);
while (n--) {
- if (*v++) return FALSE;
+ if (*v++) HRETURN(FALSE);
}
- return TRUE;
+ FUNC_LEAVE(TRUE);
}
/*-------------------------------------------------------------------------
@@ -181,14 +190,17 @@ H5V_vector_zerop_s(int n, const hssize_t *v)
static H5_inline int UNUSED
H5V_vector_cmp_u (int n, const hsize_t *v1, const hsize_t *v2)
{
- if (v1 == v2) return 0;
+ /* Use FUNC_ENTER_NOINIT here to avoid performance issues */
+ FUNC_ENTER_NOINIT(H5V_vector_cmp_u);
+
+ if (v1 == v2) HRETURN(0);
while (n--) {
- if ((v1 ? *v1 : 0) < (v2 ? *v2 : 0)) return -1;
- if ((v1 ? *v1 : 0) > (v2 ? *v2 : 0)) return 1;
+ if ((v1 ? *v1 : 0) < (v2 ? *v2 : 0)) HRETURN(-1);
+ if ((v1 ? *v1 : 0) > (v2 ? *v2 : 0)) HRETURN(1);
if (v1) v1++;
if (v2) v2++;
}
- return 0;
+ FUNC_LEAVE(0);
}
@@ -214,14 +226,17 @@ H5V_vector_cmp_u (int n, const hsize_t *v1, const hsize_t *v2)
static H5_inline int UNUSED
H5V_vector_cmp_s (unsigned n, const hssize_t *v1, const hssize_t *v2)
{
- if (v1 == v2) return 0;
+ /* Use FUNC_ENTER_NOINIT here to avoid performance issues */
+ FUNC_ENTER_NOINIT(H5V_vector_cmp_s);
+
+ if (v1 == v2) HRETURN(0);
while (n--) {
- if ((v1 ? *v1 : 0) < (v2 ? *v2 : 0)) return -1;
- if ((v1 ? *v1 : 0) > (v2 ? *v2 : 0)) return 1;
+ if ((v1 ? *v1 : 0) < (v2 ? *v2 : 0)) HRETURN(-1);
+ if ((v1 ? *v1 : 0) > (v2 ? *v2 : 0)) HRETURN(1);
if (v1) v1++;
if (v2) v2++;
}
- return 0;
+ FUNC_LEAVE(0);
}