mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-12 17:31:09 +08:00
Added the map (H5M) API
This commit is contained in:
parent
e874070dbb
commit
5b6bd7c922
@ -705,6 +705,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to use threadsafe
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -758,6 +759,11 @@ if (HDF5_ENABLE_THREADSAFE)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to build the map API
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_ENABLE_MAP_API "Build the map API" OFF)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add the HDF5 Library Target to the build
|
||||
#-----------------------------------------------------------------------------
|
||||
|
7
MANIFEST
7
MANIFEST
@ -749,6 +749,11 @@
|
||||
./src/H5Lpkg.h
|
||||
./src/H5Lprivate.h
|
||||
./src/H5Lpublic.h
|
||||
./src/H5M.c
|
||||
./src/H5Mmodule.h
|
||||
./src/H5Mpkg.h
|
||||
./src/H5Mprivate.h
|
||||
./src/H5Mpublic.h
|
||||
./src/H5MF.c
|
||||
./src/H5MFaggr.c
|
||||
./src/H5MFdbg.c
|
||||
@ -820,6 +825,8 @@
|
||||
./src/H5Pint.c
|
||||
./src/H5Plapl.c
|
||||
./src/H5Plcpl.c
|
||||
./src/H5Pmapl.c
|
||||
./src/H5Pmcpl.c
|
||||
./src/H5Pmodule.h
|
||||
./src/H5Pocpl.c
|
||||
./src/H5Pocpypl.c
|
||||
|
@ -150,6 +150,7 @@ $Source = "";
|
||||
"H5L_class_t" => "x",
|
||||
"H5L_elink_traverse_t" => "x",
|
||||
"H5L_iterate_t" => "x",
|
||||
"H5M_iterate_t" => 'x',
|
||||
"H5MM_allocate_t" => "x",
|
||||
"H5MM_free_t" => "x",
|
||||
"H5O_info_t" => "x",
|
||||
|
@ -267,6 +267,9 @@
|
||||
/* Define to 1 if you have the <mach/mach_time.h> header file. */
|
||||
#cmakedefine H5_HAVE_MACH_MACH_TIME_H @H5_HAVE_MACH_MACH_TIME_H@
|
||||
|
||||
/* Define if the map API (H5M) should be compiled */
|
||||
#cmakedefine H5_HAVE_MAP_API @H5_HAVE_MAP_API@
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#cmakedefine H5_HAVE_MEMORY_H @H5_HAVE_MEMORY_H@
|
||||
|
||||
|
26
configure.ac
26
configure.ac
@ -2765,6 +2765,32 @@ if test -n "$PARALLEL"; then
|
||||
|
||||
fi
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Check if the map API is enabled by --enable-map-api
|
||||
##
|
||||
AC_SUBST([MAP_API])
|
||||
|
||||
## Default is no map API
|
||||
MAP_API=no
|
||||
|
||||
AC_MSG_CHECKING([if the map API (H5M) is enabled])
|
||||
|
||||
AC_ARG_ENABLE([map-api],
|
||||
[AS_HELP_STRING([--enable-map-api],
|
||||
[Build the map API (H5M).
|
||||
This is not yet supported in the native file format
|
||||
and requires a VOL connector that supports it.
|
||||
[default=no]])],
|
||||
[MAP_API=$enableval], [MAP_API=no])
|
||||
|
||||
if test "X$MAP_API" = "Xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_MAP_API], [1],
|
||||
[Define if the map API (H5M) should be compiled])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Check if Direct I/O driver is enabled by --enable-direct-vfd
|
||||
##
|
||||
|
@ -191,6 +191,11 @@ New Features
|
||||
|
||||
Library:
|
||||
--------
|
||||
- Add new API H5M for map objects. Currently not supported by native
|
||||
library, can be supported by VOL connectors.
|
||||
|
||||
(NAF - 2019/03/01)
|
||||
|
||||
- Improved the performance of virtual dataset I/O
|
||||
|
||||
Refactored the internal dataspace routines used by the virtual dataset
|
||||
|
@ -393,6 +393,15 @@ set (H5L_HDRS
|
||||
IDE_GENERATED_PROPERTIES ("H5L" "${H5L_HDRS}" "${H5L_SOURCES}" )
|
||||
|
||||
|
||||
set (H5M_SOURCES
|
||||
${HDF5_SRC_DIR}/H5M.c
|
||||
)
|
||||
set (H5M_HDRS
|
||||
${HDF5_SRC_DIR}/H5Mpublic.h
|
||||
)
|
||||
IDE_GENERATED_PROPERTIES ("H5M" "${H5M_HDRS}" "${H5M_SOURCES}")
|
||||
|
||||
|
||||
set (H5MF_SOURCES
|
||||
${HDF5_SRC_DIR}/H5MF.c
|
||||
${HDF5_SRC_DIR}/H5MFaggr.c
|
||||
@ -483,6 +492,8 @@ set (H5P_SOURCES
|
||||
${HDF5_SRC_DIR}/H5Pint.c
|
||||
${HDF5_SRC_DIR}/H5Plapl.c
|
||||
${HDF5_SRC_DIR}/H5Plcpl.c
|
||||
${HDF5_SRC_DIR}/H5Pmapl.c
|
||||
${HDF5_SRC_DIR}/H5Pmcpl.c
|
||||
${HDF5_SRC_DIR}/H5Pocpl.c
|
||||
${HDF5_SRC_DIR}/H5Pocpypl.c
|
||||
${HDF5_SRC_DIR}/H5Pstrcpl.c
|
||||
@ -716,6 +727,7 @@ set (common_SRCS
|
||||
${H5HP_SOURCES}
|
||||
${H5I_SOURCES}
|
||||
${H5L_SOURCES}
|
||||
${H5M_SOURCES}
|
||||
${H5MF_SOURCES}
|
||||
${H5MM_SOURCES}
|
||||
${H5MP_SOURCES}
|
||||
@ -759,6 +771,7 @@ set (H5_PUBLIC_HEADERS
|
||||
${H5HL_HDRS}
|
||||
${H5I_HDRS}
|
||||
${H5L_HDRS}
|
||||
${H5M_HDRS}
|
||||
${H5MF_HDRS}
|
||||
${H5MM_HDRS}
|
||||
${H5MP_HDRS}
|
||||
@ -845,6 +858,9 @@ set (H5_PRIVATE_HEADERS
|
||||
${HDF5_SRC_DIR}/H5Lpkg.h
|
||||
${HDF5_SRC_DIR}/H5Lprivate.h
|
||||
|
||||
${HDF5_SRC_DIR}/H5Mpkg.h
|
||||
${HDF5_SRC_DIR}/H5Mprivate.h
|
||||
|
||||
${HDF5_SRC_DIR}/H5MFprivate.h
|
||||
|
||||
${HDF5_SRC_DIR}/H5MMprivate.h
|
||||
|
3
src/H5.c
3
src/H5.c
@ -166,6 +166,7 @@ H5_init_library(void)
|
||||
H5_debug_g.pkg[H5_PKG_HG].name = "hg";
|
||||
H5_debug_g.pkg[H5_PKG_HL].name = "hl";
|
||||
H5_debug_g.pkg[H5_PKG_I].name = "i";
|
||||
H5_debug_g.pkg[H5_PKG_M].name = "m";
|
||||
H5_debug_g.pkg[H5_PKG_MF].name = "mf";
|
||||
H5_debug_g.pkg[H5_PKG_MM].name = "mm";
|
||||
H5_debug_g.pkg[H5_PKG_O].name = "o";
|
||||
@ -312,6 +313,7 @@ H5_term_library(void)
|
||||
pending += DOWN(A_top);
|
||||
pending += DOWN(D_top);
|
||||
pending += DOWN(G_top);
|
||||
pending += DOWN(M_top);
|
||||
pending += DOWN(R_top);
|
||||
pending += DOWN(S_top);
|
||||
pending += DOWN(T_top);
|
||||
@ -337,6 +339,7 @@ H5_term_library(void)
|
||||
pending += DOWN(A);
|
||||
pending += DOWN(D);
|
||||
pending += DOWN(G);
|
||||
pending += DOWN(M);
|
||||
pending += DOWN(R);
|
||||
pending += DOWN(S);
|
||||
pending += DOWN(T);
|
||||
|
@ -498,6 +498,9 @@ H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key)
|
||||
oloc = NULL;
|
||||
break;
|
||||
|
||||
case H5I_MAP:
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "maps not supported in native VOL connector")
|
||||
|
||||
case H5I_UNINIT:
|
||||
case H5I_BADID:
|
||||
case H5I_FILE:
|
||||
@ -3600,6 +3603,9 @@ H5F__get_file(void *obj, H5I_type_t type)
|
||||
oloc = H5A_oloc((H5A_t *)obj);
|
||||
break;
|
||||
|
||||
case H5I_MAP:
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "maps not supported in native VOL connector")
|
||||
|
||||
case H5I_UNINIT:
|
||||
case H5I_BADID:
|
||||
case H5I_DATASPACE:
|
||||
|
@ -131,6 +131,9 @@ H5G_map_obj_type(H5O_type_t obj_type)
|
||||
ret_value = H5G_TYPE;
|
||||
break;
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
/* Maps not supported in native VOL connector */
|
||||
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
case H5O_TYPE_NTYPES:
|
||||
default:
|
||||
|
@ -213,6 +213,9 @@ H5G_loc_real(void *obj, H5I_type_t type, H5G_loc_t *loc)
|
||||
case H5I_DATASPACE:
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of dataspace")
|
||||
|
||||
case H5I_MAP:
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "maps not supported in native VOL connector")
|
||||
|
||||
case H5I_GENPROP_CLS:
|
||||
case H5I_GENPROP_LST:
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of property list")
|
||||
|
@ -816,6 +816,9 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
|
||||
obj_path = H5T_nameof((H5T_t *)obj_ptr);
|
||||
break;
|
||||
|
||||
case H5I_MAP:
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "maps not supported in native VOL connector")
|
||||
|
||||
case H5I_UNINIT:
|
||||
case H5I_BADID:
|
||||
case H5I_FILE:
|
||||
@ -1112,6 +1115,9 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file,
|
||||
search_datatype = TRUE;
|
||||
break;
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "maps not supported in native VOL connector")
|
||||
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
case H5O_TYPE_NTYPES:
|
||||
/* Search and replace names through datatype IDs */
|
||||
|
@ -604,6 +604,9 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
|
||||
obj_path = H5T_nameof((H5T_t *)obj_ptr);
|
||||
break;
|
||||
|
||||
case H5I_MAP:
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "maps not supported in native VOL connector")
|
||||
|
||||
case H5I_UNINIT:
|
||||
case H5I_BADID:
|
||||
case H5I_FILE:
|
||||
|
@ -2371,6 +2371,11 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
|
||||
break;
|
||||
}
|
||||
|
||||
/* TODO: Maps will have to be added when they are supported in the
|
||||
* native VOL connector.
|
||||
*/
|
||||
case H5I_MAP:
|
||||
|
||||
case H5I_UNINIT:
|
||||
case H5I_BADID:
|
||||
case H5I_FILE:
|
||||
|
@ -38,6 +38,7 @@ typedef enum H5I_type_t {
|
||||
H5I_DATATYPE, /* type ID for Datatype objects */
|
||||
H5I_DATASPACE, /* type ID for Dataspace objects */
|
||||
H5I_DATASET, /* type ID for Dataset objects */
|
||||
H5I_MAP, /* type ID for Map objects */
|
||||
H5I_ATTR, /* type ID for Attribute objects */
|
||||
H5I_VFL, /* type ID for virtual file layer */
|
||||
H5I_VOL, /* type ID for virtual object layer */
|
||||
|
31
src/H5Mmodule.h
Normal file
31
src/H5Mmodule.h
Normal file
@ -0,0 +1,31 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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: This file contains declarations which define macros for the
|
||||
* H5M package. Including this header means that the source file
|
||||
* is part of the H5M package.
|
||||
*/
|
||||
#ifndef _H5Mmodule_H
|
||||
#define _H5Mmodule_H
|
||||
|
||||
/* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error
|
||||
* reporting macros.
|
||||
*/
|
||||
#define H5M_MODULE
|
||||
#define H5_MY_PKG H5M
|
||||
#define H5_MY_PKG_ERR H5E_MAP
|
||||
#define H5_MY_PKG_INIT YES
|
||||
|
||||
#endif /* _H5Dmodule_H */
|
||||
|
||||
|
51
src/H5Mpkg.h
Normal file
51
src/H5Mpkg.h
Normal file
@ -0,0 +1,51 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* 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: This file contains declarations which are visible only within
|
||||
* the H5M package. Source files outside the H5M package should
|
||||
* include H5Mprivate.h instead.
|
||||
*/
|
||||
#if !(defined H5M_FRIEND || defined H5M_MODULE)
|
||||
#error "Do not include this file outside the H5M package!"
|
||||
#endif
|
||||
|
||||
#ifndef _H5Mpkg_H
|
||||
#define _H5Mpkg_H
|
||||
|
||||
/* Get package's private header */
|
||||
#include "H5Mprivate.h"
|
||||
|
||||
/* Other private headers needed by this file */
|
||||
|
||||
/**************************/
|
||||
/* Package Private Macros */
|
||||
/**************************/
|
||||
|
||||
|
||||
/****************************/
|
||||
/* Package Private Typedefs */
|
||||
/****************************/
|
||||
|
||||
|
||||
/*****************************/
|
||||
/* Package Private Variables */
|
||||
/*****************************/
|
||||
|
||||
|
||||
/******************************/
|
||||
/* Package Private Prototypes */
|
||||
/******************************/
|
||||
|
||||
#endif /*_H5Dpkg_H*/
|
||||
|
80
src/H5Mprivate.h
Normal file
80
src/H5Mprivate.h
Normal file
@ -0,0 +1,80 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* 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. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* This file contains private information about the H5M module
|
||||
*/
|
||||
#ifndef _H5Mprivate_H
|
||||
#define _H5Mprivate_H
|
||||
|
||||
/* Include package's public header */
|
||||
#include "H5Mpublic.h"
|
||||
|
||||
/* Private headers needed by this file */
|
||||
#include "H5FDprivate.h" /* File drivers */
|
||||
#include "H5Oprivate.h" /* Object headers */
|
||||
#include "H5Sprivate.h" /* Dataspaces */
|
||||
#include "H5Zprivate.h" /* Data filters */
|
||||
|
||||
|
||||
/**************************/
|
||||
/* Library Private Macros */
|
||||
/**************************/
|
||||
|
||||
/*
|
||||
* Feature: Define H5M_DEBUG on the compiler command line if you want to
|
||||
* debug maps. NDEBUG must not be defined in order for this
|
||||
* to have any effect.
|
||||
*/
|
||||
#ifdef NDEBUG
|
||||
# undef H5M_DEBUG
|
||||
#endif
|
||||
|
||||
/* ======== Map creation property names ======== */
|
||||
|
||||
/* ======== Map access property names ======== */
|
||||
#define H5M_ACS_KEY_PREFETCH_SIZE_NAME "key_prefetch_size" /* Number of keys to prefetch during map iteration */
|
||||
#define H5M_ACS_KEY_ALLOC_SIZE_NAME "key_alloc_size" /* Initial allocation size for keys prefetched during map iteration */
|
||||
|
||||
/* Default temporary buffer size */
|
||||
#define H5D_TEMP_BUF_SIZE (1024 * 1024)
|
||||
|
||||
/* Default I/O vector size */
|
||||
#define H5D_IO_VECTOR_SIZE 1024
|
||||
|
||||
/* Default VL allocation & free info */
|
||||
#define H5D_VLEN_ALLOC NULL
|
||||
#define H5D_VLEN_ALLOC_INFO NULL
|
||||
#define H5D_VLEN_FREE NULL
|
||||
#define H5D_VLEN_FREE_INFO NULL
|
||||
|
||||
/* Default virtual dataset list size */
|
||||
#define H5D_VIRTUAL_DEF_LIST_SIZE 8
|
||||
|
||||
|
||||
/****************************/
|
||||
/* Library Private Typedefs */
|
||||
/****************************/
|
||||
|
||||
|
||||
/*****************************/
|
||||
/* Library Private Variables */
|
||||
/*****************************/
|
||||
|
||||
|
||||
/******************************/
|
||||
/* Library Private Prototypes */
|
||||
/******************************/
|
||||
|
||||
#endif /* _H5Mprivate_H */
|
||||
|
126
src/H5Mpublic.h
Normal file
126
src/H5Mpublic.h
Normal file
@ -0,0 +1,126 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* 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. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* This file contains public declarations for the H5M module.
|
||||
*
|
||||
* NOTE: This is an experimental API. Everything in the H5M package
|
||||
* is subject to revision in a future release.
|
||||
*/
|
||||
#ifndef _H5Mpublic_H
|
||||
#define _H5Mpublic_H
|
||||
|
||||
/* System headers needed by this file */
|
||||
|
||||
/* Public headers needed by this file */
|
||||
#include "H5public.h"
|
||||
#include "H5Ipublic.h"
|
||||
|
||||
|
||||
/*****************/
|
||||
/* Public Macros */
|
||||
/*****************/
|
||||
|
||||
/* Macros defining operation IDs for map VOL callbacks (implemented using the
|
||||
* "optional" VOL callback) */
|
||||
#define H5VL_MAP_CREATE 1
|
||||
#define H5VL_MAP_OPEN 2
|
||||
#define H5VL_MAP_GET_VAL 3
|
||||
#define H5VL_MAP_EXISTS 4
|
||||
#define H5VL_MAP_SET 5
|
||||
#define H5VL_MAP_GET 6
|
||||
#define H5VL_MAP_SPECIFIC 7
|
||||
#define H5VL_MAP_CLOSE 8
|
||||
|
||||
|
||||
/*******************/
|
||||
/* Public Typedefs */
|
||||
/*******************/
|
||||
|
||||
/* types for map GET callback */
|
||||
typedef enum H5VL_map_get_t {
|
||||
H5VL_MAP_GET_MAPL, /* map access property list */
|
||||
H5VL_MAP_GET_MCPL, /* map creation property list */
|
||||
H5VL_MAP_GET_KEY_TYPE, /* key type */
|
||||
H5VL_MAP_GET_VAL_TYPE, /* value type */
|
||||
H5VL_MAP_GET_COUNT /* key count */
|
||||
} H5VL_map_get_t;
|
||||
|
||||
/* types for map SPECIFIC callback */
|
||||
typedef enum H5VL_map_specific_t {
|
||||
H5VL_MAP_ITER, /* H5Miterate */
|
||||
H5VL_MAP_DELETE_KEY /* H5Mdelete_key */
|
||||
} H5VL_map_specific_t;
|
||||
|
||||
/* Callback for H5Miterate() */
|
||||
typedef herr_t (*H5M_iterate_t)(hid_t map_id, const void *key, void *op_data);
|
||||
|
||||
|
||||
/********************/
|
||||
/* Public Variables */
|
||||
/********************/
|
||||
|
||||
|
||||
/*********************/
|
||||
/* Public Prototypes */
|
||||
/*********************/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The map API is only built when requested since there's no support in
|
||||
* the native file format at this time. It's only supported in a few VOL
|
||||
* connectors.
|
||||
*/
|
||||
#ifdef H5_HAVE_MAP_API
|
||||
|
||||
H5_DLL hid_t H5Mcreate(hid_t loc_id, const char *name, hid_t key_type_id,
|
||||
hid_t val_type_id, hid_t lcpl_id, hid_t mcpl_id, hid_t mapl_id);
|
||||
H5_DLL hid_t H5Mcreate_anon(hid_t loc_id, hid_t key_type_id, hid_t val_type_id,
|
||||
hid_t mcpl_id, hid_t mapl_id);
|
||||
H5_DLL hid_t H5Mopen(hid_t loc_id, const char *name, hid_t mapl_id);
|
||||
H5_DLL herr_t H5Mclose(hid_t map_id);
|
||||
H5_DLL hid_t H5Mget_key_type(hid_t map_id);
|
||||
H5_DLL hid_t H5Mget_val_type(hid_t map_id);
|
||||
H5_DLL hid_t H5Mget_create_plist(hid_t map_id);
|
||||
H5_DLL hid_t H5Mget_access_plist(hid_t map_id);
|
||||
H5_DLL herr_t H5Mget_count(hid_t map_id, hsize_t *count, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5Mset(hid_t map_id, hid_t key_mem_type_id, const void *key,
|
||||
hid_t val_mem_type_id, const void *value, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5Mget(hid_t map_id, hid_t key_mem_type_id, const void *key,
|
||||
hid_t val_mem_type_id, void *value, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5Mexists(hid_t map_id, hid_t key_mem_type_id, const void *key,
|
||||
hbool_t *exists, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5Miterate(hid_t map_id, hsize_t *idx, hid_t key_mem_type_id,
|
||||
H5M_iterate_t op, void *op_data, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5Miterate_by_name(hid_t loc_id, const char *map_name,
|
||||
hsize_t *idx, hid_t key_mem_type_id, H5M_iterate_t op, void *op_data,
|
||||
hid_t dxpl_id, hid_t lapl_id);
|
||||
H5_DLL herr_t H5Mdelete_key(hid_t map_id, hid_t key_mem_type_id,
|
||||
const void *key, hid_t dxpl_id);
|
||||
|
||||
/* Symbols defined for compatibility with previous versions of the HDF5 API.
|
||||
*
|
||||
* Use of these symbols is deprecated.
|
||||
*/
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
#endif /* H5_HAVE_MAP_API */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _H5Mpublic_H */
|
||||
|
@ -1084,6 +1084,7 @@ H5Oclose(hid_t object_id)
|
||||
case H5I_GROUP:
|
||||
case H5I_DATATYPE:
|
||||
case H5I_DATASET:
|
||||
case H5I_MAP:
|
||||
if(H5I_object(object_id) == NULL)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object")
|
||||
if(H5I_dec_app_ref(object_id) < 0)
|
||||
|
@ -479,6 +479,9 @@ H5O_refresh_metadata_reopen(hid_t oid, H5G_loc_t *obj_loc, H5VL_t *vol_connector
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to finish refresh for dataset")
|
||||
break;
|
||||
|
||||
case H5I_MAP:
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "maps not supported in native VOL connector")
|
||||
|
||||
case H5I_UNINIT:
|
||||
case H5I_BADID:
|
||||
case H5I_FILE:
|
||||
|
@ -1836,6 +1836,9 @@ H5O_get_loc(hid_t object_id)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from datatype ID")
|
||||
break;
|
||||
|
||||
case H5I_MAP:
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, NULL, "maps not supported in native VOL connector")
|
||||
|
||||
case H5I_UNINIT:
|
||||
case H5I_BADID:
|
||||
case H5I_FILE:
|
||||
|
@ -94,6 +94,7 @@ typedef enum H5O_type_t {
|
||||
H5O_TYPE_GROUP, /* Object is a group */
|
||||
H5O_TYPE_DATASET, /* Object is a dataset */
|
||||
H5O_TYPE_NAMED_DATATYPE, /* Object is a named data type */
|
||||
H5O_TYPE_MAP, /* Object is a map */
|
||||
H5O_TYPE_NTYPES /* Number of different object types (must be last!) */
|
||||
} H5O_type_t;
|
||||
|
||||
|
@ -722,7 +722,7 @@ H5P__decode(const void *buf)
|
||||
|
||||
/* Get the type of the property list */
|
||||
type = (H5P_plist_type_t)*p++;
|
||||
if(type <= H5P_TYPE_USER || type > H5P_TYPE_LINK_ACCESS)
|
||||
if(type <= H5P_TYPE_USER || type >= H5P_TYPE_MAX_TYPE)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_BADRANGE, FAIL, "bad type of encoded information: %u", (unsigned)type)
|
||||
|
||||
/* Create new property list of the specified type */
|
||||
|
34
src/H5Pint.c
34
src/H5Pint.c
@ -151,6 +151,10 @@ hid_t H5P_CLS_DATATYPE_CREATE_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_DATATYPE_CREATE_g = NULL;
|
||||
hid_t H5P_CLS_DATATYPE_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_DATATYPE_ACCESS_g = NULL;
|
||||
hid_t H5P_CLS_MAP_CREATE_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_MAP_CREATE_g = NULL;
|
||||
hid_t H5P_CLS_MAP_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_MAP_ACCESS_g = NULL;
|
||||
hid_t H5P_CLS_ATTRIBUTE_CREATE_ID_g = H5I_INVALID_HID;
|
||||
H5P_genclass_t *H5P_CLS_ATTRIBUTE_CREATE_g = NULL;
|
||||
hid_t H5P_CLS_ATTRIBUTE_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
@ -180,6 +184,8 @@ hid_t H5P_LST_GROUP_CREATE_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_GROUP_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_DATATYPE_CREATE_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_DATATYPE_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_MAP_CREATE_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_MAP_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_ATTRIBUTE_CREATE_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_ATTRIBUTE_ACCESS_ID_g = H5I_INVALID_HID;
|
||||
hid_t H5P_LST_OBJECT_COPY_ID_g = H5I_INVALID_HID;
|
||||
@ -314,6 +320,7 @@ H5_DLLVAR const H5P_libclass_t H5P_CLS_STRCRT[1]; /* String create */
|
||||
H5_DLLVAR const H5P_libclass_t H5P_CLS_GCRT[1]; /* Group create */
|
||||
H5_DLLVAR const H5P_libclass_t H5P_CLS_FCRT[1]; /* File creation */
|
||||
H5_DLLVAR const H5P_libclass_t H5P_CLS_DCRT[1]; /* Dataset creation */
|
||||
H5_DLLVAR const H5P_libclass_t H5P_CLS_MCRT[1]; /* Map creation */
|
||||
H5_DLLVAR const H5P_libclass_t H5P_CLS_DXFR[1]; /* Data transfer */
|
||||
H5_DLLVAR const H5P_libclass_t H5P_CLS_FMNT[1]; /* File mount */
|
||||
H5_DLLVAR const H5P_libclass_t H5P_CLS_ACRT[1]; /* Attribute creation */
|
||||
@ -352,6 +359,8 @@ static H5P_libclass_t const * const init_class[] = {
|
||||
H5P_CLS_FMNT, /* File mount */
|
||||
H5P_CLS_TCRT, /* Datatype creation */
|
||||
H5P_CLS_TACC, /* Datatype access */
|
||||
H5P_CLS_MCRT, /* Map creation */
|
||||
H5P_CLS_MACC, /* Map access */
|
||||
H5P_CLS_ACRT, /* Attribute creation */
|
||||
H5P_CLS_AACC, /* Attribute access */
|
||||
H5P_CLS_LCRT, /* Link creation */
|
||||
@ -431,7 +440,7 @@ H5P__init_package(void)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Sanity check */
|
||||
HDcompile_assert(H5P_TYPE_VOL_INITIALIZE == (H5P_TYPE_MAX_TYPE - 1));
|
||||
HDcompile_assert(H5P_TYPE_MAP_ACCESS == (H5P_TYPE_MAX_TYPE - 1));
|
||||
|
||||
/*
|
||||
* Initialize the Generic Property class & object groups.
|
||||
@ -442,8 +451,8 @@ H5P__init_package(void)
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, FAIL, "unable to initialize ID group")
|
||||
|
||||
/* Repeatedly pass over the list of property list classes for the library,
|
||||
* initializing each class if it's parent class is initialized, until no
|
||||
* more progress is made.
|
||||
* initializing each class if its parent class is initialized, until no
|
||||
* more progress is made.
|
||||
*/
|
||||
tot_init = 0;
|
||||
do {
|
||||
@ -547,6 +556,8 @@ H5P_term_package(void)
|
||||
H5P_LST_GROUP_ACCESS_ID_g =
|
||||
H5P_LST_DATATYPE_CREATE_ID_g =
|
||||
H5P_LST_DATATYPE_ACCESS_ID_g =
|
||||
H5P_LST_MAP_CREATE_ID_g =
|
||||
H5P_LST_MAP_ACCESS_ID_g =
|
||||
H5P_LST_ATTRIBUTE_CREATE_ID_g =
|
||||
H5P_LST_ATTRIBUTE_ACCESS_ID_g =
|
||||
H5P_LST_OBJECT_COPY_ID_g =
|
||||
@ -574,6 +585,8 @@ H5P_term_package(void)
|
||||
H5P_CLS_GROUP_ACCESS_g =
|
||||
H5P_CLS_DATATYPE_CREATE_g =
|
||||
H5P_CLS_DATATYPE_ACCESS_g =
|
||||
H5P_CLS_MAP_CREATE_g =
|
||||
H5P_CLS_MAP_ACCESS_g =
|
||||
H5P_CLS_STRING_CREATE_g =
|
||||
H5P_CLS_ATTRIBUTE_CREATE_g =
|
||||
H5P_CLS_ATTRIBUTE_ACCESS_g =
|
||||
@ -594,6 +607,8 @@ H5P_term_package(void)
|
||||
H5P_CLS_GROUP_ACCESS_ID_g =
|
||||
H5P_CLS_DATATYPE_CREATE_ID_g =
|
||||
H5P_CLS_DATATYPE_ACCESS_ID_g =
|
||||
H5P_CLS_MAP_CREATE_ID_g =
|
||||
H5P_CLS_MAP_ACCESS_ID_g =
|
||||
H5P_CLS_STRING_CREATE_ID_g =
|
||||
H5P_CLS_ATTRIBUTE_CREATE_ID_g =
|
||||
H5P_CLS_ATTRIBUTE_ACCESS_ID_g =
|
||||
@ -5437,8 +5452,9 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
|
||||
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(type >= H5P_TYPE_USER && type < H5P_TYPE_MAX_TYPE);
|
||||
/* Sanity checks */
|
||||
HDcompile_assert(H5P_TYPE_MAP_ACCESS == (H5P_TYPE_MAX_TYPE - 1));
|
||||
HDassert(type >= H5P_TYPE_USER && type <= H5P_TYPE_MAP_ACCESS);
|
||||
|
||||
/* Check arguments */
|
||||
if(type == H5P_TYPE_USER)
|
||||
@ -5492,6 +5508,14 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
|
||||
class_id = H5P_CLS_DATATYPE_ACCESS_ID_g;
|
||||
break;
|
||||
|
||||
case H5P_TYPE_MAP_CREATE:
|
||||
class_id = H5P_CLS_MAP_CREATE_ID_g;
|
||||
break;
|
||||
|
||||
case H5P_TYPE_MAP_ACCESS:
|
||||
class_id = H5P_CLS_MAP_ACCESS_ID_g;
|
||||
break;
|
||||
|
||||
case H5P_TYPE_STRING_CREATE:
|
||||
class_id = H5P_CLS_STRING_CREATE_ID_g;
|
||||
break;
|
||||
|
217
src/H5Pmapl.c
Normal file
217
src/H5Pmapl.c
Normal file
@ -0,0 +1,217 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* 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: Map access property list class routines
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/****************/
|
||||
/* Module Setup */
|
||||
/****************/
|
||||
|
||||
#include "H5Pmodule.h" /* This source code file is part of the H5P module */
|
||||
|
||||
|
||||
/***********/
|
||||
/* Headers */
|
||||
/***********/
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5Mprivate.h" /* Maps */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5Iprivate.h" /* IDs */
|
||||
#include "H5Ppkg.h" /* Property lists */
|
||||
|
||||
|
||||
/****************/
|
||||
/* Local Macros */
|
||||
/****************/
|
||||
|
||||
/* ========= Map Access properties ============ */
|
||||
/* Definitions for key prefetch size */
|
||||
#define H5M_ACS_KEY_PREFETCH_SIZE_SIZE sizeof(size_t)
|
||||
#define H5M_ACS_KEY_PREFETCH_SIZE_DEF (size_t)(16 * 1024)
|
||||
#define H5M_ACS_KEY_PREFETCH_SIZE_ENC H5P__encode_size_t
|
||||
#define H5M_ACS_KEY_PREFETCH_SIZE_DEC H5P__decode_size_t
|
||||
/* Definition for key prefetch buffer size */
|
||||
#define H5M_ACS_KEY_ALLOC_SIZE_SIZE sizeof(size_t)
|
||||
#define H5M_ACS_KEY_ALLOC_SIZE_DEF (size_t)(1024 * 1024)
|
||||
#define H5M_ACS_KEY_ALLOC_SIZE_ENC H5P__encode_size_t
|
||||
#define H5M_ACS_KEY_ALLOC_SIZE_DEC H5P__decode_size_t
|
||||
|
||||
|
||||
/******************/
|
||||
/* Local Typedefs */
|
||||
/******************/
|
||||
|
||||
|
||||
/********************/
|
||||
/* Package Typedefs */
|
||||
/********************/
|
||||
|
||||
|
||||
/********************/
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
|
||||
/* Property class callbacks */
|
||||
static herr_t H5P__macc_reg_prop(H5P_genclass_t *pclass);
|
||||
|
||||
|
||||
/*********************/
|
||||
/* Package Variables */
|
||||
/*********************/
|
||||
|
||||
/* Map access property list class library initialization object */
|
||||
const H5P_libclass_t H5P_CLS_MACC[1] = {{
|
||||
"map access", /* Class name for debugging */
|
||||
H5P_TYPE_MAP_ACCESS, /* Class type */
|
||||
|
||||
&H5P_CLS_LINK_ACCESS_g, /* Parent class */
|
||||
&H5P_CLS_MAP_ACCESS_g, /* Pointer to class */
|
||||
&H5P_CLS_MAP_ACCESS_ID_g, /* Pointer to class ID */
|
||||
&H5P_LST_MAP_ACCESS_ID_g, /* Pointer to default property list ID */
|
||||
H5P__macc_reg_prop, /* Default property registration routine */
|
||||
|
||||
NULL, /* Class creation callback */
|
||||
NULL, /* Class creation callback info */
|
||||
NULL, /* Class copy callback */
|
||||
NULL, /* Class copy callback info */
|
||||
NULL, /* Class close callback */
|
||||
NULL /* Class close callback info */
|
||||
}};
|
||||
|
||||
|
||||
/*****************************/
|
||||
/* Library Private Variables */
|
||||
/*****************************/
|
||||
|
||||
|
||||
/*******************/
|
||||
/* Local Variables */
|
||||
/*******************/
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5P__macc_reg_prop
|
||||
*
|
||||
* Purpose: Register the map access property list class's
|
||||
* properties
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5P__macc_reg_prop(H5P_genclass_t *pclass)
|
||||
{
|
||||
size_t key_prefetch_size = H5M_ACS_KEY_PREFETCH_SIZE_DEF; /* Default key prefetch size for iteration */
|
||||
size_t key_alloc_size = H5M_ACS_KEY_ALLOC_SIZE_DEF; /* Default key prefetch allocation size for iteration */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Register the key prefetch size for iteration */
|
||||
if(H5P__register_real(pclass, H5M_ACS_KEY_PREFETCH_SIZE_NAME, H5M_ACS_KEY_PREFETCH_SIZE_SIZE, &key_prefetch_size,
|
||||
NULL, NULL, NULL, H5M_ACS_KEY_PREFETCH_SIZE_ENC, H5M_ACS_KEY_PREFETCH_SIZE_DEC, NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
/* Register the key prefetch allocation size for iteration */
|
||||
if(H5P__register_real(pclass, H5M_ACS_KEY_ALLOC_SIZE_NAME, H5M_ACS_KEY_ALLOC_SIZE_SIZE, &key_alloc_size,
|
||||
NULL, NULL, NULL, H5M_ACS_KEY_ALLOC_SIZE_ENC, H5M_ACS_KEY_ALLOC_SIZE_DEC, NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5P__macc_reg_prop() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5Pset_map_iterate_hints
|
||||
*
|
||||
* Purpose: H5Pset_map_iterate_hints adjusts the behavior of
|
||||
* H5Miterate when prefetching keys for iteration. The
|
||||
* KEY_PREFETCH_SIZE parameter specifies the number of keys
|
||||
* to prefetch at a time during iteration. The KEY_ALLOC_SIZE
|
||||
* parameter specifies the initial size of the buffer
|
||||
* allocated to hold these prefetched keys. If this buffer is
|
||||
* too small it will be reallocated to a larger size, though
|
||||
* this may result in an additional I/O.
|
||||
*
|
||||
* Move to DAOS VOL code? DSINC
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5Pset_map_iterate_hints(hid_t mapl_id, size_t key_prefetch_size, size_t key_alloc_size)
|
||||
{
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
herr_t ret_value = SUCCEED; /* return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE3("e", "izz", mapl_id, key_prefetch_size, key_alloc_size);
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = H5P_object_verify(mapl_id, H5P_MAP_ACCESS)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
|
||||
|
||||
/* Set sizes */
|
||||
if(H5P_set(plist, H5M_ACS_KEY_PREFETCH_SIZE_NAME, &key_prefetch_size) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set key prefetch size");
|
||||
if(H5P_set(plist, H5M_ACS_KEY_ALLOC_SIZE_NAME, &key_alloc_size) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set key allocation size");
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
} /* end H5Pset_map_iterate_hints() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5Pget_map_iterate_hints
|
||||
*
|
||||
* Purpose: Returns the map iterate hints, KEY_PREFETCH_SIZE and
|
||||
* KEY_ALLOC_SIZE, as set by H5Pset_map_iterate_hints.
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5Pget_map_iterate_hints(hid_t mapl_id, size_t *key_prefetch_size, size_t *key_alloc_size)
|
||||
{
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
herr_t ret_value = SUCCEED; /* return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE3("e", "i*z*z", mapl_id, key_prefetch_size, key_alloc_size);
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = H5P_object_verify(mapl_id, H5P_MAP_ACCESS)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
|
||||
|
||||
/* Get the properties */
|
||||
if(key_prefetch_size) {
|
||||
if(H5P_get(plist, H5M_ACS_KEY_PREFETCH_SIZE_NAME, key_prefetch_size) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get key prefetch size");
|
||||
} /* end if */
|
||||
if(key_alloc_size) {
|
||||
if(H5P_get(plist, H5M_ACS_KEY_ALLOC_SIZE_NAME, key_alloc_size) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get key allocation size");
|
||||
} /* end if */
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
} /* end H5Pget_map_iterate_hints() */
|
||||
|
115
src/H5Pmcpl.c
Normal file
115
src/H5Pmcpl.c
Normal file
@ -0,0 +1,115 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* 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. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Created: H5Pmcpl.c
|
||||
*
|
||||
* Purpose: Map creation property list class routines
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/****************/
|
||||
/* Module Setup */
|
||||
/****************/
|
||||
|
||||
#include "H5Pmodule.h" /* This source code file is part of the H5P module */
|
||||
|
||||
|
||||
/***********/
|
||||
/* Headers */
|
||||
/***********/
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5Mprivate.h" /* Maps */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5Iprivate.h" /* IDs */
|
||||
#include "H5Ppkg.h" /* Property lists */
|
||||
|
||||
|
||||
/****************/
|
||||
/* Local Macros */
|
||||
/****************/
|
||||
|
||||
|
||||
/******************/
|
||||
/* Local Typedefs */
|
||||
/******************/
|
||||
|
||||
|
||||
/********************/
|
||||
/* Package Typedefs */
|
||||
/********************/
|
||||
|
||||
|
||||
/********************/
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
|
||||
/* Property class callbacks */
|
||||
static herr_t H5P__mcrt_reg_prop(H5P_genclass_t *pclass);
|
||||
|
||||
|
||||
/*********************/
|
||||
/* Package Variables */
|
||||
/*********************/
|
||||
|
||||
/* Map create property list class library initialization object */
|
||||
const H5P_libclass_t H5P_CLS_MCRT[1] = {{
|
||||
"map create", /* Class name for debugging */
|
||||
H5P_TYPE_MAP_CREATE, /* Class type */
|
||||
|
||||
&H5P_CLS_OBJECT_CREATE_g, /* Parent class */
|
||||
&H5P_CLS_MAP_CREATE_g, /* Pointer to class */
|
||||
&H5P_CLS_MAP_CREATE_ID_g, /* Pointer to class ID */
|
||||
&H5P_LST_MAP_CREATE_ID_g, /* Pointer to default property list ID */
|
||||
H5P__mcrt_reg_prop, /* Default property registration routine */
|
||||
|
||||
NULL, /* Class creation callback */
|
||||
NULL, /* Class creation callback info */
|
||||
NULL, /* Class copy callback */
|
||||
NULL, /* Class copy callback info */
|
||||
NULL, /* Class close callback */
|
||||
NULL /* Class close callback info */
|
||||
}};
|
||||
|
||||
|
||||
/*****************************/
|
||||
/* Library Private Variables */
|
||||
/*****************************/
|
||||
|
||||
|
||||
/***************************/
|
||||
/* Local Private Variables */
|
||||
/***************************/
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5P__mcrt_reg_prop
|
||||
*
|
||||
* Purpose: Register the map creation property list class's properties
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5P__mcrt_reg_prop(H5P_genclass_t H5_ATTR_UNUSED *pclass)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5P__mcrt_reg_prop() */
|
||||
|
@ -79,6 +79,8 @@ typedef enum H5P_plist_type_t {
|
||||
H5P_TYPE_LINK_ACCESS = 17,
|
||||
H5P_TYPE_ATTRIBUTE_ACCESS = 18,
|
||||
H5P_TYPE_VOL_INITIALIZE = 19,
|
||||
H5P_TYPE_MAP_CREATE = 20,
|
||||
H5P_TYPE_MAP_ACCESS = 21,
|
||||
H5P_TYPE_MAX_TYPE
|
||||
} H5P_plist_type_t;
|
||||
|
||||
@ -125,6 +127,8 @@ H5_DLLVAR H5P_genclass_t *H5P_CLS_GROUP_CREATE_g;
|
||||
H5_DLLVAR H5P_genclass_t *H5P_CLS_GROUP_ACCESS_g;
|
||||
H5_DLLVAR H5P_genclass_t *H5P_CLS_DATATYPE_CREATE_g;
|
||||
H5_DLLVAR H5P_genclass_t *H5P_CLS_DATATYPE_ACCESS_g;
|
||||
H5_DLLVAR H5P_genclass_t *H5P_CLS_MAP_CREATE_g;
|
||||
H5_DLLVAR H5P_genclass_t *H5P_CLS_MAP_ACCESS_g;
|
||||
H5_DLLVAR H5P_genclass_t *H5P_CLS_ATTRIBUTE_CREATE_g;
|
||||
H5_DLLVAR H5P_genclass_t *H5P_CLS_ATTRIBUTE_ACCESS_g;
|
||||
H5_DLLVAR H5P_genclass_t *H5P_CLS_OBJECT_COPY_g;
|
||||
@ -139,6 +143,7 @@ H5_DLLVAR const struct H5P_libclass_t H5P_CLS_AACC[1]; /* Attribute access */
|
||||
H5_DLLVAR const struct H5P_libclass_t H5P_CLS_DACC[1]; /* Dataset access */
|
||||
H5_DLLVAR const struct H5P_libclass_t H5P_CLS_GACC[1]; /* Group access */
|
||||
H5_DLLVAR const struct H5P_libclass_t H5P_CLS_TACC[1]; /* Named datatype access */
|
||||
H5_DLLVAR const struct H5P_libclass_t H5P_CLS_MACC[1]; /* Map access */
|
||||
H5_DLLVAR const struct H5P_libclass_t H5P_CLS_FACC[1]; /* File access */
|
||||
H5_DLLVAR const struct H5P_libclass_t H5P_CLS_OCPY[1]; /* Object copy */
|
||||
|
||||
|
@ -62,6 +62,8 @@
|
||||
#define H5P_GROUP_ACCESS (H5OPEN H5P_CLS_GROUP_ACCESS_ID_g)
|
||||
#define H5P_DATATYPE_CREATE (H5OPEN H5P_CLS_DATATYPE_CREATE_ID_g)
|
||||
#define H5P_DATATYPE_ACCESS (H5OPEN H5P_CLS_DATATYPE_ACCESS_ID_g)
|
||||
#define H5P_MAP_CREATE (H5OPEN H5P_CLS_MAP_CREATE_ID_g)
|
||||
#define H5P_MAP_ACCESS (H5OPEN H5P_CLS_MAP_ACCESS_ID_g)
|
||||
#define H5P_STRING_CREATE (H5OPEN H5P_CLS_STRING_CREATE_ID_g)
|
||||
#define H5P_ATTRIBUTE_CREATE (H5OPEN H5P_CLS_ATTRIBUTE_CREATE_ID_g)
|
||||
#define H5P_ATTRIBUTE_ACCESS (H5OPEN H5P_CLS_ATTRIBUTE_ACCESS_ID_g)
|
||||
@ -83,6 +85,8 @@
|
||||
#define H5P_GROUP_ACCESS_DEFAULT (H5OPEN H5P_LST_GROUP_ACCESS_ID_g)
|
||||
#define H5P_DATATYPE_CREATE_DEFAULT (H5OPEN H5P_LST_DATATYPE_CREATE_ID_g)
|
||||
#define H5P_DATATYPE_ACCESS_DEFAULT (H5OPEN H5P_LST_DATATYPE_ACCESS_ID_g)
|
||||
#define H5P_MAP_CREATE_DEFAULT (H5OPEN H5P_LST_MAP_CREATE_ID_g)
|
||||
#define H5P_MAP_ACCESS_DEFAULT (H5OPEN H5P_LST_MAP_ACCESS_ID_g)
|
||||
#define H5P_ATTRIBUTE_CREATE_DEFAULT (H5OPEN H5P_LST_ATTRIBUTE_CREATE_ID_g)
|
||||
#define H5P_ATTRIBUTE_ACCESS_DEFAULT (H5OPEN H5P_LST_ATTRIBUTE_ACCESS_ID_g)
|
||||
#define H5P_OBJECT_COPY_DEFAULT (H5OPEN H5P_LST_OBJECT_COPY_ID_g)
|
||||
@ -191,6 +195,8 @@ H5_DLLVAR hid_t H5P_CLS_GROUP_CREATE_ID_g;
|
||||
H5_DLLVAR hid_t H5P_CLS_GROUP_ACCESS_ID_g;
|
||||
H5_DLLVAR hid_t H5P_CLS_DATATYPE_CREATE_ID_g;
|
||||
H5_DLLVAR hid_t H5P_CLS_DATATYPE_ACCESS_ID_g;
|
||||
H5_DLLVAR hid_t H5P_CLS_MAP_CREATE_ID_g;
|
||||
H5_DLLVAR hid_t H5P_CLS_MAP_ACCESS_ID_g;
|
||||
H5_DLLVAR hid_t H5P_CLS_STRING_CREATE_ID_g;
|
||||
H5_DLLVAR hid_t H5P_CLS_ATTRIBUTE_CREATE_ID_g;
|
||||
H5_DLLVAR hid_t H5P_CLS_ATTRIBUTE_ACCESS_ID_g;
|
||||
@ -211,6 +217,8 @@ H5_DLLVAR hid_t H5P_LST_GROUP_CREATE_ID_g;
|
||||
H5_DLLVAR hid_t H5P_LST_GROUP_ACCESS_ID_g;
|
||||
H5_DLLVAR hid_t H5P_LST_DATATYPE_CREATE_ID_g;
|
||||
H5_DLLVAR hid_t H5P_LST_DATATYPE_ACCESS_ID_g;
|
||||
H5_DLLVAR hid_t H5P_LST_MAP_CREATE_ID_g;
|
||||
H5_DLLVAR hid_t H5P_LST_MAP_ACCESS_ID_g;
|
||||
H5_DLLVAR hid_t H5P_LST_ATTRIBUTE_CREATE_ID_g;
|
||||
H5_DLLVAR hid_t H5P_LST_ATTRIBUTE_ACCESS_ID_g;
|
||||
H5_DLLVAR hid_t H5P_LST_OBJECT_COPY_ID_g;
|
||||
@ -491,6 +499,12 @@ H5_DLL herr_t H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /*
|
||||
H5_DLL herr_t H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags);
|
||||
H5_DLL herr_t H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags /* out */);
|
||||
|
||||
/* Map access property list (MAPL) routines */
|
||||
#ifdef H5_HAVE_MAP_API
|
||||
H5_DLL herr_t H5Pset_map_iterate_hints(hid_t mapl_id, size_t key_prefetch_size, size_t key_alloc_size);
|
||||
H5_DLL herr_t H5Pget_map_iterate_hints(hid_t mapl_id, size_t *key_prefetch_size /*out*/, size_t *key_alloc_size /*out*/);
|
||||
#endif /* H5_HAVE_MAP_API */
|
||||
|
||||
/* String creation property list (STRCPL) routines */
|
||||
H5_DLL herr_t H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding);
|
||||
H5_DLL herr_t H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/);
|
||||
|
@ -472,6 +472,9 @@ H5R__dereference(H5F_t *file, hid_t oapl_id, H5R_type_t ref_type, const void *_r
|
||||
break;
|
||||
}
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
HGOTO_ERROR(H5E_REFERENCE, H5E_BADTYPE, H5I_INVALID_HID, "maps not supported in native VOL connector")
|
||||
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
case H5O_TYPE_NTYPES:
|
||||
default:
|
||||
|
@ -1740,6 +1740,7 @@ H5Tcopy(hid_t obj_id)
|
||||
case H5I_GROUP:
|
||||
case H5I_DATASPACE:
|
||||
case H5I_ATTR:
|
||||
case H5I_MAP:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_GENPROP_CLS:
|
||||
|
@ -6562,3 +6562,114 @@ done:
|
||||
FUNC_LEAVE_API_NOINIT(ret_value)
|
||||
} /* end H5VLrequest_free() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5VL__optional
|
||||
*
|
||||
* Purpose: Optional operation specific to connectors.
|
||||
*
|
||||
* Return: Success: Non-negative
|
||||
* Failure: Negative
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5VL__optional(void *obj, const H5VL_class_t *cls, hid_t dxpl_id,
|
||||
void **req, va_list arguments)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check if the corresponding VOL callback exists */
|
||||
if(NULL == cls->optional)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'optional' method")
|
||||
|
||||
/* Call the corresponding VOL callback */
|
||||
if((ret_value = (cls->optional)(obj, dxpl_id, req, arguments)) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, ret_value, "unable to execute optional callback")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5VL__optional() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5VL_optional
|
||||
*
|
||||
* Purpose: Optional operation specific to connectors.
|
||||
*
|
||||
* Return: Success: Non-negative
|
||||
* Failure: Negative
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5VL_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id,
|
||||
void **req, ...)
|
||||
{
|
||||
va_list arguments; /* Argument list passed from the API call */
|
||||
hbool_t arg_started = FALSE; /* Whether the va_list has been started */
|
||||
hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
|
||||
/* Set wrapper info in API context */
|
||||
if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->connector) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if((ret_value = H5VL__optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments)) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute optional callback")
|
||||
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
HDONE_ERROR(H5E_VOL, H5E_CANTRESET, ret_value, "can't reset VOL wrapper info")
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5VL_optional() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5VLoptional
|
||||
*
|
||||
* Purpose: Performs an optional connector-specific operation
|
||||
*
|
||||
* Return: Success: Non-negative
|
||||
* Failure: Negative
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5VLoptional(void *obj, hid_t connector_id, hid_t dxpl_id, void **req,
|
||||
va_list arguments)
|
||||
{
|
||||
H5VL_class_t *cls; /* VOL connector's class struct */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_API_NOINIT
|
||||
H5TRACE5("e", "*xii**xx", obj, connector_id, dxpl_id, req, arguments);
|
||||
|
||||
/* Check args and get class pointer */
|
||||
if(NULL == obj)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object")
|
||||
if(NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID")
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
if((ret_value = H5VL__optional(obj, cls, dxpl_id, req, arguments)) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, ret_value, "unable to execute optional callback")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_API_NOINIT(ret_value)
|
||||
} /* end H5VLoptional() */
|
||||
|
||||
|
@ -314,7 +314,7 @@ typedef struct H5VL_group_class_t {
|
||||
/* H5L routines */
|
||||
typedef struct H5VL_link_class_t {
|
||||
herr_t (*create)(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc_params_t *loc_params,
|
||||
hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req, va_list argumenmts);
|
||||
hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
herr_t (*copy)(void *src_obj, const H5VL_loc_params_t *loc_params1,
|
||||
void *dst_obj, const H5VL_loc_params_t *loc_params2,
|
||||
hid_t lcpl, hid_t lapl, hid_t dxpl_id, void **req);
|
||||
|
@ -552,7 +552,8 @@ H5VL__new_vol_obj(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t
|
||||
HDassert(vol_connector);
|
||||
|
||||
/* Make sure type number is valid */
|
||||
if(type != H5I_ATTR && type != H5I_DATASET && type != H5I_DATATYPE && type != H5I_FILE && type != H5I_GROUP)
|
||||
if(type != H5I_ATTR && type != H5I_DATASET && type != H5I_DATATYPE
|
||||
&& type != H5I_FILE && type != H5I_GROUP && type != H5I_MAP)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, NULL, "invalid type number")
|
||||
|
||||
/* Create the new VOL object */
|
||||
@ -1408,6 +1409,7 @@ H5VL__object(hid_t id, H5I_type_t obj_type)
|
||||
case H5I_DATASET:
|
||||
case H5I_FILE:
|
||||
case H5I_ATTR:
|
||||
case H5I_MAP:
|
||||
/* get the object */
|
||||
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(id)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "invalid identifier")
|
||||
|
@ -193,5 +193,8 @@ H5_DLL herr_t H5VL_request_specific(const H5VL_object_t *vol_obj, H5VL_request_s
|
||||
H5_DLL herr_t H5VL_request_optional(const H5VL_object_t *vol_obj, ...);
|
||||
H5_DLL herr_t H5VL_request_free(const H5VL_object_t *vol_obj);
|
||||
|
||||
/* Generic functions */
|
||||
H5_DLL herr_t H5VL_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id,void **req, ...);
|
||||
|
||||
#endif /* _H5VLprivate_H */
|
||||
|
||||
|
@ -78,6 +78,7 @@ MAJOR, H5E_FARRAY, Fixed Array
|
||||
MAJOR, H5E_PLUGIN, Plugin for dynamically loaded library
|
||||
MAJOR, H5E_PAGEBUF, Page Buffering
|
||||
MAJOR, H5E_CONTEXT, API Context
|
||||
MAJOR, H5E_MAP, Map
|
||||
MAJOR, H5E_NONE_MAJOR, No error
|
||||
|
||||
# Sections (for grouping minor errors)
|
||||
|
@ -1721,6 +1721,7 @@ typedef enum {
|
||||
H5_PKG_HG, /* Global heaps */
|
||||
H5_PKG_HL, /* Local heaps */
|
||||
H5_PKG_I, /* IDs */
|
||||
H5_PKG_M, /* Maps */
|
||||
H5_PKG_MF, /* File memory management */
|
||||
H5_PKG_MM, /* Core memory management */
|
||||
H5_PKG_O, /* Object headers */
|
||||
@ -2637,6 +2638,8 @@ H5_DLL int H5G_term_package(void);
|
||||
H5_DLL int H5G_top_term_package(void);
|
||||
H5_DLL int H5I_term_package(void);
|
||||
H5_DLL int H5L_term_package(void);
|
||||
H5_DLL int H5M_term_package(void);
|
||||
H5_DLL int H5M_top_term_package(void);
|
||||
H5_DLL int H5P_term_package(void);
|
||||
H5_DLL int H5PL_term_package(void);
|
||||
H5_DLL int H5R_term_package(void);
|
||||
|
@ -1359,6 +1359,10 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "%ld (attr)", (long)obj);
|
||||
break;
|
||||
|
||||
case H5I_MAP:
|
||||
HDfprintf(out, "%ld (map)", (long)obj);
|
||||
break;
|
||||
|
||||
case H5I_VFL:
|
||||
HDfprintf(out, "%ld (file driver)", (long)obj);
|
||||
break;
|
||||
@ -1544,6 +1548,10 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "H5I_ATTR");
|
||||
break;
|
||||
|
||||
case H5I_MAP:
|
||||
HDfprintf(out, "H5I_MAP");
|
||||
break;
|
||||
|
||||
case H5I_VFL:
|
||||
HDfprintf(out, "H5I_VFL");
|
||||
break;
|
||||
@ -1799,8 +1807,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "H5O_TYPE_NAMED_DATATYPE");
|
||||
break;
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
HDfprintf(out, "H5O_TYPE_MAP");
|
||||
break;
|
||||
|
||||
case H5O_TYPE_NTYPES:
|
||||
HDfprintf(out, "H5O_TYPE_TYPES");
|
||||
HDfprintf(out, "H5O_TYPE_NTYPES");
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -78,6 +78,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
|
||||
H5HG.c H5HGcache.c H5HGdbg.c H5HGquery.c \
|
||||
H5HL.c H5HLcache.c H5HLdbg.c H5HLint.c H5HLprfx.c H5HLdblk.c\
|
||||
H5HP.c H5I.c H5Itest.c H5L.c H5Lexternal.c H5lib_settings.c \
|
||||
H5M.c \
|
||||
H5MF.c H5MFaggr.c H5MFdbg.c H5MFsection.c \
|
||||
H5MM.c H5MP.c H5MPtest.c \
|
||||
H5O.c H5Odeprec.c H5Oainfo.c H5Oalloc.c H5Oattr.c \
|
||||
@ -95,8 +96,9 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
|
||||
H5P.c H5Pacpl.c H5Pdapl.c H5Pdcpl.c \
|
||||
H5Pdeprec.c H5Pdxpl.c H5Pencdec.c \
|
||||
H5Pfapl.c H5Pfcpl.c H5Pfmpl.c \
|
||||
H5Pgcpl.c H5Pint.c \
|
||||
H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c \
|
||||
H5Pgcpl.c H5Pint.c H5Plapl.c H5Plcpl.c \
|
||||
H5Pmapl.c H5Pmcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c \
|
||||
H5Ptest.c \
|
||||
H5PB.c \
|
||||
H5PL.c H5PLint.c H5PLpath.c H5PLplugin_cache.c \
|
||||
H5R.c H5Rint.c H5Rdeprec.c \
|
||||
@ -141,7 +143,7 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers
|
||||
H5FDfamily.h H5FDhdfs.h H5FDlog.h H5FDmpi.h H5FDmpio.h \
|
||||
H5FDmulti.h H5FDros3.h H5FDsec2.h H5FDstdio.h H5FDwindows.h \
|
||||
H5Gpublic.h H5Ipublic.h H5Lpublic.h \
|
||||
H5MMpublic.h H5Opublic.h H5Ppublic.h \
|
||||
H5Mpublic.h H5MMpublic.h H5Opublic.h H5Ppublic.h \
|
||||
H5PLextern.h H5PLpublic.h \
|
||||
H5Rpublic.h H5Spublic.h H5Tpublic.h \
|
||||
H5VLconnector.h H5VLconnector_passthru.h \
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "H5Gpublic.h" /* Groups */
|
||||
#include "H5Ipublic.h" /* ID management */
|
||||
#include "H5Lpublic.h" /* Links */
|
||||
#include "H5Mpublic.h" /* Maps */
|
||||
#include "H5MMpublic.h" /* Memory management */
|
||||
#include "H5Opublic.h" /* Object headers */
|
||||
#include "H5Ppublic.h" /* Property lists */
|
||||
|
@ -7108,6 +7108,9 @@ done:
|
||||
ret_value = -1;
|
||||
break;
|
||||
|
||||
case H5I_MAP:
|
||||
/* TODO: Not supported in native file format yet */
|
||||
|
||||
case H5I_UNINIT:
|
||||
case H5I_BADID:
|
||||
case H5I_FILE:
|
||||
@ -7197,6 +7200,9 @@ done:
|
||||
ret_value = -1;
|
||||
break;
|
||||
|
||||
case H5I_MAP:
|
||||
/* TODO: Not supported in native file format yet */
|
||||
|
||||
case H5I_UNINIT:
|
||||
case H5I_BADID:
|
||||
case H5I_FILE:
|
||||
|
@ -1080,6 +1080,9 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
|
||||
if(H5Tequal(obj1_id, obj2_id) != TRUE) TEST_ERROR
|
||||
break;
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
/* Maps not supported in native VOL connector */
|
||||
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
case H5O_TYPE_NTYPES:
|
||||
default:
|
||||
@ -1138,6 +1141,9 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
|
||||
if(H5Tequal(obj1_id, obj2_id) != TRUE) TEST_ERROR
|
||||
break;
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
/* Maps not supported in native VOL connector */
|
||||
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
case H5O_TYPE_NTYPES:
|
||||
default:
|
||||
@ -1454,10 +1460,13 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
|
||||
if(H5Tequal(oid, oid2) != TRUE) TEST_ERROR
|
||||
break;
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
HDassert(0 && "maps not supported in native VOL connector");
|
||||
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
case H5O_TYPE_NTYPES:
|
||||
default:
|
||||
HDassert(0 && "Unknown type of object");
|
||||
HDassert(0 && "Unknown type of object");
|
||||
break;
|
||||
} /* end switch */
|
||||
|
||||
|
@ -1434,6 +1434,9 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
|
||||
VERIFY(oid_list[i], did, "H5Fget_obj_ids");
|
||||
break;
|
||||
|
||||
case H5I_MAP:
|
||||
/* TODO: Not supported in native VOL connector yet */
|
||||
|
||||
case H5I_UNINIT:
|
||||
case H5I_BADID:
|
||||
case H5I_DATATYPE:
|
||||
|
@ -1140,6 +1140,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
|
||||
h5tools_str_append(str, H5_TOOLS_DATATYPE);
|
||||
break;
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
case H5O_TYPE_NTYPES:
|
||||
default:
|
||||
|
@ -763,6 +763,7 @@ find_objs_cb(const char *name, const H5O_info_t *oinfo, const char *already_seen
|
||||
} /* end if */
|
||||
break;
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
case H5O_TYPE_NTYPES:
|
||||
default:
|
||||
|
@ -914,6 +914,10 @@ trav_print_visit_obj(const char *path, const H5O_info_t *oinfo,
|
||||
printf(" %-10s %s", "datatype", path);
|
||||
break;
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
printf(" %-10s %s", "map", path);
|
||||
break;
|
||||
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
case H5O_TYPE_NTYPES:
|
||||
default:
|
||||
|
@ -393,6 +393,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
|
||||
}
|
||||
break;
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
case H5O_TYPE_NTYPES:
|
||||
default:
|
||||
@ -1404,6 +1405,7 @@ obj_search(const char *path, const H5O_info_t *oi, const char H5_ATTR_UNUSED *al
|
||||
handle_datatypes(handle_data->fid, path, NULL, 0, NULL);
|
||||
break;
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
case H5O_TYPE_NTYPES:
|
||||
default:
|
||||
@ -2143,6 +2145,7 @@ dump_extlink(hid_t group, const char *linkname, const char *objname)
|
||||
handle_datatypes(group, linkname, NULL, 0, objname);
|
||||
break;
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
case H5O_TYPE_NTYPES:
|
||||
default:
|
||||
|
@ -346,6 +346,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_
|
||||
}
|
||||
break;
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
case H5O_TYPE_NTYPES:
|
||||
default:
|
||||
|
@ -758,6 +758,7 @@ obj_stats(const char *path, const H5O_info_t *oi, const char *already_visited,
|
||||
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "datatype_stats failed");
|
||||
break;
|
||||
|
||||
case H5O_TYPE_MAP:
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
case H5O_TYPE_NTYPES:
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user