mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-01 16:28:09 +08:00
[svn-r26843] Description:
Minor code & warning cleanups. Tested on: MacOSX/64 10.10.2 (amazon) w/serial & parallel Linux/32 2.6.18 (jam) w/serial & parallel
This commit is contained in:
parent
1eaaae9821
commit
371a27f01e
@ -2523,7 +2523,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
|
||||
point_of_no_return = TRUE;
|
||||
ent->chunk = NULL;
|
||||
} /* end else */
|
||||
H5_ASSIGN_OVERFLOW(nbytes, udata.chunk_block.length, uint32_t, size_t);
|
||||
H5_ASSIGN_OVERFLOW(nbytes, udata.chunk_block.length, hsize_t, size_t);
|
||||
if(H5Z_pipeline(&(dset->shared->dcpl_cache.pline), 0, &(udata.filter_mask), dxpl_cache->err_detect,
|
||||
dxpl_cache->filter_cb, &nbytes, &alloc, &buf) < 0)
|
||||
HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "output pipeline failed")
|
||||
@ -2532,7 +2532,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
|
||||
if(nbytes > ((size_t)0xffffffff))
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length")
|
||||
#endif /* H5_SIZEOF_SIZE_T > 4 */
|
||||
H5_ASSIGN_OVERFLOW(udata.chunk_block.length, nbytes, size_t, uint32_t);
|
||||
H5_ASSIGN_OVERFLOW(udata.chunk_block.length, nbytes, size_t, hsize_t);
|
||||
|
||||
/* Indicate that the chunk must be allocated */
|
||||
must_alloc = TRUE;
|
||||
@ -2565,7 +2565,8 @@ H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
|
||||
|
||||
/* Write the data to the file */
|
||||
HDassert(H5F_addr_defined(udata.chunk_block.offset));
|
||||
if(H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.chunk_block.offset, udata.chunk_block.length, dxpl_id, buf) < 0)
|
||||
H5_CHECK_OVERFLOW(udata.chunk_block.length, hsize_t, size_t);
|
||||
if(H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.chunk_block.offset, (size_t)udata.chunk_block.length, dxpl_id, buf) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data to file")
|
||||
|
||||
/* Insert the chunk record into the index */
|
||||
|
@ -83,7 +83,7 @@ typedef struct H5D_type_info_t {
|
||||
|
||||
/* Computed/derived values */
|
||||
size_t src_type_size; /* Size of source type */
|
||||
size_t dst_type_size; /* Size of destination type*/
|
||||
size_t dst_type_size; /* Size of destination type */
|
||||
size_t max_type_size; /* Size of largest source/destination type */
|
||||
hbool_t is_conv_noop; /* Whether the type conversion is a NOOP */
|
||||
hbool_t is_xform_noop; /* Whether the data transform is a NOOP */
|
||||
|
@ -424,8 +424,8 @@ typedef struct H5O_layout_chunk_t {
|
||||
uint32_t dim[H5O_LAYOUT_NDIMS]; /* Size of chunk in elements */
|
||||
uint32_t size; /* Size of chunk in bytes */
|
||||
hsize_t nchunks; /* Number of chunks in dataset */
|
||||
hsize_t chunks[H5O_LAYOUT_NDIMS]; /* # of chunks in dataset dimensions */
|
||||
hsize_t down_chunks[H5O_LAYOUT_NDIMS]; /* "down" size of number of chunks in each dimension */
|
||||
hsize_t chunks[H5O_LAYOUT_NDIMS]; /* # of chunks in each dataset dimension */
|
||||
hsize_t down_chunks[H5O_LAYOUT_NDIMS]; /* "down" size of number of chunks in each dimension */
|
||||
} H5O_layout_chunk_t;
|
||||
|
||||
typedef struct H5O_layout_t {
|
||||
|
@ -408,6 +408,29 @@ H5VM_log2_of2(uint32_t n)
|
||||
return(MultiplyDeBruijnBitPosition[(n * (uint32_t)0x077CB531UL) >> 27]);
|
||||
} /* H5VM_log2_of2() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5VM_power2up
|
||||
*
|
||||
* Purpose: Round up a number to the next power of 2
|
||||
*
|
||||
* Return: Return the number which is a power of 2
|
||||
*
|
||||
* Programmer: Vailin Choi; Nov 2014
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static H5_inline hsize_t UNUSED
|
||||
H5VM_power2up(hsize_t n)
|
||||
{
|
||||
hsize_t ret_value = 1; /* Return value */
|
||||
|
||||
while(ret_value < n)
|
||||
ret_value <<= 1;
|
||||
|
||||
return(ret_value);
|
||||
} /* H5VM_power2up */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5VM_limit_enc_size
|
||||
|
Loading…
Reference in New Issue
Block a user