diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-11-27 21:08:29 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-11-27 21:08:29 (GMT) |
commit | 03c994ee5921d46c7332b494844e55432f7bde31 (patch) | |
tree | b6e998db33afc3ecbcb20765c08396825c72e342 | |
parent | e40fa7aa3929e24934463562ed74859a6ebb5ddb (diff) | |
download | hdf5-03c994ee5921d46c7332b494844e55432f7bde31.zip hdf5-03c994ee5921d46c7332b494844e55432f7bde31.tar.gz hdf5-03c994ee5921d46c7332b494844e55432f7bde31.tar.bz2 |
[svn-r12987] Description:
Clear up some confusion for the internal H5V_log2_gen() routine, so it
always takes a 64-bit value as a parameter.
Tested on:
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
-rw-r--r-- | src/H5B2int.c | 6 | ||||
-rw-r--r-- | src/H5HFdblock.c | 2 | ||||
-rw-r--r-- | src/H5HFhdr.c | 2 | ||||
-rw-r--r-- | src/H5HFiblock.c | 2 | ||||
-rw-r--r-- | src/H5Odtype.c | 6 | ||||
-rw-r--r-- | src/H5Vprivate.h | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/src/H5B2int.c b/src/H5B2int.c index 96d7e75e8..186d40e 100644 --- a/src/H5B2int.c +++ b/src/H5B2int.c @@ -202,7 +202,7 @@ HDmemset(shared->page,0,shared->node_size); /* Compute size to store # of records in each node */ /* (uses leaf # of records because its the largest) */ - shared->max_nrec_size = (H5V_log2_gen((hsize_t)shared->node_info[0].max_nrec) + 7) / 8; + shared->max_nrec_size = (H5V_log2_gen((uint64_t)shared->node_info[0].max_nrec) + 7) / 8; HDassert(shared->max_nrec_size <= H5B2_SIZEOF_RECORDS_PER_NODE); /* Initialize internal node info */ @@ -216,7 +216,7 @@ HDmemset(shared->page,0,shared->node_size); shared->node_info[u].cum_max_nrec = ((shared->node_info[u].max_nrec + 1) * shared->node_info[u - 1].cum_max_nrec) + shared->node_info[u].max_nrec; - shared->node_info[u].cum_max_nrec_size = (H5V_log2_gen((hsize_t)shared->node_info[u].cum_max_nrec) + 7) / 8; + shared->node_info[u].cum_max_nrec_size = (H5V_log2_gen((uint64_t)shared->node_info[u].cum_max_nrec) + 7) / 8; if((shared->node_info[u].nat_rec_fac = H5FL_fac_init(shared->type->nrec_size * shared->node_info[u].max_nrec)) == NULL) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create node native key block factory") @@ -575,7 +575,7 @@ H5B2_split_root(H5F_t *f, hid_t dxpl_id, H5B2_t *bt2, unsigned *bt2_flags_ptr) shared->node_info[shared->depth].merge_nrec = (shared->node_info[shared->depth].max_nrec * shared->merge_percent) / 100; shared->node_info[shared->depth].cum_max_nrec = ((shared->node_info[shared->depth].max_nrec + 1) * shared->node_info[shared->depth - 1].cum_max_nrec) + shared->node_info[shared->depth].max_nrec; - shared->node_info[shared->depth].cum_max_nrec_size = (H5V_log2_gen((hsize_t)shared->node_info[shared->depth].cum_max_nrec) + 7) / 8; + shared->node_info[shared->depth].cum_max_nrec_size = (H5V_log2_gen((uint64_t)shared->node_info[shared->depth].cum_max_nrec) + 7) / 8; if((shared->node_info[shared->depth].nat_rec_fac = H5FL_fac_init(shared->type->nrec_size * shared->node_info[shared->depth].max_nrec)) == NULL) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create node native key block factory") if((shared->node_info[shared->depth].node_ptr_fac = H5FL_fac_init(sizeof(H5B2_node_ptr_t) * (shared->node_info[shared->depth].max_nrec + 1))) == NULL) diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c index c9322c4..1105590 100644 --- a/src/H5HFdblock.c +++ b/src/H5HFdblock.c @@ -375,7 +375,7 @@ HDfprintf(stderr, "%s: request = %Zu\n", FUNC, request); if(request < hdr->man_dtable.cparam.start_block_size) min_dblock_size = hdr->man_dtable.cparam.start_block_size; else { - min_dblock_size = ((size_t)1) << (1 + H5V_log2_gen((hsize_t)request)); + min_dblock_size = ((size_t)1) << (1 + H5V_log2_gen((uint64_t)request)); HDassert(min_dblock_size <= hdr->man_dtable.cparam.max_direct_size); } /* end else */ diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c index a02e8ed..ab9d7bc 100644 --- a/src/H5HFhdr.c +++ b/src/H5HFhdr.c @@ -224,7 +224,7 @@ H5HF_hdr_finish_init_phase1(H5HF_hdr_t *hdr) /* Set the size of heap IDs */ hdr->heap_len_size = MIN(hdr->man_dtable.max_dir_blk_off_size, - ((H5V_log2_gen((hsize_t)hdr->max_man_size) + 7) / 8)); + ((H5V_log2_gen((uint64_t)hdr->max_man_size) + 7) / 8)); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c index ac31933..1d2b8f7 100644 --- a/src/H5HFiblock.c +++ b/src/H5HFiblock.c @@ -736,7 +736,7 @@ HDfprintf(stderr, "%s: Reducing root indirect block\n", FUNC); max_child_row = iblock->max_child / hdr->man_dtable.cparam.width; /* Compute new # of rows in root indirect block */ - new_nrows = 1 << (1 + H5V_log2_gen((hsize_t)max_child_row)); + new_nrows = 1 << (1 + H5V_log2_gen((uint64_t)max_child_row)); #ifdef QAK HDfprintf(stderr, "%s: new_nrows = %u\n", FUNC, new_nrows); HDfprintf(stderr, "%s: iblock->nrows = %u\n", FUNC, iblock->nrows); diff --git a/src/H5Odtype.c b/src/H5Odtype.c index 27a8d2f..c0b29cf 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -222,7 +222,7 @@ H5O_dtype_decode_helper(H5F_t *f, const uint8_t **pp, H5T_t *dt) unsigned j; /* Compute the # of bytes required to store a member offset */ - offset_nbytes = (H5V_log2_gen((hsize_t)dt->shared->size) + 7) / 8; + offset_nbytes = (H5V_log2_gen((uint64_t)dt->shared->size) + 7) / 8; /* * Compound datatypes... @@ -720,7 +720,7 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't detect array class") /* Compute the # of bytes required to store a member offset */ - offset_nbytes = (H5V_log2_gen((hsize_t)dt->shared->size) + 7) / 8; + offset_nbytes = (H5V_log2_gen((uint64_t)dt->shared->size) + 7) / 8; /* * Compound datatypes... @@ -1123,7 +1123,7 @@ H5O_dtype_size(const H5F_t *f, const void *_mesg) HDassert(has_array >= 0); /* Compute the # of bytes required to store a member offset */ - offset_nbytes = (H5V_log2_gen((hsize_t)dt->shared->size) + 7) / 8; + offset_nbytes = (H5V_log2_gen((uint64_t)dt->shared->size) + 7) / 8; /* Compute the total size needed to encode compound datatype */ for(u = 0; u < dt->shared->u.compnd.nmembs; u++) { diff --git a/src/H5Vprivate.h b/src/H5Vprivate.h index 0554c47..fc84086 100644 --- a/src/H5Vprivate.h +++ b/src/H5Vprivate.h @@ -344,7 +344,7 @@ static const char LogTable256[] = *------------------------------------------------------------------------- */ static H5_inline unsigned UNUSED -H5V_log2_gen(hsize_t n) +H5V_log2_gen(uint64_t n) { unsigned r; /* r will be log2(n) */ register unsigned int t, tt, ttt; /* temporaries */ |