summaryrefslogtreecommitdiffstats
path: root/src/H5VM.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5VM.c')
-rw-r--r--src/H5VM.c60
1 files changed, 3 insertions, 57 deletions
diff --git a/src/H5VM.c b/src/H5VM.c
index 10ea511..43963cd 100644
--- a/src/H5VM.c
+++ b/src/H5VM.c
@@ -386,55 +386,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5VM_hyper_disjointp
- *
- * Purpose: Determines if two hyperslabs are disjoint.
- *
- * Return: Success: FALSE if they are not disjoint.
- * TRUE if they are disjoint.
- *
- * Failure: A hyperslab of zero size is disjoint from all
- * other hyperslabs.
- *
- * Programmer: Robb Matzke
- * Thursday, October 16, 1997
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-htri_t
-H5VM_hyper_disjointp(unsigned n,
- const hsize_t *offset1, const uint32_t *size1,
- const hsize_t *offset2, const uint32_t *size2)
-{
- unsigned u;
- htri_t ret_value = FALSE; /* Return value */
-
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- if(!n || !size1 || !size2)
- HGOTO_DONE(TRUE)
-
- for(u = 0; u < n; u++) {
- HDcompile_assert(sizeof(uint32_t) <= sizeof(hsize_t));
-
- if(0 == size1[u] || 0 == size2[u])
- HGOTO_DONE(TRUE)
- if(((offset1 ? offset1[u] : 0) < (offset2 ? offset2[u] : 0) &&
- ((offset1 ? offset1[u] : 0) + size1[u] <= (offset2 ? offset2[u] : 0))) ||
- ((offset2 ? offset2[u] : 0) < (offset1 ? offset1[u] : 0) &&
- ((offset2 ? offset2[u] : 0) + size2[u] <= (offset1 ? offset1[u] : 0))))
- HGOTO_DONE(TRUE)
- } /* end for */
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5VM_hyper_disjointp() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5VM_hyper_fill
*
* Purpose: Similar to memset() except it operates on hyperslabs...
@@ -1068,17 +1019,12 @@ H5VM_array_down(unsigned n, const hsize_t *total_size, hsize_t *down)
* Programmer: Quincey Koziol
* Tuesday, June 22, 1999
*
- * Modifications:
- * Use precomputed accumulator array
- * Quincey Koziol
- * Saturday, April 26, 2003
- *
*-------------------------------------------------------------------------
*/
hsize_t
H5VM_array_offset_pre(unsigned n, const hsize_t *acc, const hsize_t *offset)
{
- int i; /*counter */
+ unsigned u; /* Local index variable */
hsize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1088,8 +1034,8 @@ H5VM_array_offset_pre(unsigned n, const hsize_t *acc, const hsize_t *offset)
HDassert(offset);
/* Compute offset in array */
- for(i = (int)(n - 1), ret_value = 0; i >= 0; --i)
- ret_value += acc[i] * offset[i];
+ for(u = 0, ret_value = 0; u < n; u++)
+ ret_value += acc[u] * offset[u];
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VM_array_offset_pre() */