summaryrefslogtreecommitdiffstats
path: root/src/H5Dio.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-05-28 14:10:51 (GMT)
committerGitHub <noreply@github.com>2021-05-28 14:10:51 (GMT)
commit2ddf5fbd92ebdb0d59e208d88f159eec8a1ffbf8 (patch)
tree40975e0846d101360a838d42e16f4687fed77f4a /src/H5Dio.c
parente22687912dbc6fcf4fff57e86e2cd5d75c81f81e (diff)
downloadhdf5-2ddf5fbd92ebdb0d59e208d88f159eec8a1ffbf8.zip
hdf5-2ddf5fbd92ebdb0d59e208d88f159eec8a1ffbf8.tar.gz
hdf5-2ddf5fbd92ebdb0d59e208d88f159eec8a1ffbf8.tar.bz2
Much normalization with develop (#701)
* Brings CMake updates from develop * Brings reduction in pedantic casts from develop * Purges UFAIL from the library (#637) * Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes gratuitous (double)x.yF casts (#632) * Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Cleans up a const warning left over from previous constification (#633) * Committing clang-format changes * Adds consts to a few global variables * Cleans up a const warning left over from previous constification Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Formatted source * Bring over some VOL registration changes * VOL cleanup * H5VL_request_status_t substitutions * H5F.c cleanup * Minor API tweaks from develop * Moves H5G package init/teardown to H5Gint.c * H5G cleanup * H5M cleanup * H5SM cleanup * H5T cleanup * H5R cleanup * H5Lpublic.h cleanup * H5L cleanup * H5O cleanup * H5A, H5CS, and H5AC cleanup * Moved H5A init/teardown code to H5Aint.c * Moves H5D I/O functions to H5D.c * H5D cleanup * Misc minor cleanup * H5P close cleanup * H5Tpublic.h cleanup * Fixes err_compat test * H5PLpublic.h cleanup * Updates H5Ppublic.h * H5Fpublic.h updates * H5A.c cleanup * Brings over H5Aexists and related changes * Brings CMake shell testing changes from develop * Close callback changes * H5R and H5Tcommit normalization * err_compat test works now * H5O tweaks * Updates VOL registration code * Brings over H5VL_create_object * H5Tconv.c reformatting * H5T.c tweaks * Brings datatype and reference updates from develop * Brings VOL plugin loading changes from develop * Brings event sets from develop * Brings async functions over * Tools changes * Brings over many tools changes from develop * Brings VOL flags from develop * Fixes h5dump double/float tests * Updates h5repack tests * Brings h5diff test changes from develop * Last h5dump changes * Brings test changes from develop * Committing clang-format changes * Tidied h5_testing() * Brings chunk iteration code + misc from develop * Updates vds test * Enables external link parallel test * Brings updated property lists from develop * H5G changes from develop * H5MF cleanup * Brings vfd_swmr test back into CMake * Updates threadsafe test * Updates plist test * Brings recent changes from develop Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5Dio.c')
-rw-r--r--src/H5Dio.c242
1 files changed, 0 insertions, 242 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c
index e28da8c..03400cf 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -118,248 +118,6 @@ done:
} /* end H5D__get_offset_copy() */
/*-------------------------------------------------------------------------
- * Function: H5Dread
- *
- * Purpose: Reads (part of) a DSET from the file into application
- * memory BUF. The part of the dataset to read is defined with
- * MEM_SPACE_ID and FILE_SPACE_ID. The data points are
- * converted from their file type to the MEM_TYPE_ID specified.
- * Additional miscellaneous data transfer properties can be
- * passed to this function with the PLIST_ID argument.
- *
- * The FILE_SPACE_ID can be the constant H5S_ALL which indicates
- * that the entire file dataspace is to be referenced.
- *
- * The MEM_SPACE_ID can be the constant H5S_ALL in which case
- * the memory dataspace is the same as the file dataspace
- * defined when the dataset was created.
- *
- * The number of elements in the memory dataspace must match
- * the number of elements in the file dataspace.
- *
- * The PLIST_ID can be the constant H5P_DEFAULT in which
- * case the default data transfer properties are used.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Thursday, December 4, 1997
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t dxpl_id,
- void *buf /*out*/)
-{
- H5VL_object_t *vol_obj = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_API(FAIL)
- H5TRACE6("e", "iiiiix", dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf);
-
- /* Check arguments */
- if (mem_space_id < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid memory dataspace ID")
- if (file_space_id < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file dataspace ID")
-
- /* Get dataset pointer */
- if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id is not a dataset ID")
-
- /* Get the default dataset transfer property list if the user didn't provide one */
- if (H5P_DEFAULT == dxpl_id)
- dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms")
-
- /* Set DXPL for operation */
- H5CX_set_dxpl(dxpl_id);
-
- /* Read the data */
- if ((ret_value = H5VL_dataset_read(vol_obj, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf,
- H5_REQUEST_NULL)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data")
-
-done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Dread() */
-
-/*-------------------------------------------------------------------------
- * Function: H5Dread_chunk
- *
- * Purpose: Reads an entire chunk from the file directly.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Matthew Strong (GE Healthcare)
- * 14 February 2016
- *
- *---------------------------------------------------------------------------
- */
-herr_t
-H5Dread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *filters, void *buf)
-{
- H5VL_object_t *vol_obj = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_API(FAIL)
- H5TRACE5("e", "ii*h*Iu*x", dset_id, dxpl_id, offset, filters, buf);
-
- /* Check arguments */
- if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id is not a dataset ID")
- if (!buf)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf cannot be NULL")
- if (!offset)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "offset cannot be NULL")
- if (!filters)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "filters cannot be NULL")
-
- /* Get the default dataset transfer property list if the user didn't provide one */
- if (H5P_DEFAULT == dxpl_id)
- dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dxpl_id is not a dataset transfer property list ID")
-
- /* Set DXPL for operation */
- H5CX_set_dxpl(dxpl_id);
-
- /* Read the raw chunk */
- if (H5VL_dataset_optional(vol_obj, H5VL_NATIVE_DATASET_CHUNK_READ, dxpl_id, H5_REQUEST_NULL, offset,
- filters, buf) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read unprocessed chunk data")
-
-done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Dread_chunk() */
-
-/*-------------------------------------------------------------------------
- * Function: H5Dwrite
- *
- * Purpose: Writes (part of) a DSET from application memory BUF to the
- * file. The part of the dataset to write is defined with the
- * MEM_SPACE_ID and FILE_SPACE_ID arguments. The data points
- * are converted from their current type (MEM_TYPE_ID) to their
- * file datatype. Additional miscellaneous data transfer
- * properties can be passed to this function with the
- * PLIST_ID argument.
- *
- * The FILE_SPACE_ID can be the constant H5S_ALL which indicates
- * that the entire file dataspace is to be referenced.
- *
- * The MEM_SPACE_ID can be the constant H5S_ALL in which case
- * the memory dataspace is the same as the file dataspace
- * defined when the dataset was created.
- *
- * The number of elements in the memory dataspace must match
- * the number of elements in the file dataspace.
- *
- * The PLIST_ID can be the constant H5P_DEFAULT in which
- * case the default data transfer properties are used.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Thursday, December 4, 1997
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t dxpl_id,
- const void *buf)
-{
- H5VL_object_t *vol_obj = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_API(FAIL)
- H5TRACE6("e", "iiiii*x", dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf);
-
- /* Check arguments */
- if (mem_space_id < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid memory dataspace ID")
- if (file_space_id < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file dataspace ID")
-
- /* Get dataset pointer */
- if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id is not a dataset ID")
-
- /* Get the default dataset transfer property list if the user didn't provide one */
- if (H5P_DEFAULT == dxpl_id)
- dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms")
-
- /* Set DXPL for operation */
- H5CX_set_dxpl(dxpl_id);
-
- /* Write the data */
- if ((ret_value = H5VL_dataset_write(vol_obj, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf,
- H5_REQUEST_NULL)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data")
-
-done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Dwrite() */
-
-/*-------------------------------------------------------------------------
- * Function: H5Dwrite_chunk
- *
- * Purpose: Writes an entire chunk to the file directly.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Raymond Lu
- * 30 July 2012
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Dwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *offset, size_t data_size,
- const void *buf)
-{
- H5VL_object_t *vol_obj = NULL;
- uint32_t data_size_32; /* Chunk data size (limited to 32-bits currently) */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_API(FAIL)
- H5TRACE6("e", "iiIu*hz*x", dset_id, dxpl_id, filters, offset, data_size, buf);
-
- /* Check arguments */
- if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset ID")
- if (!buf)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf cannot be NULL")
- if (!offset)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "offset cannot be NULL")
- if (0 == data_size)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "data_size cannot be zero")
-
- /* Make sure data size is less than 4 GiB */
- data_size_32 = (uint32_t)data_size;
- if (data_size != (size_t)data_size_32)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid data_size - chunks cannot be > 4 GiB")
-
- /* Get the default dataset transfer property list if the user didn't provide one */
- if (H5P_DEFAULT == dxpl_id)
- dxpl_id = H5P_DATASET_XFER_DEFAULT;
- else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dxpl_id is not a dataset transfer property list ID")
-
- /* Set DXPL for operation */
- H5CX_set_dxpl(dxpl_id);
-
- /* Write chunk */
- if (H5VL_dataset_optional(vol_obj, H5VL_NATIVE_DATASET_CHUNK_WRITE, dxpl_id, H5_REQUEST_NULL, filters,
- offset, data_size_32, buf) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write unprocessed chunk data")
-
-done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Dwrite_chunk() */
-
-/*-------------------------------------------------------------------------
* Function: H5D__read
*
* Purpose: Reads (part of) a DATASET into application memory BUF. See