summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
commit6b45f5172ccb4311e0be9ae15da3758abb6b0e67 (patch)
tree5a7a112fe7a8a98c6fecb45b513789d15962eb3d /src/H5Shyper.c
parent6562465a2c2a58cfbc2f47bf60bb538f7a783933 (diff)
downloadhdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.zip
hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.gz
hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.bz2
[svn-r11245] Purpose:
Code cleanup Description: Trim trailing whitespace, which is making 'diff'ing the two branches difficult. Solution: Ran this script in each directory: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 563e118..92f4b10 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -1047,7 +1047,7 @@ H5S_hyper_new_span (hsize_t low, hsize_t high, H5S_hyper_span_info_t *down, H5S_
/* Allocate a new span node */
if((ret_value = H5FL_MALLOC(H5S_hyper_span_t))==NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
-
+
/* Copy the span's basic information */
ret_value->low=low;
ret_value->high=high;
@@ -1258,7 +1258,7 @@ H5S_hyper_copy_span_helper (H5S_hyper_span_info_t *spans)
/* Allocate a new span_info node */
if((ret_value = H5FL_MALLOC(H5S_hyper_span_info_t))==NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span");
-
+
/* Copy the span_info information */
ret_value->count=1;
ret_value->scratch=NULL;
@@ -1374,7 +1374,7 @@ H5S_hyper_cmp_spans (H5S_hyper_span_info_t *span_info1, H5S_hyper_span_info_t *s
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_cmp_spans);
/* Check for redundant comparison */
- if(span_info1==span_info2)
+ if(span_info1==span_info2)
ret_value=TRUE;
else {
/* Check for both spans being NULL */
@@ -1783,7 +1783,7 @@ H5S_hyper_span_nblocks (H5S_hyper_span_info_t *spans)
/* If there are no down spans, just count the block in this span */
else
ret_value++;
-
+
/* Advance to next span */
span=span->next;
} /* end while */
@@ -1903,7 +1903,7 @@ H5S_hyper_serial_size (const H5S_t *space)
assert(space);
/* Basic number of bytes required to serialize hyperslab selection:
- * <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> +
+ * <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> +
* <length (4 bytes)> + <rank (4 bytes)> + <# of blocks (4 bytes)> = 24 bytes
*/
ret_value=24;
@@ -2124,7 +2124,7 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf)
/* Reset the block count in this dimension */
tmp_count[temp_dim]=diminfo[temp_dim].count;
-
+
/* Wrapped a dimension, go up to next dimension */
temp_dim--;
} /* end while */
@@ -2157,7 +2157,7 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf)
/* Encode length */
UINT32ENCODE(lenp, (uint32_t)len); /* Store the length of the extra information */
-
+
FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_hyper_serialize() */
@@ -2477,7 +2477,7 @@ H5S_get_select_hyper_blocklist(H5S_t *space, hbool_t internal, hsize_t startbloc
/* Reset the block count in this dimension */
tmp_count[temp_dim]=diminfo[temp_dim].count;
-
+
/* Wrapped a dimension, go up to next dimension */
temp_dim--;
} /* end while */
@@ -2490,7 +2490,7 @@ H5S_get_select_hyper_blocklist(H5S_t *space, hbool_t internal, hsize_t startbloc
} /* end for */
} /* end while */
} /* end if */
- else
+ else
ret_value=H5S_hyper_span_blocklist(space->select.sel_info.hslab->span_lst,start,end,(hsize_t)0,&startblock,&numblocks,&buf);
FUNC_LEAVE_NOAPI(ret_value);
@@ -2927,7 +2927,7 @@ H5S_hyper_is_single(const H5S_t *space)
} /* end if */
else {
/*
- * For a region to be single, it must have only one block
+ * For a region to be single, it must have only one block
*/
/* Get information for slowest changing information */
spans=space->select.sel_info.hslab->span_lst;
@@ -3217,7 +3217,7 @@ H5S_hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ran
/* Before we create another span at this level in the tree, check if
* the last span's "down tree" was equal to any other spans in this
* list of spans in the span tree.
- *
+ *
* If so, release last span information and make last span merge into
* previous span (if possible), or at least share their "down tree"
* information.
@@ -3283,7 +3283,7 @@ H5S_hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ran
/* Before we create another span at this level in the tree, check if
* the last span's "down tree" was equal to any other spans in this
* list of spans in the span tree.
- *
+ *
* If so, release last span information and make last span merge into
* previous span (if possible), or at least share their "down tree"
* information.
@@ -3620,7 +3620,7 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-htri_t
+htri_t
H5S_hyper_intersect (H5S_t *space1, H5S_t *space2)
{
htri_t ret_value=FAIL; /* Return value */
@@ -3739,7 +3739,7 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-htri_t
+htri_t
H5S_hyper_intersect_block (H5S_t *space, hsize_t *start, hsize_t *end)
{
htri_t ret_value=FAIL; /* Return value */
@@ -4235,7 +4235,7 @@ H5S_hyper_append_span (H5S_hyper_span_t **prev_span, H5S_hyper_span_info_t ** sp
/* Allocate new span node to append to list */
if((new_span = H5S_hyper_new_span(low,high,down,next))==NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
-
+
/* Make first node in span list */
/* Check that we haven't already allocated a span tree */
@@ -4244,7 +4244,7 @@ H5S_hyper_append_span (H5S_hyper_span_t **prev_span, H5S_hyper_span_info_t ** sp
/* Allocate a new span_info node */
if((*span_tree = H5FL_MALLOC(H5S_hyper_span_info_t))==NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
-
+
/* Set the span tree's basic information */
(*span_tree)->count=1;
(*span_tree)->scratch=NULL;
@@ -4256,7 +4256,7 @@ H5S_hyper_append_span (H5S_hyper_span_t **prev_span, H5S_hyper_span_info_t ** sp
/* Merge or append to existing merged spans list */
else {
/* Check if span can just extend the previous merged span */
- if((((*prev_span)->high+1)==low) &&
+ if((((*prev_span)->high+1)==low) &&
H5S_hyper_cmp_spans(down,(*prev_span)->down)==TRUE) {
/* Extend previous merged span to include new high bound */
(*prev_span)->high=high;
@@ -4266,7 +4266,7 @@ H5S_hyper_append_span (H5S_hyper_span_t **prev_span, H5S_hyper_span_info_t ** sp
/* Allocate new span node to append to list */
if((new_span = H5S_hyper_new_span(low,high,down,next))==NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span");
-
+
/* Check if there is actually a down span */
if(new_span->down) {
/* Check if the down spans for the new span node are the same as the previous span node */
@@ -4443,7 +4443,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps in the 'down spans' of span 'a' & 'b' */
if(H5S_hyper_clip_spans(span_a->down,span_b->down,&down_a_not_b,&down_a_and_b,&down_b_not_a)<0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information");
-
+
/* Check for additions to the a_not_b list */
if(down_a_not_b!=NULL) {
/* Merge/add overlapped part with/to a_not_b list */
@@ -4530,7 +4530,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps in the 'down spans' of span 'a' & 'b' */
if(H5S_hyper_clip_spans(span_a->down,span_b->down,&down_a_not_b,&down_a_and_b,&down_b_not_a)<0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information");
-
+
/* Check for additions to the a_not_b list */
if(down_a_not_b!=NULL) {
/* Merge/add overlapped part with/to a_not_b list */
@@ -4613,7 +4613,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps in the 'down spans' of span 'a' & 'b' */
if(H5S_hyper_clip_spans(span_a->down,span_b->down,&down_a_not_b,&down_a_and_b,&down_b_not_a)<0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information");
-
+
/* Check for additions to the a_not_b list */
if(down_a_not_b!=NULL) {
/* Merge/add overlapped part with/to a_not_b list */
@@ -4705,7 +4705,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps in the 'down spans' of span 'a' & 'b' */
if(H5S_hyper_clip_spans(span_a->down,span_b->down,&down_a_not_b,&down_a_and_b,&down_b_not_a)<0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information");
-
+
/* Check for additions to the a_not_b list */
if(down_a_not_b!=NULL) {
/* Merge/add overlapped part with/to a_not_b list */
@@ -5089,7 +5089,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
H5S_hyper_recover_span(&recover_a,&span_a,span_a->next);
} /* end while */
} /* end if */
-
+
/* Clean up 'b' spans which haven't been added to the list of merged spans */
if(span_a==NULL && span_b!=NULL) {
while(span_b!=NULL) {
@@ -5210,7 +5210,7 @@ H5S_hyper_spans_nelem (H5S_hyper_span_info_t *spans)
/* If there are no down spans, just count the elements in this span */
else
ret_value+=span->nelem;
-
+
/* Advance to next span */
span=span->next;
} /* end while */
@@ -5292,7 +5292,7 @@ H5S_hyper_make_spans (unsigned rank, const hsize_t *start, const hsize_t *stride
head=span;
else
last_span->next=span;
-
+
/* Move current pointer */
last_span=span;
@@ -5541,7 +5541,7 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
assert(stride);
assert(count);
assert(block);
-
+
/* Generate span tree for new hyperslab information */
if((new_spans=H5S_hyper_make_spans(space->extent.rank,start,stride,count,block))==NULL)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't create hyperslab information");
@@ -5787,7 +5787,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
assert(start);
assert(count);
assert(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID);
-
+
/* Point to the correct stride values */
if(stride==NULL)
stride = _ones;
@@ -6096,7 +6096,7 @@ H5S_operate_hyperslab (H5S_t *result, H5S_hyper_span_info_t *spans1, H5S_seloper
assert(result);
assert(spans2);
assert(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID);
-
+
/* Just copy the selection from spans2 if we are setting the selection */
/* ('space1' to 'result' aliasing happens at the next layer up) */
if(op==H5S_SELECT_SET) {
@@ -6312,7 +6312,7 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
assert(stride);
assert(count);
assert(block);
-
+
/* Generate span tree for new hyperslab information */
if((new_spans=H5S_hyper_make_spans(space->extent.rank,start,stride,count,block))==NULL)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't create hyperslab information");
@@ -6387,7 +6387,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
assert(start);
assert(count);
assert(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID);
-
+
/* Point to the correct stride values */
if(stride==NULL)
stride = _ones;
@@ -6765,7 +6765,7 @@ H5S_combine_select (H5S_t *space1, H5S_seloper_t op, H5S_t *space2)
assert(space1);
assert(space2);
assert(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID);
-
+
/* Check that the space selections both have span trees */
if(space1->select.sel_info.hslab->span_lst==NULL)
if(H5S_hyper_generate_spans(space1)<0)
@@ -6809,7 +6809,7 @@ done:
with the resulting selection.
USAGE
hid_t H5Scombine_select(space1, op, space2)
- hid_t space1; IN: First Dataspace ID
+ hid_t space1; IN: First Dataspace ID
H5S_seloper_t op; IN: Selection operation
hid_t space2; IN: Second Dataspace ID
RETURNS
@@ -6893,7 +6893,7 @@ H5S_select_select (H5S_t *space1, H5S_seloper_t op, H5S_t *space2)
assert(space1);
assert(space2);
assert(op>H5S_SELECT_NOOP && op<H5S_SELECT_INVALID);
-
+
/* Check that the space selections both have span trees */
if(space1->select.sel_info.hslab->span_lst==NULL)
if(H5S_hyper_generate_spans(space1)<0)
@@ -6935,7 +6935,7 @@ done:
to modify it.
USAGE
herr_t H5Sselect_select(space1, op, space2)
- hid_t space1; IN/OUT: First Dataspace ID
+ hid_t space1; IN/OUT: First Dataspace ID
H5S_seloper_t op; IN: Selection operation
hid_t space2; IN: Second Dataspace ID
RETURNS
@@ -7253,7 +7253,7 @@ partial_done: /* Yes, goto's are evil, so sue me... :-) */
else {
off[curr_seq]=loc_off;
len[curr_seq]=span_size;
-
+
/* Increment the number of sequences in arrays */
curr_seq++;
} /* end else */
@@ -7285,7 +7285,7 @@ partial_done: /* Yes, goto's are evil, so sue me... :-) */
else {
off[curr_seq]=loc_off;
len[curr_seq]=span_size;
-
+
/* Increment the number of sequences in arrays */
curr_seq++;
} /* end else */