Commit e19131bc authored by Rob Latham's avatar Rob Latham
Browse files

[svn-r7381] removezeros was doing the wrong thing for certain flattened representations:

perfectly valid flattened representations end up with one big block and do not
need an additional upper bound or lower bound.   Thanks Michael Raymond
<mraymond@sgi.com>
parent b6247662
...@@ -1023,6 +1023,12 @@ static void removezeros(ADIOI_Flatlist_node *flat_type) ...@@ -1023,6 +1023,12 @@ static void removezeros(ADIOI_Flatlist_node *flat_type)
ADIO_Offset *opt_blocklens; ADIO_Offset *opt_blocklens;
ADIO_Offset *opt_indices; ADIO_Offset *opt_indices;
/* short-circuit: there is nothing to do if there are
* - 1 block: what can we remove?
* - 2 blocks: either both blocks are data (and not zero)
* or one block is the UB or LB */
if (flat_type->count <= 2) return;
opt_blocks = 2; /* LB and UB */ opt_blocks = 2; /* LB and UB */
for (i=1; i < flat_type->count -1; i++) { for (i=1; i < flat_type->count -1; i++) {
if(flat_type->blocklens[i] != 0) if(flat_type->blocklens[i] != 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment