summaryrefslogtreecommitdiffstats
path: root/src/H5Dchunk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Dchunk.c')
-rw-r--r--src/H5Dchunk.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 4d351dd..8962348 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -833,7 +833,7 @@ H5D__chunk_set_sizes(H5D_t *dset)
unsigned enc_bytes_per_dim; /* Number of bytes required to encode this dimension */
/* Get encoded size of dim, in bytes */
- enc_bytes_per_dim = (H5VM__log2_gen(dset->shared->layout.u.chunk.dim[u]) + 8) / 8;
+ enc_bytes_per_dim = (H5VM_log2_gen(dset->shared->layout.u.chunk.dim[u]) + 8) / 8;
/* Check if this is the largest value so far */
if(enc_bytes_per_dim > max_enc_bytes_per_dim)
@@ -997,14 +997,14 @@ H5D__chunk_init(H5F_t *f, const H5D_t * const dset, hid_t dapl_id)
rdcc->scaled_dims[u] = (dset->shared->curr_dims[u] + dset->shared->layout.u.chunk.dim[u] - 1) /
dset->shared->layout.u.chunk.dim[u];
- if(!(scaled_power2up = H5VM__power2up(rdcc->scaled_dims[u])))
+ if(!(scaled_power2up = H5VM_power2up(rdcc->scaled_dims[u])))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2")
/* Inital 'power2up' values for scaled dimensions */
rdcc->scaled_power2up[u] = scaled_power2up;
/* Number of bits required to encode scaled dimension size */
- rdcc->scaled_encode_bits[u] = H5VM__log2_gen(rdcc->scaled_power2up[u]);
+ rdcc->scaled_encode_bits[u] = H5VM_log2_gen(rdcc->scaled_power2up[u]);
} /* end for */
} /* end if */
@@ -6887,12 +6887,12 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
/* Compute the size required for encoding the size of a chunk, allowing
* for an extra byte, in case the filter makes the chunk larger.
*/
- allow_chunk_size_len = 1 + ((H5VM__log2_gen((uint64_t)(idx_info->layout->size)) + 8) / 8);
+ allow_chunk_size_len = 1 + ((H5VM_log2_gen((uint64_t)(idx_info->layout->size)) + 8) / 8);
if(allow_chunk_size_len > 8)
allow_chunk_size_len = 8;
/* Compute encoded size of chunk */
- new_chunk_size_len = (H5VM__log2_gen((uint64_t)(new_chunk->length)) + 8) / 8;
+ new_chunk_size_len = (H5VM_log2_gen((uint64_t)(new_chunk->length)) + 8) / 8;
if(new_chunk_size_len > 8)
HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "encoded chunk size is more than 8 bytes?!?")
76' href='#n176'>176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by The HDF Group.                                               *
 * All rights reserved.                                                      *
 *                                                                           *
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
 * terms governing use, modification, and redistribution, is contained in    *
 * the COPYING file, which can be found at the root of the source code       *
 * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.  *
 * If you do not have access to either file, you may request a copy from     *
 * help@hdfgroup.org.                                                        *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/*
 * Purpose:     Blob callbacks for the native VOL connector
 */

/***********/
/* Headers */
/***********/
#include "H5private.h"          /* Generic Functions                    */
#include "H5Eprivate.h"         /* Error handling                       */
#include "H5Fprivate.h"         /* File access				*/
#include "H5HGprivate.h"	/* Global Heaps				*/
#include "H5VLnative_private.h" /* Native VOL connector                 */


/****************/
/* Local Macros */
/****************/


/******************/
/* Local Typedefs */
/******************/


/********************/
/* Local Prototypes */
/********************/


/*********************/
/* Package Variables */
/*********************/


/*****************************/
/* Library Private Variables */
/*****************************/


/*******************/
/* Local Variables */
/*******************/



/*-------------------------------------------------------------------------
 * Function:    H5VL__native_blob_put
 *
 * Purpose:     Handles the blob 'put' callback
 *
 * Return:      SUCCEED / FAIL
 *
 * Programmer:	Quincey Koziol
 *		Friday, August 15, 2019
 *
 *-------------------------------------------------------------------------
 */
herr_t
H5VL__native_blob_put(void *obj, const void *buf, size_t size, void *blob_id,
    void H5_ATTR_UNUSED *ctx)
{
    H5F_t *f = (H5F_t *)obj;            /* Retrieve file pointer */
    uint8_t *id = (uint8_t *)blob_id;   /* Pointer to blob ID */
    H5HG_t hobjid;                      /* New VL sequence's heap ID */
    herr_t ret_value = SUCCEED;         /* Return value */

    FUNC_ENTER_PACKAGE

    /* Check parameters */
    HDassert(f);
    HDassert(size == 0 || buf);
    HDassert(id);

    /* Write the VL information to disk (allocates space also) */
    if(H5HG_insert(f, size, buf, &hobjid) < 0)
        HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "unable to write blob information")

    /* Encode the heap information */
    H5F_addr_encode(f, &id, hobjid.addr);
    UINT32ENCODE(id, hobjid.idx);

done:
    FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL__native_blob_put() */


/*-------------------------------------------------------------------------
 * Function:    H5VL__native_blob_get
 *
 * Purpose:     Handles the blob 'get' callback
 *
 * Return:      SUCCEED / FAIL
 *
 * Programmer:	Quincey Koziol
 *		Friday, August 15, 2019
 *
 *-------------------------------------------------------------------------
 */
herr_t
H5VL__native_blob_get(void *obj, const void *blob_id, void *buf, size_t size,
    void H5_ATTR_UNUSED *ctx)
{
    H5F_t *f = (H5F_t *)obj;            /* Retrieve file pointer */
    const uint8_t *id = (const uint8_t *)blob_id; /* Pointer to the disk blob ID */
    H5HG_t hobjid;                      /* Global heap ID for sequence */
    size_t hobj_size;                   /* Global heap object size returned from H5HG_read() */
    herr_t ret_value = SUCCEED;         /* Return value */

    FUNC_ENTER_PACKAGE

    /* Sanity check */
    HDassert(f);
    HDassert(id);
    HDassert(buf);

    /* Get the heap information */
    H5F_addr_decode(f, &id, &hobjid.addr);
    UINT32DECODE(id, hobjid.idx);

    /* Check if this sequence actually has any data */
    if(hobjid.addr > 0)
        /* Read the VL information from disk */
        if(NULL == H5HG_read(f, &hobjid, buf, &hobj_size))
            HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "unable to read VL information")

    /* Verify the size is correct */
    if(hobj_size != size)
        HGOTO_ERROR(H5E_VOL, H5E_CANTDECODE, FAIL, "Expected global heap object size does not match")

done:
    FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL__native_blob_get() */


/*-------------------------------------------------------------------------
 * Function:    H5VL__native_blob_specific
 *
 * Purpose:     Handles the blob 'specific' callback
 *
 * Return:      SUCCEED / FAIL
 *
 * Programmer:	Quincey Koziol
 *		Friday, August 15, 2019
 *