mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r26195] Description:
Switch from enum H5D_CHUNK_BTREE to H5D_CHUNK_IDX_BTREE, along with a couple of minor whitespace touchups. Tested on: Mac OSX/64 10.10.2 (amazon) w/serial & parallel Linux/32 2.6.x (jam) w/serial
This commit is contained in:
parent
595b01658e
commit
85504f5376
@ -195,7 +195,7 @@ H5B_class_t H5B_BTREE[1] = {{
|
||||
H5D__btree_remove, /*remove */
|
||||
H5D__btree_decode_key, /*decode */
|
||||
H5D__btree_encode_key, /*encode */
|
||||
H5D__btree_debug_key, /*debug */
|
||||
H5D__btree_debug_key /*debug */
|
||||
}};
|
||||
|
||||
|
||||
@ -228,7 +228,7 @@ H5D__btree_get_shared(const H5F_t UNUSED *f, const void *_udata)
|
||||
|
||||
HDassert(udata);
|
||||
HDassert(udata->storage);
|
||||
HDassert(udata->storage->idx_type == H5D_CHUNK_BTREE);
|
||||
HDassert(udata->storage->idx_type == H5D_CHUNK_IDX_BTREE);
|
||||
HDassert(udata->storage->u.btree.shared);
|
||||
|
||||
/* Return the pointer to the ref-count object */
|
||||
@ -868,7 +868,7 @@ done:
|
||||
static herr_t
|
||||
H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info)
|
||||
{
|
||||
H5D_chunk_common_ud_t udata; /* User data for B-tree callback */
|
||||
H5D_chunk_common_ud_t udata; /* User data for B-tree callback */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_STATIC
|
||||
@ -939,7 +939,7 @@ H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
|
||||
static herr_t
|
||||
H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
@ -1111,7 +1111,7 @@ H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
|
||||
static herr_t
|
||||
H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
@ -1453,7 +1453,7 @@ H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent
|
||||
|
||||
/* Reset "fake" storage info */
|
||||
HDmemset(&storage, 0, sizeof(storage));
|
||||
storage.idx_type = H5D_CHUNK_BTREE;
|
||||
storage.idx_type = H5D_CHUNK_IDX_BTREE;
|
||||
|
||||
/* Allocate the shared structure */
|
||||
if(H5D__btree_shared_create(f, &storage, ndims) < 0)
|
||||
|
@ -362,7 +362,7 @@ typedef struct H5D_chunk_map_t {
|
||||
} H5D_chunk_map_t;
|
||||
|
||||
/* Cached information about a particular chunk */
|
||||
typedef struct H5D_chunk_cached_t{
|
||||
typedef struct H5D_chunk_cached_t {
|
||||
hbool_t valid; /*whether cache info is valid*/
|
||||
hsize_t offset[H5O_LAYOUT_NDIMS]; /*logical offset to start*/
|
||||
uint32_t nbytes; /*size of stored data */
|
||||
|
@ -56,7 +56,8 @@ typedef enum H5D_layout_t {
|
||||
|
||||
/* Types of chunk index data structures */
|
||||
typedef enum H5D_chunk_index_t {
|
||||
H5D_CHUNK_BTREE = 0 /* v1 B-tree index */
|
||||
H5D_CHUNK_IDX_BTREE = 0, /* v1 B-tree index */
|
||||
H5D_CHUNK_IDX_NTYPES /* this one must be last! */
|
||||
} H5D_chunk_index_t;
|
||||
|
||||
/* Values for the space allocation time property */
|
||||
|
@ -147,7 +147,7 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
|
||||
|
||||
/* Set the chunk operations */
|
||||
/* (Only "btree" indexing type currently supported in this version) */
|
||||
mesg->storage.u.chunk.idx_type = H5D_CHUNK_BTREE;
|
||||
mesg->storage.u.chunk.idx_type = H5D_CHUNK_IDX_BTREE;
|
||||
mesg->storage.u.chunk.ops = H5D_COPS_BTREE;
|
||||
} /* end if */
|
||||
else {
|
||||
@ -234,7 +234,7 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
|
||||
|
||||
/* Set the chunk operations */
|
||||
/* (Only "btree" indexing type supported with v3 of message format) */
|
||||
mesg->storage.u.chunk.idx_type = H5D_CHUNK_BTREE;
|
||||
mesg->storage.u.chunk.idx_type = H5D_CHUNK_IDX_BTREE;
|
||||
mesg->storage.u.chunk.ops = H5D_COPS_BTREE;
|
||||
|
||||
/* Set the layout operations */
|
||||
@ -715,7 +715,7 @@ H5O_layout_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg,
|
||||
|
||||
/* Index information */
|
||||
switch(mesg->storage.u.chunk.idx_type) {
|
||||
case H5D_CHUNK_BTREE:
|
||||
case H5D_CHUNK_IDX_BTREE:
|
||||
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
|
||||
"Index Type:", "v1 B-tree");
|
||||
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
|
||||
|
@ -53,7 +53,7 @@
|
||||
/* Define default layout information */
|
||||
#define H5D_DEF_STORAGE_COMPACT_INIT {(hbool_t)FALSE, (size_t)0, NULL}
|
||||
#define H5D_DEF_STORAGE_CONTIG_INIT {HADDR_UNDEF, (hsize_t)0}
|
||||
#define H5D_DEF_STORAGE_CHUNK_INIT {H5D_CHUNK_BTREE, HADDR_UNDEF, NULL, {{HADDR_UNDEF, NULL}}}
|
||||
#define H5D_DEF_STORAGE_CHUNK_INIT {H5D_CHUNK_IDX_BTREE, HADDR_UNDEF, NULL, {{HADDR_UNDEF, NULL}}}
|
||||
#define H5D_DEF_LAYOUT_CHUNK_INIT {(unsigned)0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, (uint32_t)0, (hsize_t)0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}
|
||||
#ifdef H5_HAVE_C99_DESIGNATED_INITIALIZER
|
||||
#define H5D_DEF_STORAGE_COMPACT {H5D_COMPACT, { .compact = H5D_DEF_STORAGE_COMPACT_INIT }}
|
||||
|
@ -1089,7 +1089,7 @@ 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)
|
||||
for(i = (int)(n - 1), ret_value = 0; i >= 0; --i)
|
||||
ret_value += acc[i] * offset[i];
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
|
Loading…
Reference in New Issue
Block a user