summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-04 21:51:30 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-04 21:51:30 (GMT)
commitd8d17d23284d29048da7af67c9653ffc2d0945c4 (patch)
tree916b9b1144be81df0b25a2ea712f8e6ac6e8e040 /src
parent30c7264c2ca0f169b099b6ebbf13c5bd71652ebc (diff)
downloadhdf5-d8d17d23284d29048da7af67c9653ffc2d0945c4.zip
hdf5-d8d17d23284d29048da7af67c9653ffc2d0945c4.tar.gz
hdf5-d8d17d23284d29048da7af67c9653ffc2d0945c4.tar.bz2
File changes to affect formatting
Diffstat (limited to 'src')
-rw-r--r--src/H5ACprivate.h126
-rw-r--r--src/H5C.c1970
-rw-r--r--src/H5Cpkg.h1826
-rw-r--r--src/H5Cprivate.h1844
-rw-r--r--src/H5Dint.c102
-rw-r--r--src/H5FDcore.c64
-rw-r--r--src/H5FDfamily.c548
-rw-r--r--src/H5FDmulti.c1168
-rw-r--r--src/H5FDprivate.h24
-rw-r--r--src/H5Fprivate.h8
-rw-r--r--src/H5Gpkg.h2
-rw-r--r--src/H5Gprivate.h4
-rw-r--r--src/H5Lprivate.h19
-rw-r--r--src/H5Lpublic.h16
-rw-r--r--src/H5MFpkg.h13
-rw-r--r--src/H5PLint.c18
-rw-r--r--src/H5PLplugin_cache.c14
-rw-r--r--src/H5Tconv.c3780
-rw-r--r--src/H5Tnative.c76
-rw-r--r--src/H5VMprivate.h88
-rw-r--r--src/H5detect.c66
-rw-r--r--src/H5public.h13
-rw-r--r--src/H5system.c38
23 files changed, 5941 insertions, 5886 deletions
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 84c6672..f59afd4 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -13,12 +13,12 @@
/*-------------------------------------------------------------------------
*
- * Created: H5ACprivate.h
- * Jul 9 1997
- * Robb Matzke
+ * Created: H5ACprivate.h
+ * Jul 9 1997
+ * Robb Matzke
*
- * Purpose: Constants and typedefs available to the rest of the
- * library.
+ * Purpose: Constants and typedefs available to the rest of the
+ * library.
*
*-------------------------------------------------------------------------
*/
@@ -26,14 +26,14 @@
#ifndef _H5ACprivate_H
#define _H5ACprivate_H
-#include "H5ACpublic.h" /*public prototypes */
+#include "H5ACpublic.h" /*public prototypes */
/* Pivate headers needed by this header */
-#include "H5private.h" /* Generic Functions */
-#include "H5Cprivate.h" /* Cache */
-#include "H5Fprivate.h" /* File access */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5SLprivate.h" /* Skip lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Cprivate.h" /* Cache */
+#include "H5Fprivate.h" /* File access */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5SLprivate.h" /* Skip lists */
/* Global metadata tag values */
#define H5AC__INVALID_TAG (haddr_t)0
@@ -75,7 +75,7 @@ typedef enum {
H5AC_DRVRINFO_ID, /* (26) driver info block (supplements superblock) */
H5AC_EPOCH_MARKER_ID, /* (27) epoch marker - always internal to cache */
H5AC_PROXY_ENTRY_ID, /* (28) cache entry proxy */
- H5AC_PREFETCHED_ENTRY_ID, /* (29) prefetched entry - always internal to cache */
+ H5AC_PREFETCHED_ENTRY_ID, /* (29) prefetched entry - always internal to cache */
H5AC_NTYPES /* Number of types, must be last */
} H5AC_type_t;
@@ -90,29 +90,29 @@ typedef enum {
*
* NOTE: test/cache plays games with the f->shared->cache, and thus
* setting H5AC_DUMP_STATS_ON_CLOSE will generate constant,
- * irrelevant data when run with that test program. See
- * comments on setup_cache() / takedown_cache() in test/cache_common.c.
+ * irrelevant data when run with that test program. See
+ * comments on setup_cache() / takedown_cache() in test/cache_common.c.
* for details.
*
- * If you need to dump stats at file close in test/cache.c,
- * use the dump_stats parameter to takedown_cache(), or call
- * H5C_stats() directly.
- * JRM -- 4/12/15
+ * If you need to dump stats at file close in test/cache.c,
+ * use the dump_stats parameter to takedown_cache(), or call
+ * H5C_stats() directly.
+ * JRM -- 4/12/15
*
* Added the H5AC_DUMP_IMAGE_STATS_ON_CLOSE #define, which works much
* the same way as H5AC_DUMP_STATS_ON_CLOSE. However, the set of stats
* displayed is much smaller, and directed purely at the cache image feature.
*
- * JRM -- 11/1/15
+ * JRM -- 11/1/15
*/
#if H5C_COLLECT_CACHE_STATS
-#define H5AC_DUMP_STATS_ON_CLOSE 0
+#define H5AC_DUMP_STATS_ON_CLOSE 0
#define H5AC_DUMP_IMAGE_STATS_ON_CLOSE 0
#else /* H5C_COLLECT_CACHE_STATS */
-#define H5AC_DUMP_STATS_ON_CLOSE 0
+#define H5AC_DUMP_STATS_ON_CLOSE 0
#define H5AC_DUMP_IMAGE_STATS_ON_CLOSE 0
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -121,8 +121,8 @@ typedef enum {
* At present, these are the same as those given in H5Cprivate.h.
*/
-#define H5AC__DEFAULT_MAX_CACHE_SIZE H5C__DEFAULT_MAX_CACHE_SIZE
-#define H5AC__DEFAULT_MIN_CLEAN_SIZE H5C__DEFAULT_MIN_CLEAN_SIZE
+#define H5AC__DEFAULT_MAX_CACHE_SIZE H5C__DEFAULT_MAX_CACHE_SIZE
+#define H5AC__DEFAULT_MIN_CLEAN_SIZE H5C__DEFAULT_MIN_CLEAN_SIZE
/* Check if we are sanity checking tagging */
#if H5C_DO_TAGGING_SANITY_CHECKS
@@ -132,18 +132,18 @@ typedef enum {
#endif
/*
- * Class methods pertaining to caching. Each type of cached object will
+ * Class methods pertaining to caching. Each type of cached object will
* have a constant variable with permanent life-span that describes how
* to cache the object.
*/
-#define H5AC__SERIALIZE_RESIZED_FLAG H5C__SERIALIZE_RESIZED_FLAG
-#define H5AC__SERIALIZE_MOVED_FLAG H5C__SERIALIZE_MOVED_FLAG
+#define H5AC__SERIALIZE_RESIZED_FLAG H5C__SERIALIZE_RESIZED_FLAG
+#define H5AC__SERIALIZE_MOVED_FLAG H5C__SERIALIZE_MOVED_FLAG
/* Cork actions: cork/uncork/get cork status of an object */
-#define H5AC__SET_CORK H5C__SET_CORK
-#define H5AC__UNCORK H5C__UNCORK
-#define H5AC__GET_CORKED H5C__GET_CORKED
+#define H5AC__SET_CORK H5C__SET_CORK
+#define H5AC__UNCORK H5C__UNCORK
+#define H5AC__GET_CORKED H5C__GET_CORKED
/* Aliases for the "ring" type and values */
typedef H5C_ring_t H5AC_ring_t;
@@ -159,7 +159,7 @@ typedef H5C_ring_t H5AC_ring_t;
typedef H5C_notify_action_t H5AC_notify_action_t;
#define H5AC_NOTIFY_ACTION_AFTER_INSERT H5C_NOTIFY_ACTION_AFTER_INSERT
#define H5AC_NOTIFY_ACTION_AFTER_LOAD H5C_NOTIFY_ACTION_AFTER_LOAD
-#define H5AC_NOTIFY_ACTION_AFTER_FLUSH H5C_NOTIFY_ACTION_AFTER_FLUSH
+#define H5AC_NOTIFY_ACTION_AFTER_FLUSH H5C_NOTIFY_ACTION_AFTER_FLUSH
#define H5AC_NOTIFY_ACTION_BEFORE_EVICT H5C_NOTIFY_ACTION_BEFORE_EVICT
#define H5AC_NOTIFY_ACTION_ENTRY_DIRTIED H5C_NOTIFY_ACTION_ENTRY_DIRTIED
#define H5AC_NOTIFY_ACTION_ENTRY_CLEANED H5C_NOTIFY_ACTION_ENTRY_CLEANED
@@ -168,36 +168,36 @@ typedef H5C_notify_action_t H5AC_notify_action_t;
#define H5AC_NOTIFY_ACTION_CHILD_UNSERIALIZED H5C_NOTIFY_ACTION_CHILD_UNSERIALIZED
#define H5AC_NOTIFY_ACTION_CHILD_SERIALIZED H5C_NOTIFY_ACTION_CHILD_SERIALIZED
-#define H5AC__CLASS_NO_FLAGS_SET H5C__CLASS_NO_FLAGS_SET
+#define H5AC__CLASS_NO_FLAGS_SET H5C__CLASS_NO_FLAGS_SET
#define H5AC__CLASS_SPECULATIVE_LOAD_FLAG H5C__CLASS_SPECULATIVE_LOAD_FLAG
/* The following flags should only appear in test code */
#define H5AC__CLASS_SKIP_READS H5C__CLASS_SKIP_READS
#define H5AC__CLASS_SKIP_WRITES H5C__CLASS_SKIP_WRITES
-typedef H5C_get_initial_load_size_func_t H5AC_get_initial_load_size_func_t;
-typedef H5C_get_final_load_size_func_t H5AC_get_final_load_size_func_t;
-typedef H5C_verify_chksum_func_t H5AC_verify_chksum_func_t;
-typedef H5C_deserialize_func_t H5AC_deserialize_func_t;
-typedef H5C_image_len_func_t H5AC_image_len_func_t;
+typedef H5C_get_initial_load_size_func_t H5AC_get_initial_load_size_func_t;
+typedef H5C_get_final_load_size_func_t H5AC_get_final_load_size_func_t;
+typedef H5C_verify_chksum_func_t H5AC_verify_chksum_func_t;
+typedef H5C_deserialize_func_t H5AC_deserialize_func_t;
+typedef H5C_image_len_func_t H5AC_image_len_func_t;
#define H5AC__SERIALIZE_NO_FLAGS_SET H5C__SERIALIZE_NO_FLAGS_SET
#define H5AC__SERIALIZE_RESIZED_FLAG H5C__SERIALIZE_RESIZED_FLAG
#define H5AC__SERIALIZE_MOVED_FLAG H5C__SERIALIZE_MOVED_FLAG
-typedef H5C_pre_serialize_func_t H5AC_pre_serialize_func_t;
-typedef H5C_serialize_func_t H5AC_serialize_func_t;
-typedef H5C_notify_func_t H5AC_notify_func_t;
-typedef H5C_free_icr_func_t H5AC_free_icr_func_t;
-typedef H5C_get_fsf_size_t H5AC_get_fsf_size_t;
+typedef H5C_pre_serialize_func_t H5AC_pre_serialize_func_t;
+typedef H5C_serialize_func_t H5AC_serialize_func_t;
+typedef H5C_notify_func_t H5AC_notify_func_t;
+typedef H5C_free_icr_func_t H5AC_free_icr_func_t;
+typedef H5C_get_fsf_size_t H5AC_get_fsf_size_t;
-typedef H5C_class_t H5AC_class_t;
+typedef H5C_class_t H5AC_class_t;
/* Cache entry info */
-typedef H5C_cache_entry_t H5AC_info_t;
+typedef H5C_cache_entry_t H5AC_info_t;
/* Typedef for metadata cache (defined in H5Cpkg.h) */
-typedef H5C_t H5AC_t;
+typedef H5C_t H5AC_t;
/* Metadata cache proxy entry type */
typedef struct H5AC_proxy_entry_t {
@@ -223,6 +223,7 @@ typedef struct H5AC_proxy_entry_t {
#define H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED
+/* clang-format off */
#ifdef H5_HAVE_PARALLEL
#define H5AC__DEFAULT_CACHE_CONFIG \
{ \
@@ -255,9 +256,9 @@ typedef struct H5AC_proxy_entry_t {
/* int epochs_before_eviction = */ 3, \
/* hbool_t apply_empty_reserve = */ TRUE, \
/* double empty_reserve = */ 0.1f, \
- /* size_t dirty_bytes_threshold = */ (256 * 1024), \
- /* int metadata_write_strategy = */ \
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
+ /* size_t dirty_bytes_threshold = */ (256 * 1024), \
+ /* int metadata_write_strategy = */ \
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
}
#else /* H5_HAVE_PARALLEL */
#define H5AC__DEFAULT_CACHE_CONFIG \
@@ -291,9 +292,9 @@ typedef struct H5AC_proxy_entry_t {
/* int epochs_before_eviction = */ 3, \
/* hbool_t apply_empty_reserve = */ TRUE, \
/* double empty_reserve = */ 0.1f, \
- /* size_t dirty_bytes_threshold = */ (256 * 1024), \
- /* int metadata_write_strategy = */ \
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
+ /* size_t dirty_bytes_threshold = */ (256 * 1024), \
+ /* int metadata_write_strategy = */ \
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
}
#endif /* H5_HAVE_PARALLEL */
@@ -304,6 +305,7 @@ typedef struct H5AC_proxy_entry_t {
/* hbool_t save_resize_status = */ FALSE, \
/* int32_t entry_ageout = */ H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE \
}
+/* clang-format on */
/*
* Library prototypes.
*/
@@ -313,21 +315,21 @@ typedef struct H5AC_proxy_entry_t {
* the equivalent flags from H5Cprivate.h.
*/
-#define H5AC__NO_FLAGS_SET H5C__NO_FLAGS_SET
-#define H5AC__SET_FLUSH_MARKER_FLAG H5C__SET_FLUSH_MARKER_FLAG
-#define H5AC__DELETED_FLAG H5C__DELETED_FLAG
-#define H5AC__DIRTIED_FLAG H5C__DIRTIED_FLAG
-#define H5AC__PIN_ENTRY_FLAG H5C__PIN_ENTRY_FLAG
-#define H5AC__UNPIN_ENTRY_FLAG H5C__UNPIN_ENTRY_FLAG
-#define H5AC__FLUSH_INVALIDATE_FLAG H5C__FLUSH_INVALIDATE_FLAG
-#define H5AC__FLUSH_CLEAR_ONLY_FLAG H5C__FLUSH_CLEAR_ONLY_FLAG
+#define H5AC__NO_FLAGS_SET H5C__NO_FLAGS_SET
+#define H5AC__SET_FLUSH_MARKER_FLAG H5C__SET_FLUSH_MARKER_FLAG
+#define H5AC__DELETED_FLAG H5C__DELETED_FLAG
+#define H5AC__DIRTIED_FLAG H5C__DIRTIED_FLAG
+#define H5AC__PIN_ENTRY_FLAG H5C__PIN_ENTRY_FLAG
+#define H5AC__UNPIN_ENTRY_FLAG H5C__UNPIN_ENTRY_FLAG
+#define H5AC__FLUSH_INVALIDATE_FLAG H5C__FLUSH_INVALIDATE_FLAG
+#define H5AC__FLUSH_CLEAR_ONLY_FLAG H5C__FLUSH_CLEAR_ONLY_FLAG
#define H5AC__FLUSH_MARKED_ENTRIES_FLAG H5C__FLUSH_MARKED_ENTRIES_FLAG
#define H5AC__FLUSH_IGNORE_PROTECTED_FLAG H5C__FLUSH_IGNORE_PROTECTED_FLAG
-#define H5AC__READ_ONLY_FLAG H5C__READ_ONLY_FLAG
-#define H5AC__FREE_FILE_SPACE_FLAG H5C__FREE_FILE_SPACE_FLAG
+#define H5AC__READ_ONLY_FLAG H5C__READ_ONLY_FLAG
+#define H5AC__FREE_FILE_SPACE_FLAG H5C__FREE_FILE_SPACE_FLAG
#define H5AC__TAKE_OWNERSHIP_FLAG H5C__TAKE_OWNERSHIP_FLAG
-#define H5AC__FLUSH_LAST_FLAG H5C__FLUSH_LAST_FLAG
-#define H5AC__FLUSH_COLLECTIVELY_FLAG H5C__FLUSH_COLLECTIVELY_FLAG
+#define H5AC__FLUSH_LAST_FLAG H5C__FLUSH_LAST_FLAG
+#define H5AC__FLUSH_COLLECTIVELY_FLAG H5C__FLUSH_COLLECTIVELY_FLAG
/* #defines of flags used to report entry status in the
diff --git a/src/H5C.c b/src/H5C.c
index 2cc417a..67bc629 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -19,52 +19,52 @@
*
* Purpose: Functions in this file implement a generic cache for
* things which exist on disk, and which may be
- * unambiguously referenced by their disk addresses.
+ * unambiguously referenced by their disk addresses.
*
* The code in this module was initially written in
- * support of a complete re-write of the metadata cache
- * in H5AC.c However, other uses for the cache code
- * suggested themselves, and thus this file was created
- * in an attempt to support re-use.
+ * support of a complete re-write of the metadata cache
+ * in H5AC.c However, other uses for the cache code
+ * suggested themselves, and thus this file was created
+ * in an attempt to support re-use.
*
- * For a detailed overview of the cache, please see the
- * header comment for H5C_t in H5Cpkg.h.
+ * For a detailed overview of the cache, please see the
+ * header comment for H5C_t in H5Cpkg.h.
*
*-------------------------------------------------------------------------
*/
/**************************************************************************
*
- * To Do:
+ * To Do:
*
- * Code Changes:
+ * Code Changes:
*
- * - Remove extra functionality in H5C__flush_single_entry()?
+ * - Remove extra functionality in H5C__flush_single_entry()?
*
- * - Change protect/unprotect to lock/unlock.
+ * - Change protect/unprotect to lock/unlock.
*
- * - Flush entries in increasing address order in
- * H5C__make_space_in_cache().
+ * - Flush entries in increasing address order in
+ * H5C__make_space_in_cache().
*
- * - Also in H5C__make_space_in_cache(), use high and low water marks
- * to reduce the number of I/O calls.
+ * - Also in H5C__make_space_in_cache(), use high and low water marks
+ * to reduce the number of I/O calls.
*
- * - When flushing, attempt to combine contiguous entries to reduce
- * I/O overhead. Can't do this just yet as some entries are not
- * contiguous. Do this in parallel only or in serial as well?
+ * - When flushing, attempt to combine contiguous entries to reduce
+ * I/O overhead. Can't do this just yet as some entries are not
+ * contiguous. Do this in parallel only or in serial as well?
*
- * - Create MPI type for dirty objects when flushing in parallel.
+ * - Create MPI type for dirty objects when flushing in parallel.
*
- * - Now that TBBT routines aren't used, fix nodes in memory to
+ * - Now that TBBT routines aren't used, fix nodes in memory to
* point directly to the skip list node from the LRU list, eliminating
* skip list lookups when evicting objects from the cache.
*
- * Tests:
+ * Tests:
*
- * - Trim execution time. (This is no longer a major issue with the
- * shift from the TBBT to a hash table for indexing.)
+ * - Trim execution time. (This is no longer a major issue with the
+ * shift from the TBBT to a hash table for indexing.)
*
- * - Add random tests.
+ * - Add random tests.
*
**************************************************************************/
@@ -73,21 +73,21 @@
/****************/
#include "H5Cmodule.h" /* This source code file is part of the H5C module */
-#define H5F_FRIEND /* suppress error about including H5Fpkg */
+#define H5F_FRIEND /* suppress error about including H5Fpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Cpkg.h" /* Cache */
+#include "H5private.h" /* Generic Functions */
+#include "H5Cpkg.h" /* Cache */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* Files */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* Files */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
@@ -215,21 +215,21 @@ H5FL_DEFINE_STATIC(H5C_t);
H5FL_SEQ_DEFINE_STATIC(H5C_cache_entry_ptr_t);
-
+
/*-------------------------------------------------------------------------
* Function: H5C_create
*
* Purpose: Allocate, initialize, and return the address of a new
- * instance of H5C_t.
+ * instance of H5C_t.
*
- * In general, the max_cache_size parameter must be positive,
- * and the min_clean_size parameter must lie in the closed
- * interval [0, max_cache_size].
+ * In general, the max_cache_size parameter must be positive,
+ * and the min_clean_size parameter must lie in the closed
+ * interval [0, max_cache_size].
*
- * The check_write_permitted parameter must either be NULL,
- * or point to a function of type H5C_write_permitted_func_t.
- * If it is NULL, the cache will use the write_permitted
- * flag to determine whether writes are permitted.
+ * The check_write_permitted parameter must either be NULL,
+ * or point to a function of type H5C_write_permitted_func_t.
+ * If it is NULL, the cache will use the write_permitted
+ * flag to determine whether writes are permitted.
*
* Return: Success: Pointer to the new instance.
*
@@ -305,24 +305,24 @@ H5FL_SEQ_DEFINE_STATIC(H5C_cache_entry_ptr_t);
*
* JRM -- 4/20/20
* Added initialization for the slist_enabled field. Recall
- * that the slist is used to flush metadata cache entries
- * in (roughly) increasing address order. While this is
+ * that the slist is used to flush metadata cache entries
+ * in (roughly) increasing address order. While this is
* needed at flush and close, it is not used elsewhere.
- * The slist_enabled field exists to allow us to construct
+ * The slist_enabled field exists to allow us to construct
* the slist when needed, and leave it empty otherwise -- thus
* avoiding the overhead of maintaining it.
- *
+ *
* JRM -- 4/29/20
- *
+ *
*-------------------------------------------------------------------------
*/
H5C_t *
-H5C_create(size_t max_cache_size,
- size_t min_clean_size,
- int max_type_id,
+H5C_create(size_t max_cache_size,
+ size_t min_clean_size,
+ int max_type_id,
const H5C_class_t * const * class_table_ptr,
H5C_write_permitted_func_t check_write_permitted,
- hbool_t write_permitted,
+ hbool_t write_permitted,
H5C_log_flush_func_t log_flush,
void * aux_ptr)
{
@@ -346,7 +346,7 @@ H5C_create(size_t max_cache_size,
} /* end for */
if(NULL == (cache_ptr = H5FL_CALLOC(H5C_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
if(NULL == (cache_ptr->slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, NULL, "can't create skip list")
@@ -358,34 +358,34 @@ H5C_create(size_t max_cache_size,
* the fields.
*/
- cache_ptr->magic = H5C__H5C_T_MAGIC;
+ cache_ptr->magic = H5C__H5C_T_MAGIC;
- cache_ptr->flush_in_progress = FALSE;
+ cache_ptr->flush_in_progress = FALSE;
if(NULL == (cache_ptr->log_info = (H5C_log_info_t *)H5MM_calloc(sizeof(H5C_log_info_t))))
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed")
- cache_ptr->aux_ptr = aux_ptr;
+ cache_ptr->aux_ptr = aux_ptr;
- cache_ptr->max_type_id = max_type_id;
+ cache_ptr->max_type_id = max_type_id;
- cache_ptr->class_table_ptr = class_table_ptr;
+ cache_ptr->class_table_ptr = class_table_ptr;
- cache_ptr->max_cache_size = max_cache_size;
- cache_ptr->min_clean_size = min_clean_size;
+ cache_ptr->max_cache_size = max_cache_size;
+ cache_ptr->min_clean_size = min_clean_size;
- cache_ptr->check_write_permitted = check_write_permitted;
- cache_ptr->write_permitted = write_permitted;
+ cache_ptr->check_write_permitted = check_write_permitted;
+ cache_ptr->write_permitted = write_permitted;
- cache_ptr->log_flush = log_flush;
+ cache_ptr->log_flush = log_flush;
- cache_ptr->evictions_enabled = TRUE;
- cache_ptr->close_warning_received = FALSE;
+ cache_ptr->evictions_enabled = TRUE;
+ cache_ptr->close_warning_received = FALSE;
- cache_ptr->index_len = 0;
- cache_ptr->index_size = (size_t)0;
- cache_ptr->clean_index_size = (size_t)0;
- cache_ptr->dirty_index_size = (size_t)0;
+ cache_ptr->index_len = 0;
+ cache_ptr->index_size = (size_t)0;
+ cache_ptr->clean_index_size = (size_t)0;
+ cache_ptr->dirty_index_size = (size_t)0;
for(i = 0; i < H5C_RING_NTYPES; i++) {
cache_ptr->index_ring_len[i] = 0;
@@ -415,98 +415,98 @@ H5C_create(size_t max_cache_size,
cache_ptr->slist_len = 0;
cache_ptr->slist_size = (size_t)0;
- /* slist_ring_len, slist_ring_size, and
+ /* slist_ring_len, slist_ring_size, and
* slist_ptr initializaed above.
*/
#if H5C_DO_SANITY_CHECKS
- cache_ptr->slist_len_increase = 0;
- cache_ptr->slist_size_increase = 0;
+ cache_ptr->slist_len_increase = 0;
+ cache_ptr->slist_size_increase = 0;
#endif /* H5C_DO_SANITY_CHECKS */
- cache_ptr->entries_removed_counter = 0;
- cache_ptr->last_entry_removed_ptr = NULL;
+ cache_ptr->entries_removed_counter = 0;
+ cache_ptr->last_entry_removed_ptr = NULL;
cache_ptr->entry_watched_for_removal = NULL;
- cache_ptr->pl_len = 0;
- cache_ptr->pl_size = (size_t)0;
- cache_ptr->pl_head_ptr = NULL;
- cache_ptr->pl_tail_ptr = NULL;
+ cache_ptr->pl_len = 0;
+ cache_ptr->pl_size = (size_t)0;
+ cache_ptr->pl_head_ptr = NULL;
+ cache_ptr->pl_tail_ptr = NULL;
- cache_ptr->pel_len = 0;
- cache_ptr->pel_size = (size_t)0;
- cache_ptr->pel_head_ptr = NULL;
- cache_ptr->pel_tail_ptr = NULL;
+ cache_ptr->pel_len = 0;
+ cache_ptr->pel_size = (size_t)0;
+ cache_ptr->pel_head_ptr = NULL;
+ cache_ptr->pel_tail_ptr = NULL;
- cache_ptr->LRU_list_len = 0;
- cache_ptr->LRU_list_size = (size_t)0;
- cache_ptr->LRU_head_ptr = NULL;
- cache_ptr->LRU_tail_ptr = NULL;
+ cache_ptr->LRU_list_len = 0;
+ cache_ptr->LRU_list_size = (size_t)0;
+ cache_ptr->LRU_head_ptr = NULL;
+ cache_ptr->LRU_tail_ptr = NULL;
#ifdef H5_HAVE_PARALLEL
- cache_ptr->coll_list_len = 0;
- cache_ptr->coll_list_size = (size_t)0;
- cache_ptr->coll_head_ptr = NULL;
- cache_ptr->coll_tail_ptr = NULL;
- cache_ptr->coll_write_list = NULL;
+ cache_ptr->coll_list_len = 0;
+ cache_ptr->coll_list_size = (size_t)0;
+ cache_ptr->coll_head_ptr = NULL;
+ cache_ptr->coll_tail_ptr = NULL;
+ cache_ptr->coll_write_list = NULL;
#endif /* H5_HAVE_PARALLEL */
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- cache_ptr->cLRU_list_len = 0;
- cache_ptr->cLRU_list_size = (size_t)0;
- cache_ptr->cLRU_head_ptr = NULL;
- cache_ptr->cLRU_tail_ptr = NULL;
-
- cache_ptr->dLRU_list_len = 0;
- cache_ptr->dLRU_list_size = (size_t)0;
- cache_ptr->dLRU_head_ptr = NULL;
- cache_ptr->dLRU_tail_ptr = NULL;
+ cache_ptr->cLRU_list_len = 0;
+ cache_ptr->cLRU_list_size = (size_t)0;
+ cache_ptr->cLRU_head_ptr = NULL;
+ cache_ptr->cLRU_tail_ptr = NULL;
+
+ cache_ptr->dLRU_list_len = 0;
+ cache_ptr->dLRU_list_size = (size_t)0;
+ cache_ptr->dLRU_head_ptr = NULL;
+ cache_ptr->dLRU_tail_ptr = NULL;
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
- cache_ptr->size_increase_possible = FALSE;
+ cache_ptr->size_increase_possible = FALSE;
cache_ptr->flash_size_increase_possible = FALSE;
cache_ptr->flash_size_increase_threshold = 0;
- cache_ptr->size_decrease_possible = FALSE;
- cache_ptr->resize_enabled = FALSE;
- cache_ptr->cache_full = FALSE;
- cache_ptr->size_decreased = FALSE;
- cache_ptr->resize_in_progress = FALSE;
- cache_ptr->msic_in_progress = FALSE;
-
- (cache_ptr->resize_ctl).version = H5C__CURR_AUTO_SIZE_CTL_VER;
- (cache_ptr->resize_ctl).rpt_fcn = NULL;
- (cache_ptr->resize_ctl).set_initial_size = FALSE;
- (cache_ptr->resize_ctl).initial_size = H5C__DEF_AR_INIT_SIZE;
- (cache_ptr->resize_ctl).min_clean_fraction = H5C__DEF_AR_MIN_CLEAN_FRAC;
- (cache_ptr->resize_ctl).max_size = H5C__DEF_AR_MAX_SIZE;
- (cache_ptr->resize_ctl).min_size = H5C__DEF_AR_MIN_SIZE;
- (cache_ptr->resize_ctl).epoch_length = H5C__DEF_AR_EPOCH_LENGTH;
-
- (cache_ptr->resize_ctl).incr_mode = H5C_incr__off;
- (cache_ptr->resize_ctl).lower_hr_threshold = H5C__DEF_AR_LOWER_THRESHHOLD;
- (cache_ptr->resize_ctl).increment = H5C__DEF_AR_INCREMENT;
- (cache_ptr->resize_ctl).apply_max_increment = TRUE;
- (cache_ptr->resize_ctl).max_increment = H5C__DEF_AR_MAX_INCREMENT;
+ cache_ptr->size_decrease_possible = FALSE;
+ cache_ptr->resize_enabled = FALSE;
+ cache_ptr->cache_full = FALSE;
+ cache_ptr->size_decreased = FALSE;
+ cache_ptr->resize_in_progress = FALSE;
+ cache_ptr->msic_in_progress = FALSE;
+
+ (cache_ptr->resize_ctl).version = H5C__CURR_AUTO_SIZE_CTL_VER;
+ (cache_ptr->resize_ctl).rpt_fcn = NULL;
+ (cache_ptr->resize_ctl).set_initial_size = FALSE;
+ (cache_ptr->resize_ctl).initial_size = H5C__DEF_AR_INIT_SIZE;
+ (cache_ptr->resize_ctl).min_clean_fraction = H5C__DEF_AR_MIN_CLEAN_FRAC;
+ (cache_ptr->resize_ctl).max_size = H5C__DEF_AR_MAX_SIZE;
+ (cache_ptr->resize_ctl).min_size = H5C__DEF_AR_MIN_SIZE;
+ (cache_ptr->resize_ctl).epoch_length = H5C__DEF_AR_EPOCH_LENGTH;
+
+ (cache_ptr->resize_ctl).incr_mode = H5C_incr__off;
+ (cache_ptr->resize_ctl).lower_hr_threshold = H5C__DEF_AR_LOWER_THRESHHOLD;
+ (cache_ptr->resize_ctl).increment = H5C__DEF_AR_INCREMENT;
+ (cache_ptr->resize_ctl).apply_max_increment = TRUE;
+ (cache_ptr->resize_ctl).max_increment = H5C__DEF_AR_MAX_INCREMENT;
(cache_ptr->resize_ctl).flash_incr_mode = H5C_flash_incr__off;
(cache_ptr->resize_ctl).flash_multiple = (double)1.0f;
(cache_ptr->resize_ctl).flash_threshold = (double)0.25f;
- (cache_ptr->resize_ctl).decr_mode = H5C_decr__off;
- (cache_ptr->resize_ctl).upper_hr_threshold = (double)H5C__DEF_AR_UPPER_THRESHHOLD;
- (cache_ptr->resize_ctl).decrement = (double)H5C__DEF_AR_DECREMENT;
- (cache_ptr->resize_ctl).apply_max_decrement = TRUE;
- (cache_ptr->resize_ctl).max_decrement = H5C__DEF_AR_MAX_DECREMENT;
+ (cache_ptr->resize_ctl).decr_mode = H5C_decr__off;
+ (cache_ptr->resize_ctl).upper_hr_threshold = (double)H5C__DEF_AR_UPPER_THRESHHOLD;
+ (cache_ptr->resize_ctl).decrement = (double)H5C__DEF_AR_DECREMENT;
+ (cache_ptr->resize_ctl).apply_max_decrement = TRUE;
+ (cache_ptr->resize_ctl).max_decrement = H5C__DEF_AR_MAX_DECREMENT;
(cache_ptr->resize_ctl).epochs_before_eviction = H5C__DEF_AR_EPCHS_B4_EVICT;
(cache_ptr->resize_ctl).apply_empty_reserve = TRUE;
- (cache_ptr->resize_ctl).empty_reserve = (double)H5C__DEF_AR_EMPTY_RESERVE;
+ (cache_ptr->resize_ctl).empty_reserve = (double)H5C__DEF_AR_EMPTY_RESERVE;
- cache_ptr->epoch_markers_active = 0;
+ cache_ptr->epoch_markers_active = 0;
/* no need to initialize the ring buffer itself */
- cache_ptr->epoch_marker_ringbuf_first = 1;
- cache_ptr->epoch_marker_ringbuf_last = 0;
- cache_ptr->epoch_marker_ringbuf_size = 0;
+ cache_ptr->epoch_marker_ringbuf_first = 1;
+ cache_ptr->epoch_marker_ringbuf_last = 0;
+ cache_ptr->epoch_marker_ringbuf_size = 0;
/* Initialize all epoch marker entries' fields to zero/FALSE/NULL */
HDmemset(cache_ptr->epoch_markers, 0, sizeof(cache_ptr->epoch_markers));
@@ -514,10 +514,10 @@ H5C_create(size_t max_cache_size,
/* Set non-zero/FALSE/NULL fields for epoch markers */
for ( i = 0; i < H5C__MAX_EPOCH_MARKERS; i++ )
{
- ((cache_ptr->epoch_markers)[i]).magic =
- H5C__H5C_CACHE_ENTRY_T_MAGIC;
- ((cache_ptr->epoch_markers)[i]).addr = (haddr_t)i;
- ((cache_ptr->epoch_markers)[i]).type = H5AC_EPOCH_MARKER;
+ ((cache_ptr->epoch_markers)[i]).magic =
+ H5C__H5C_CACHE_ENTRY_T_MAGIC;
+ ((cache_ptr->epoch_markers)[i]).addr = (haddr_t)i;
+ ((cache_ptr->epoch_markers)[i]).type = H5AC_EPOCH_MARKER;
}
/* Initialize cache image generation on file close related fields.
@@ -531,25 +531,25 @@ H5C_create(size_t max_cache_size,
cache_ptr->image_ctl.flags = H5C_CI__ALL_FLAGS;
cache_ptr->serialization_in_progress= FALSE;
- cache_ptr->load_image = FALSE;
+ cache_ptr->load_image = FALSE;
cache_ptr->image_loaded = FALSE;
- cache_ptr->delete_image = FALSE;
- cache_ptr->image_addr = HADDR_UNDEF;
- cache_ptr->image_len = 0;
- cache_ptr->image_data_len = 0;
+ cache_ptr->delete_image = FALSE;
+ cache_ptr->image_addr = HADDR_UNDEF;
+ cache_ptr->image_len = 0;
+ cache_ptr->image_data_len = 0;
- cache_ptr->entries_loaded_counter = 0;
- cache_ptr->entries_inserted_counter = 0;
- cache_ptr->entries_relocated_counter = 0;
- cache_ptr->entry_fd_height_change_counter = 0;
+ cache_ptr->entries_loaded_counter = 0;
+ cache_ptr->entries_inserted_counter = 0;
+ cache_ptr->entries_relocated_counter = 0;
+ cache_ptr->entry_fd_height_change_counter = 0;
- cache_ptr->num_entries_in_image = 0;
- cache_ptr->image_entries = NULL;
- cache_ptr->image_buffer = NULL;
+ cache_ptr->num_entries_in_image = 0;
+ cache_ptr->image_entries = NULL;
+ cache_ptr->image_buffer = NULL;
/* initialize free space manager related fields: */
- cache_ptr->rdfsm_settled = FALSE;
- cache_ptr->mdfsm_settled = FALSE;
+ cache_ptr->rdfsm_settled = FALSE;
+ cache_ptr->mdfsm_settled = FALSE;
if(H5C_reset_cache_hit_rate_stats(cache_ptr) < 0)
/* this should be impossible... */
@@ -557,7 +557,7 @@ H5C_create(size_t max_cache_size,
H5C_stats__reset(cache_ptr);
- cache_ptr->prefix[0] = '\0'; /* empty string */
+ cache_ptr->prefix[0] = '\0'; /* empty string */
#ifndef NDEBUG
cache_ptr->get_entry_ptr_from_addr_counter = 0;
@@ -586,19 +586,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_create() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_def_auto_resize_rpt_fcn
*
* Purpose: Print results of a automatic cache resize.
*
- * This function should only be used where HDprintf() behaves
- * well -- i.e. not on Windows.
+ * This function should only be used where HDprintf() behaves
+ * well -- i.e. not on Windows.
*
* Return: void
*
* Programmer: John Mainzer
- * 10/27/04
+ * 10/27/04
*
*-------------------------------------------------------------------------
*/
@@ -638,7 +638,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
(cache_ptr->resize_ctl).lower_hr_threshold);
HDfprintf(stdout,
- "%s cache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n",
+ "%scache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n",
cache_ptr->prefix,
old_max_cache_size,
old_min_clean_size,
@@ -712,7 +712,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
}
HDfprintf(stdout,
- "%s cache size decreased from (%Zu/%Zu) to (%Zu/%Zu).\n",
+ "%s cache size decreased from (%Zu/%Zu) to (%Zu/%Zu).\n",
cache_ptr->prefix,
old_max_cache_size,
old_min_clean_size,
@@ -726,7 +726,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
cache_ptr->prefix, hit_rate,
(cache_ptr->resize_ctl).lower_hr_threshold);
HDfprintf(stdout,
- "%s cache already at maximum size so no change.\n",
+ "%s cache already at maximum size so no change.\n",
cache_ptr->prefix);
break;
@@ -734,7 +734,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
HDfprintf(stdout,
"%sAuto cache resize -- hit rate (%lf) -- can't decrease.\n",
cache_ptr->prefix, hit_rate);
- HDfprintf(stdout, "%s cache already at minimum size.\n",
+ HDfprintf(stdout, "%s cache already at minimum size.\n",
cache_ptr->prefix);
break;
@@ -758,7 +758,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
cache_ptr->prefix, hit_rate,
(cache_ptr->resize_ctl).lower_hr_threshold);
HDfprintf(stdout,
- "%s cache not full so no increase in size.\n",
+ "%s cache not full so no increase in size.\n",
cache_ptr->prefix);
break;
@@ -772,7 +772,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
} /* H5C_def_auto_resize_rpt_fcn() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__free_tag_list_cb
*
@@ -781,7 +781,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
* Return: Non-negative on success/Negative on failure
*
* Programmer: Vailin Choi
- * January 2014
+ * January 2014
*
*-------------------------------------------------------------------------
*/
@@ -800,14 +800,14 @@ H5C__free_tag_list_cb(void *_item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED
FUNC_LEAVE_NOAPI(0)
} /* H5C__free_tag_list_cb() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_prep_for_file_close
*
* Purpose: This function should be called just prior to the cache
- * flushes at file close. There should be no protected
- * entries in the cache at this point.
+ * flushes at file close. There should be no protected
+ * entries in the cache at this point.
*
* Return: Non-negative on success/Negative on failure
*
@@ -821,7 +821,7 @@ H5C_prep_for_file_close(H5F_t *f)
{
H5C_t * cache_ptr;
hbool_t image_generated = FALSE; /* Whether a cache image was generated */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -895,7 +895,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_prep_for_file_close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_dest
*
@@ -904,24 +904,24 @@ done:
* This function fails if any object are protected since the
* resulting file might not be consistent.
*
- * Note that *cache_ptr has been freed upon successful return.
+ * Note that *cache_ptr has been freed upon successful return.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: John Mainzer
- * 6/2/04
+ * 6/2/04
*
* Modifications:
*
* JRM -- 5/15/20
*
- * Updated the function to enable the slist prior to the
- * call to H5C__flush_invalidate_cache().
+ * Updated the function to enable the slist prior to the
+ * call to H5C__flush_invalidate_cache().
*
* Arguably, it shouldn't be necessary to re-enable the
- * slist after the call to H5C__flush_invalidate_cache(), as
+ * slist after the call to H5C__flush_invalidate_cache(), as
* the metadata cache should be discarded. However, in the
- * test code, we make multiple calls to H5C_dest(). Thus
+ * test code, we make multiple calls to H5C_dest(). Thus
* we re-enable the slist on failure if it and the cache
* still exist.
*
@@ -964,7 +964,7 @@ H5C_dest(H5F_t * f)
"Can't generate metadata cache image")
}
- /* Question: Is it possible for cache_ptr->slist be non-null at this
+ /* Question: Is it possible for cache_ptr->slist be non-null at this
* point? If no, shouldn't this if statement be an assert?
*/
if ( cache_ptr->slist_ptr != NULL ) {
@@ -996,7 +996,7 @@ H5C_dest(H5F_t * f)
if ( cache_ptr->get_entry_ptr_from_addr_counter > 0 ) {
- HDfprintf(stdout,
+ HDfprintf(stdout,
"*** %ld calls to H5C_get_entry_ptr_from_add(). ***\n",
cache_ptr->get_entry_ptr_from_addr_counter);
}
@@ -1023,7 +1023,7 @@ done:
} /* H5C_dest() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_evict
*
@@ -1032,15 +1032,15 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Vailin Choi
- * Dec 2013
+ * Dec 2013
*
* Modifications:
*
* JRM -- 5/5/20
*
* Added code to enable the skip list prior to the call
- * to H5C__flush_invalidate_cache(), and disable it
- * afterwards.
+ * to H5C__flush_invalidate_cache(), and disable it
+ * afterwards.
*
*-------------------------------------------------------------------------
*/
@@ -1062,7 +1062,7 @@ H5C_evict(H5F_t * f)
/* Flush and invalidate all cache entries except the pinned entries */
if ( H5C__flush_invalidate_cache(f, H5C__EVICT_ALLOW_LAST_PINS_FLAG) < 0 )
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL,
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL,
"unable to evict entries in the cache")
/* Disable the slist,
@@ -1075,13 +1075,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_evict() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_expunge_entry
*
* Purpose: Use this function to tell the cache to expunge an entry
- * from the cache without writing it to disk even if it is
- * dirty. The entry may not be either pinned or protected.
+ * from the cache without writing it to disk even if it is
+ * dirty. The entry may not be either pinned or protected.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1093,10 +1093,10 @@ done:
herr_t
H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flags)
{
- H5C_t * cache_ptr;
- H5C_cache_entry_t * entry_ptr = NULL;
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t * entry_ptr = NULL;
unsigned flush_flags = (H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG);
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1151,51 +1151,51 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_expunge_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_flush_cache
*
- * Purpose: Flush (and possibly destroy) the entries contained in the
- * specified cache.
+ * Purpose: Flush (and possibly destroy) the entries contained in the
+ * specified cache.
*
- * If the cache contains protected entries, the function will
- * fail, as protected entries cannot be flushed. However
- * all unprotected entries should be flushed before the
- * function returns failure.
+ * If the cache contains protected entries, the function will
+ * fail, as protected entries cannot be flushed. However
+ * all unprotected entries should be flushed before the
+ * function returns failure.
*
* Return: Non-negative on success/Negative on failure or if there was
- * a request to flush all items and something was protected.
+ * a request to flush all items and something was protected.
*
* Programmer: John Mainzer
- * 6/2/04
+ * 6/2/04
*
- * Changes: Modified function to test for slist chamges in
- * pre_serialize and serialize callbacks, and re-start
- * scans through the slist when such changes occur.
+ * Changes: Modified function to test for slist chamges in
+ * pre_serialize and serialize callbacks, and re-start
+ * scans through the slist when such changes occur.
*
- * This has been a potential problem for some time,
- * and there has been code in this function to deal
- * with elements of this issue. However the shift
- * to the V3 cache in combination with the activities
- * of some of the cache clients (in particular the
- * free space manager and the fractal heap) have
- * made this re-work necessary.
+ * This has been a potential problem for some time,
+ * and there has been code in this function to deal
+ * with elements of this issue. However the shift
+ * to the V3 cache in combination with the activities
+ * of some of the cache clients (in particular the
+ * free space manager and the fractal heap) have
+ * made this re-work necessary.
*
- * JRM -- 12/13/14
+ * JRM -- 12/13/14
*
- * Modified function to support rings. Basic idea is that
- * every entry in the cache is assigned to a ring. Entries
- * in the outermost ring are flushed first, followed by
- * those in the next outermost ring, and so on until the
- * innermost ring is flushed. See header comment on
- * H5C_ring_t in H5Cprivate.h for a more detailed
- * discussion.
+ * Modified function to support rings. Basic idea is that
+ * every entry in the cache is assigned to a ring. Entries
+ * in the outermost ring are flushed first, followed by
+ * those in the next outermost ring, and so on until the
+ * innermost ring is flushed. See header comment on
+ * H5C_ring_t in H5Cprivate.h for a more detailed
+ * discussion.
*
- * JRM -- 8/30/15
+ * JRM -- 8/30/15
*
- * Modified function to call the free space manager
- * settling functions.
- * JRM -- 6/9/16
+ * Modified function to call the free space manager
+ * settling functions.
+ * JRM -- 6/9/16
*
*-------------------------------------------------------------------------
*/
@@ -1203,18 +1203,18 @@ herr_t
H5C_flush_cache(H5F_t *f, unsigned flags)
{
#if H5C_DO_SANITY_CHECKS
- int i;
- uint32_t index_len = 0;
- size_t index_size = (size_t)0;
- size_t clean_index_size = (size_t)0;
- size_t dirty_index_size = (size_t)0;
- size_t slist_size = (size_t)0;
- uint32_t slist_len = 0;
+ int i;
+ uint32_t index_len = 0;
+ size_t index_size = (size_t)0;
+ size_t clean_index_size = (size_t)0;
+ size_t dirty_index_size = (size_t)0;
+ size_t slist_size = (size_t)0;
+ uint32_t slist_len = 0;
#endif /* H5C_DO_SANITY_CHECKS */
- H5C_ring_t ring;
+ H5C_ring_t ring;
H5C_t * cache_ptr;
hbool_t destroy;
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -1239,7 +1239,7 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
clean_index_size += cache_ptr->clean_index_ring_size[i];
dirty_index_size += cache_ptr->dirty_index_ring_size[i];
- slist_len += cache_ptr->slist_ring_len[i];
+ slist_len += cache_ptr->slist_ring_len[i];
slist_size += cache_ptr->slist_ring_size[i];
} /* end for */
@@ -1269,45 +1269,45 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush invalidate failed")
} /* end if */
else {
- /* flush each ring, starting from the outermost ring and
+ /* flush each ring, starting from the outermost ring and
* working inward.
*/
ring = H5C_RING_USER;
- while(ring < H5C_RING_NTYPES) {
+ while(ring < H5C_RING_NTYPES) {
/* Only call the free space manager settle routines when close
* warning has been received.
*/
- if(cache_ptr->close_warning_received) {
- switch(ring) {
- case H5C_RING_USER:
- break;
+ if(cache_ptr->close_warning_received) {
+ switch(ring) {
+ case H5C_RING_USER:
+ break;
- case H5C_RING_RDFSM:
+ case H5C_RING_RDFSM:
/* Settle raw data FSM */
- if(!cache_ptr->rdfsm_settled)
- if(H5MF_settle_raw_data_fsm(f, &cache_ptr->rdfsm_settled) < 0)
+ if(!cache_ptr->rdfsm_settled)
+ if(H5MF_settle_raw_data_fsm(f, &cache_ptr->rdfsm_settled) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "RD FSM settle failed")
- break;
+ break;
- case H5C_RING_MDFSM:
+ case H5C_RING_MDFSM:
/* Settle metadata FSM */
- if(!cache_ptr->mdfsm_settled)
- if(H5MF_settle_meta_data_fsm(f, &cache_ptr->mdfsm_settled) < 0)
+ if(!cache_ptr->mdfsm_settled)
+ if(H5MF_settle_meta_data_fsm(f, &cache_ptr->mdfsm_settled) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "MD FSM settle failed")
- break;
+ break;
- case H5C_RING_SBE:
- case H5C_RING_SB:
- break;
+ case H5C_RING_SBE:
+ case H5C_RING_SB:
+ break;
- default:
+ default:
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown ring?!?!")
- break;
- } /* end switch */
+ break;
+ } /* end switch */
} /* end if */
- if(H5C__flush_ring(f, ring, flags) < 0)
+ if(H5C__flush_ring(f, ring, flags) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush ring failed")
ring++;
} /* end while */
@@ -1319,28 +1319,28 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_flush_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_flush_to_min_clean
*
- * Purpose: Flush dirty entries until the caches min clean size is
- * attained.
+ * Purpose: Flush dirty entries until the caches min clean size is
+ * attained.
*
- * This function is used in the implementation of the
- * metadata cache in PHDF5. To avoid "messages from the
- * future", the cache on process 0 can't be allowed to
- * flush entries until the other processes have reached
- * the same point in the calculation. If this constraint
- * is not met, it is possible that the other processes will
- * read metadata generated at a future point in the
- * computation.
+ * This function is used in the implementation of the
+ * metadata cache in PHDF5. To avoid "messages from the
+ * future", the cache on process 0 can't be allowed to
+ * flush entries until the other processes have reached
+ * the same point in the calculation. If this constraint
+ * is not met, it is possible that the other processes will
+ * read metadata generated at a future point in the
+ * computation.
*
*
* Return: Non-negative on success/Negative on failure or if
- * write is not permitted.
+ * write is not permitted.
*
* Programmer: John Mainzer
- * 9/16/05
+ * 9/16/05
*
*-------------------------------------------------------------------------
*/
@@ -1348,8 +1348,8 @@ herr_t
H5C_flush_to_min_clean(H5F_t * f)
{
H5C_t * cache_ptr;
- hbool_t write_permitted;
- herr_t ret_value = SUCCEED;
+ hbool_t write_permitted;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -1378,7 +1378,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_flush_to_min_clean() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_insert_entry
*
@@ -1386,36 +1386,36 @@ done:
* exist on disk yet, but it must have an address and disk
* space reserved.
*
- * Observe that this function cannot occasion a read.
+ * Observe that this function cannot occasion a read.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: John Mainzer
- * 6/2/04
+ * 6/2/04
*
*-------------------------------------------------------------------------
*/
herr_t
H5C_insert_entry(H5F_t * f,
const H5C_class_t * type,
- haddr_t addr,
- void * thing,
+ haddr_t addr,
+ void * thing,
unsigned int flags)
{
H5C_t *cache_ptr;
H5AC_ring_t ring = H5C_RING_UNDEFINED;
- hbool_t insert_pinned;
+ hbool_t insert_pinned;
hbool_t flush_last;
#ifdef H5_HAVE_PARALLEL
hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */
#endif /* H5_HAVE_PARALLEL */
hbool_t set_flush_marker;
- hbool_t write_permitted = TRUE;
- size_t empty_space;
+ hbool_t write_permitted = TRUE;
+ size_t empty_space;
H5C_cache_entry_t *entry_ptr = NULL;
H5C_cache_entry_t *test_entry_ptr;
- hbool_t entry_tagged = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t entry_tagged = FALSE;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1530,20 +1530,20 @@ H5C_insert_entry(H5F_t * f,
#endif /* H5_HAVE_PARALLEL */
/* initialize cache image related fields */
- entry_ptr->include_in_image = FALSE;
- entry_ptr->lru_rank = 0;
- entry_ptr->image_dirty = FALSE;
- entry_ptr->fd_parent_count = 0;
- entry_ptr->fd_parent_addrs = NULL;
- entry_ptr->fd_child_count = 0;
- entry_ptr->fd_dirty_child_count = 0;
- entry_ptr->image_fd_height = 0;
- entry_ptr->prefetched = FALSE;
- entry_ptr->prefetch_type_id = 0;
- entry_ptr->age = 0;
+ entry_ptr->include_in_image = FALSE;
+ entry_ptr->lru_rank = 0;
+ entry_ptr->image_dirty = FALSE;
+ entry_ptr->fd_parent_count = 0;
+ entry_ptr->fd_parent_addrs = NULL;
+ entry_ptr->fd_child_count = 0;
+ entry_ptr->fd_dirty_child_count = 0;
+ entry_ptr->image_fd_height = 0;
+ entry_ptr->prefetched = FALSE;
+ entry_ptr->prefetch_type_id = 0;
+ entry_ptr->age = 0;
entry_ptr->prefetched_dirty = FALSE;
#ifndef NDEBUG /* debugging field */
- entry_ptr->serialization_count = 0;
+ entry_ptr->serialization_count = 0;
#endif /* NDEBUG */
entry_ptr->tl_next = NULL;
@@ -1569,11 +1569,11 @@ H5C_insert_entry(H5F_t * f,
if(cache_ptr->evictions_enabled &&
(((cache_ptr->index_size + entry_ptr->size) > cache_ptr->max_cache_size)
- ||
- (((empty_space + cache_ptr->clean_index_size) < cache_ptr->min_clean_size)))) {
+ ||
+ (((empty_space + cache_ptr->clean_index_size) < cache_ptr->min_clean_size)))) {
size_t space_needed;
- if(empty_space <= entry_ptr->size)
+ if(empty_space <= entry_ptr->size)
cache_ptr->cache_full = TRUE;
if(cache_ptr->check_write_permitted != NULL) {
@@ -1671,31 +1671,31 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_insert_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_mark_entry_dirty
*
- * Purpose: Mark a pinned or protected entry as dirty. The target entry
- * MUST be either pinned or protected, and MAY be both.
+ * Purpose: Mark a pinned or protected entry as dirty. The target entry
+ * MUST be either pinned or protected, and MAY be both.
*
- * In the protected case, this call is the functional
- * equivalent of setting the H5C__DIRTIED_FLAG on an unprotect
- * call.
+ * In the protected case, this call is the functional
+ * equivalent of setting the H5C__DIRTIED_FLAG on an unprotect
+ * call.
*
- * In the pinned but not protected case, if the entry is not
- * already dirty, the function places function marks the entry
- * dirty and places it on the skip list.
+ * In the pinned but not protected case, if the entry is not
+ * already dirty, the function places function marks the entry
+ * dirty and places it on the skip list.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: John Mainzer
* 5/15/06
*
- * JRM -- 11/5/08
- * Added call to H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY() to
- * update the new clean_index_size and dirty_index_size
- * fields of H5C_t in the case that the entry was clean
- * prior to this call, and is pinned and not protected.
+ * JRM -- 11/5/08
+ * Added call to H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY() to
+ * update the new clean_index_size and dirty_index_size
+ * fields of H5C_t in the case that the entry was clean
+ * prior to this call, and is pinned and not protected.
*
*-------------------------------------------------------------------------
*/
@@ -1716,7 +1716,7 @@ H5C_mark_entry_dirty(void *thing)
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if ( entry_ptr->is_protected ) {
- HDassert( ! ((entry_ptr)->is_read_only) );
+ HDassert( ! ((entry_ptr)->is_read_only) );
/* set the dirtied flag */
entry_ptr->dirtied = TRUE;
@@ -1731,18 +1731,18 @@ H5C_mark_entry_dirty(void *thing)
}/* end if */
} /* end if */
else if ( entry_ptr->is_pinned ) {
- hbool_t was_clean; /* Whether the entry was previously clean */
- hbool_t image_was_up_to_date;
+ hbool_t was_clean; /* Whether the entry was previously clean */
+ hbool_t image_was_up_to_date;
/* Remember previous dirty status */
- was_clean = !entry_ptr->is_dirty;
+ was_clean = !entry_ptr->is_dirty;
/* Check if image is up to date */
image_was_up_to_date = entry_ptr->image_up_to_date;
/* Mark the entry as dirty if it isn't already */
entry_ptr->is_dirty = TRUE;
- entry_ptr->image_up_to_date = FALSE;
+ entry_ptr->image_up_to_date = FALSE;
/* Modify cache data structures */
if(was_clean)
@@ -1779,15 +1779,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_mark_entry_dirty() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_mark_entry_clean
*
- * Purpose: Mark a pinned entry as clean. The target entry MUST be pinned.
+ * Purpose: Mark a pinned entry as clean. The target entry MUST be pinned.
*
- * If the entry is not
- * already clean, the function places function marks the entry
- * clean and removes it from the skip list.
+ * If the entry is not
+ * already clean, the function places function marks the entry
+ * clean and removes it from the skip list.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1816,7 +1816,7 @@ H5C_mark_entry_clean(void *_thing)
if(entry_ptr->is_protected)
HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "entry is protected")
else if(entry_ptr->is_pinned) {
- hbool_t was_dirty; /* Whether the entry was previously dirty */
+ hbool_t was_dirty; /* Whether the entry was previously dirty */
/* Remember previous dirty status */
was_dirty = entry_ptr->is_dirty;
@@ -1858,12 +1858,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_mark_entry_clean() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_mark_entry_unserialized
*
- * Purpose: Mark a pinned or protected entry as unserialized. The target
- * entry MUST be either pinned or protected, and MAY be both.
+ * Purpose: Mark a pinned or protected entry as unserialized. The target
+ * entry MUST be either pinned or protected, and MAY be both.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1889,7 +1889,7 @@ H5C_mark_entry_unserialized(void *thing)
/* Reset image_up_to_date */
if(entry->image_up_to_date) {
- entry->image_up_to_date = FALSE;
+ entry->image_up_to_date = FALSE;
if(entry->flush_dep_nparents > 0)
if(H5C__mark_flush_dep_unserialized(entry) < 0)
@@ -1903,12 +1903,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_mark_entry_unserialized() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_mark_entry_serialized
*
- * Purpose: Mark a pinned entry as serialized. The target entry MUST be
- * pinned.
+ * Purpose: Mark a pinned entry as serialized. The target entry MUST be
+ * pinned.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1935,7 +1935,7 @@ H5C_mark_entry_serialized(void *_thing)
else if(entry->is_pinned) {
/* Check for entry changing status and do notifications, etc. */
if(!entry->image_up_to_date) {
- /* Set the image_up_to_date flag */
+ /* Set the image_up_to_date flag */
entry->image_up_to_date = TRUE;
/* Propagate the serialize up the flush dependency chain, if appropriate */
@@ -1951,7 +1951,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_mark_entry_serialized() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_move_entry
@@ -1967,14 +1967,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_move_entry(H5C_t * cache_ptr,
+H5C_move_entry(H5C_t * cache_ptr,
const H5C_class_t * type,
- haddr_t old_addr,
- haddr_t new_addr)
+ haddr_t old_addr,
+ haddr_t new_addr)
{
- H5C_cache_entry_t * entry_ptr = NULL;
- H5C_cache_entry_t * test_entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_cache_entry_t * entry_ptr = NULL;
+ H5C_cache_entry_t * test_entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2044,15 +2044,15 @@ H5C_move_entry(H5C_t * cache_ptr,
entry_ptr->addr = new_addr;
if(!entry_ptr->destroy_in_progress) {
- hbool_t was_dirty; /* Whether the entry was previously dirty */
+ hbool_t was_dirty; /* Whether the entry was previously dirty */
/* Remember previous dirty status */
was_dirty = entry_ptr->is_dirty;
/* Mark the entry as dirty if it isn't already */
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = TRUE;
- /* This shouldn't be needed, but it keeps the test code happy */
+ /* This shouldn't be needed, but it keeps the test code happy */
if(entry_ptr->image_up_to_date) {
entry_ptr->image_up_to_date = FALSE;
if(entry_ptr->flush_dep_nparents > 0)
@@ -2065,7 +2065,7 @@ H5C_move_entry(H5C_t * cache_ptr,
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
/* Skip some actions if we're in the middle of flushing the entry */
- if(!entry_ptr->flush_in_progress) {
+ if(!entry_ptr->flush_in_progress) {
/* Update the replacement policy for the entry */
H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, FAIL)
@@ -2099,15 +2099,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_move_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_resize_entry
*
- * Purpose: Resize a pinned or protected entry.
+ * Purpose: Resize a pinned or protected entry.
*
- * Resizing an entry dirties it, so if the entry is not
- * already dirty, the function places the entry on the
- * skip list.
+ * Resizing an entry dirties it, so if the entry is not
+ * already dirty, the function places the entry on the
+ * skip list.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2146,7 +2146,7 @@ H5C_resize_entry(void *thing, size_t new_size)
/* update for change in entry size if necessary */
if ( entry_ptr->size != new_size ) {
- hbool_t was_clean;
+ hbool_t was_clean;
/* make note of whether the entry was clean to begin with */
was_clean = !entry_ptr->is_dirty;
@@ -2170,7 +2170,7 @@ H5C_resize_entry(void *thing, size_t new_size)
if ( cache_ptr->flash_size_increase_possible ) {
if ( new_size > entry_ptr->size ) {
- size_t size_increase;
+ size_t size_increase;
size_increase = new_size - entry_ptr->size;
@@ -2202,18 +2202,18 @@ H5C_resize_entry(void *thing, size_t new_size)
#endif /* H5_HAVE_PARALLEL */
/* update statistics just before changing the entry size */
- H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size);
+ H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size);
/* update the hash table */
- H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, \
+ H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, \
new_size, entry_ptr, was_clean);
/* if the entry is in the skip list, update that too */
if(entry_ptr->in_slist)
- H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, new_size);
+ H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, new_size);
- /* finally, update the entry size proper */
- entry_ptr->size = new_size;
+ /* finally, update the entry size proper */
+ entry_ptr->size = new_size;
if(!entry_ptr->in_slist)
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
@@ -2247,19 +2247,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_resize_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_pin_protected_entry()
*
- * Purpose: Pin a protected cache entry. The entry must be protected
- * at the time of call, and must be unpinned.
+ * Purpose: Pin a protected cache entry. The entry must be protected
+ * at the time of call, and must be unpinned.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: John Mainzer
* 4/26/06
*
- * Changes: Added extreme sanity checks on entry and exit.
+ * Changes: Added extreme sanity checks on entry and exit.
* JRM -- 4/26/14
*
*-------------------------------------------------------------------------
@@ -2307,21 +2307,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_pin_protected_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_protect
*
* Purpose: If the target entry is not in the cache, load it. If
- * necessary, attempt to evict one or more entries to keep
- * the cache within its maximum size.
+ * necessary, attempt to evict one or more entries to keep
+ * the cache within its maximum size.
*
- * Mark the target entry as protected, and return its address
- * to the caller. The caller must call H5C_unprotect() when
- * finished with the entry.
+ * Mark the target entry as protected, and return its address
+ * to the caller. The caller must call H5C_unprotect() when
+ * finished with the entry.
*
- * While it is protected, the entry may not be either evicted
- * or flushed -- nor may it be accessed by another call to
- * H5C_protect. Any attempt to do so will result in a failure.
+ * While it is protected, the entry may not be either evicted
+ * or flushed -- nor may it be accessed by another call to
+ * H5C_protect. Any attempt to do so will result in a failure.
*
* Return: Success: Ptr to the desired entry
* Failure: NULL
@@ -2331,27 +2331,27 @@ done:
*-------------------------------------------------------------------------
*/
void *
-H5C_protect(H5F_t * f,
+H5C_protect(H5F_t * f,
const H5C_class_t * type,
- haddr_t addr,
+ haddr_t addr,
void * udata,
- unsigned flags)
+ unsigned flags)
{
- H5C_t * cache_ptr;
+ H5C_t * cache_ptr;
H5AC_ring_t ring = H5C_RING_UNDEFINED;
- hbool_t hit;
- hbool_t have_write_permitted = FALSE;
- hbool_t read_only = FALSE;
+ hbool_t hit;
+ hbool_t have_write_permitted = FALSE;
+ hbool_t read_only = FALSE;
hbool_t flush_last;
#ifdef H5_HAVE_PARALLEL
hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */
#endif /* H5_HAVE_PARALLEL */
- hbool_t write_permitted;
+ hbool_t write_permitted;
hbool_t was_loaded = FALSE; /* Whether the entry was loaded as a result of the protect */
- size_t empty_space;
- void * thing;
- H5C_cache_entry_t * entry_ptr;
- void * ret_value = NULL; /* Return value */
+ size_t empty_space;
+ void * thing;
+ H5C_cache_entry_t * entry_ptr;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -2537,16 +2537,16 @@ H5C_protect(H5F_t * f,
*/
if ( ( cache_ptr->evictions_enabled ) &&
( ( (cache_ptr->index_size + entry_ptr->size) >
- cache_ptr->max_cache_size)
- ||
- ( ( empty_space + cache_ptr->clean_index_size ) <
- cache_ptr->min_clean_size )
- )
+ cache_ptr->max_cache_size)
+ ||
+ ( ( empty_space + cache_ptr->clean_index_size ) <
+ cache_ptr->min_clean_size )
+ )
) {
size_t space_needed;
- if(empty_space <= entry_ptr->size)
+ if(empty_space <= entry_ptr->size)
cache_ptr->cache_full = TRUE;
if(cache_ptr->check_write_permitted != NULL) {
@@ -2607,7 +2607,7 @@ H5C_protect(H5F_t * f,
* *******************************************
*
* Set the flush_last field
- * of the newly loaded entry before inserting it into the
+ * of the newly loaded entry before inserting it into the
* index. Must do this, as the index tracked the number of
* entries with the flush_last field set, but assumes that
* the field will not change after insertion into the index.
@@ -2640,24 +2640,24 @@ H5C_protect(H5F_t * f,
HDassert(entry_ptr->type == type);
if(entry_ptr->is_protected) {
- if(read_only && entry_ptr->is_read_only) {
- HDassert(entry_ptr->ro_ref_count > 0);
- (entry_ptr->ro_ref_count)++;
- } /* end if */
+ if(read_only && entry_ptr->is_read_only) {
+ HDassert(entry_ptr->ro_ref_count > 0);
+ (entry_ptr->ro_ref_count)++;
+ } /* end if */
else
HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Target already protected & not read only?!?")
} /* end if */
else {
- H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, NULL)
+ H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, NULL)
- entry_ptr->is_protected = TRUE;
+ entry_ptr->is_protected = TRUE;
- if ( read_only ) {
- entry_ptr->is_read_only = TRUE;
- entry_ptr->ro_ref_count = 1;
- } /* end if */
+ if ( read_only ) {
+ entry_ptr->is_read_only = TRUE;
+ entry_ptr->ro_ref_count = 1;
+ } /* end if */
- entry_ptr->dirtied = FALSE;
+ entry_ptr->dirtied = FALSE;
} /* end else */
H5C__UPDATE_CACHE_HIT_RATE_STATS(cache_ptr, hit)
@@ -2701,10 +2701,10 @@ H5C_protect(H5F_t * f,
/* check to see if the cache is now oversized due to the cache
* size reduction. If it is, try to evict enough entries to
* bring the cache size down to the current maximum cache size.
- *
- * Also, if the min_clean_size requirement is not met, we
- * should also call H5C__make_space_in_cache() to bring us
- * into complience.
+ *
+ * Also, if the min_clean_size requirement is not met, we
+ * should also call H5C__make_space_in_cache() to bring us
+ * into complience.
*/
if(cache_ptr->index_size >= cache_ptr->max_cache_size)
@@ -2713,11 +2713,11 @@ H5C_protect(H5F_t * f,
empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
if ( ( cache_ptr->index_size > cache_ptr->max_cache_size )
- ||
- ( ( empty_space + cache_ptr->clean_index_size ) <
- cache_ptr->min_clean_size) ) {
+ ||
+ ( ( empty_space + cache_ptr->clean_index_size ) <
+ cache_ptr->min_clean_size) ) {
- if(cache_ptr->index_size > cache_ptr->max_cache_size)
+ if(cache_ptr->index_size > cache_ptr->max_cache_size)
cache_ptr->cache_full = TRUE;
if(H5C__make_space_in_cache(f, (size_t)0, write_permitted) < 0 )
@@ -2759,7 +2759,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_protect() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_reset_cache_hit_rate_stats()
@@ -2775,37 +2775,37 @@ done:
herr_t
H5C_reset_cache_hit_rate_stats(H5C_t * cache_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
if((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC))
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad cache_ptr on entry")
- cache_ptr->cache_hits = 0;
- cache_ptr->cache_accesses = 0;
+ cache_ptr->cache_hits = 0;
+ cache_ptr->cache_accesses = 0;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_reset_cache_hit_rate_stats() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_set_cache_auto_resize_config
*
- * Purpose: Set the cache automatic resize configuration to the
- * provided values if they are in range, and fail if they
- * are not.
+ * Purpose: Set the cache automatic resize configuration to the
+ * provided values if they are in range, and fail if they
+ * are not.
*
- * If the new configuration enables automatic cache resizing,
- * coerce the cache max size and min clean size into agreement
- * with the new policy and re-set the full cache hit rate
- * stats.
+ * If the new configuration enables automatic cache resizing,
+ * coerce the cache max size and min clean size into agreement
+ * with the new policy and re-set the full cache hit rate
+ * stats.
*
* Return: SUCCEED on success, and FAIL on failure.
*
* Programmer: John Mainzer
- * 10/8/04
+ * 10/8/04
*
*-------------------------------------------------------------------------
*/
@@ -2815,7 +2815,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
{
size_t new_max_cache_size;
size_t new_min_clean_size;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2899,7 +2899,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
if(config_ptr->max_size == config_ptr->min_size) {
cache_ptr->size_increase_possible = FALSE;
- cache_ptr->flash_size_increase_possible = FALSE;
+ cache_ptr->flash_size_increase_possible = FALSE;
cache_ptr->size_decrease_possible = FALSE;
} /* end if */
@@ -2934,7 +2934,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
/* since new_min_clean_size is of type size_t, we have
*
- * ( 0 <= new_min_clean_size )
+ * ( 0 <= new_min_clean_size )
*
* by definition.
*/
@@ -2994,7 +2994,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_set_cache_auto_resize_config() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_set_evictions_enabled()
*
@@ -3026,7 +3026,7 @@ H5C_set_evictions_enabled(H5C_t *cache_ptr, hbool_t evictions_enabled)
*/
if((evictions_enabled != TRUE) &&
((cache_ptr->resize_ctl.incr_mode != H5C_incr__off) ||
- (cache_ptr->resize_ctl.decr_mode != H5C_decr__off)))
+ (cache_ptr->resize_ctl.decr_mode != H5C_decr__off)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't disable evictions when auto resize enabled")
cache_ptr->evictions_enabled = evictions_enabled;
@@ -3035,27 +3035,27 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_set_evictions_enabled() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_set_slist_enabled()
*
* Purpose: Enable or disable the slist as directed.
*
- * The slist (skip list) is an address ordered list of
- * dirty entries in the metadata cache. However, this
+ * The slist (skip list) is an address ordered list of
+ * dirty entries in the metadata cache. However, this
* list is only needed during flush and close, where we
- * use it to write entries in more or less increasing
- * address order.
+ * use it to write entries in more or less increasing
+ * address order.
*
* This function sets up and enables further operations
- * on the slist, or disable the slist. This in turn
- * allows us to avoid the overhead of maintaining the
+ * on the slist, or disable the slist. This in turn
+ * allows us to avoid the overhead of maintaining the
* slist when it is not needed.
*
*
- * If the slist_enabled parameter is TRUE, the function
- *
+ * If the slist_enabled parameter is TRUE, the function
+ *
* 1) Verifies that the slist is empty.
*
* 2) Scans the index list, and inserts all dirty entries
@@ -3063,7 +3063,7 @@ done:
*
* 3) Sets cache_ptr->slist_enabled = TRUE.
*
- * Note that the clear_slist parameter is ignored if
+ * Note that the clear_slist parameter is ignored if
* the slist_enabed parameter is TRUE.
*
*
@@ -3077,7 +3077,7 @@ done:
* Thus shutdown proceeds as follows:
*
* 1) Test to see if the slist is empty. If it is, proceed
- * to step 3.
+ * to step 3.
*
* 2) Test to see if the clear_slist parameter is TRUE.
*
@@ -3086,7 +3086,7 @@ done:
* If it isn't, throw an error.
*
* 3) set cache_ptr->slist_enabled = FALSE.
- *
+ *
* Return: SUCCEED on success, and FAIL on failure.
*
* Programmer: John Mainzer
@@ -3099,7 +3099,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled,
+H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled,
hbool_t clear_slist)
{
H5C_cache_entry_t * entry_ptr;
@@ -3129,14 +3129,14 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled,
}
- /* set cache_ptr->slist_enabled to TRUE so that the slist
+ /* set cache_ptr->slist_enabled to TRUE so that the slist
* mainenance macros will be enabled.
*/
cache_ptr->slist_enabled = TRUE;
/* scan the index list and insert all dirty entries in the slist */
- entry_ptr = cache_ptr->il_head;
+ entry_ptr = cache_ptr->il_head;
while ( entry_ptr != NULL ) {
@@ -3150,10 +3150,10 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled,
entry_ptr = entry_ptr->il_next;
}
- /* we don't maintain a dirty index len, so we can't do a cross
+ /* we don't maintain a dirty index len, so we can't do a cross
* check against it. Note that there is no point in cross checking
* against the dirty LRU size, as the dirty LRU may not be maintained,
- * and in any case, there is no requirement that all dirty entries
+ * and in any case, there is no requirement that all dirty entries
* will reside on the dirty LRU.
*/
HDassert( cache_ptr->dirty_index_size == cache_ptr->slist_size );
@@ -3184,7 +3184,7 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled,
node_ptr = H5SL_first(cache_ptr->slist_ptr);
}
} else {
-
+
HDassert(FALSE);
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist not empty (2)?")
}
@@ -3201,19 +3201,19 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled,
HDassert(cache_ptr->slist_enabled);
#endif /* H5C__SLIST_OPT_ENABLED is FALSE */
-
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_set_slist_enabled() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_unpin_entry()
*
- * Purpose: Unpin a cache entry. The entry can be either protected or
- * unprotected at the time of call, but must be pinned.
+ * Purpose: Unpin a cache entry. The entry can be either protected or
+ * unprotected at the time of call, but must be pinned.
*
* Return: Non-negative on success/Negative on failure
*
@@ -3263,24 +3263,24 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_unpin_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_unprotect
*
- * Purpose: Undo an H5C_protect() call -- specifically, mark the
- * entry as unprotected, remove it from the protected list,
- * and give it back to the replacement policy.
+ * Purpose: Undo an H5C_protect() call -- specifically, mark the
+ * entry as unprotected, remove it from the protected list,
+ * and give it back to the replacement policy.
*
- * The TYPE and ADDR arguments must be the same as those in
- * the corresponding call to H5C_protect() and the THING
- * argument must be the value returned by that call to
- * H5C_protect().
+ * The TYPE and ADDR arguments must be the same as those in
+ * the corresponding call to H5C_protect() and the THING
+ * argument must be the value returned by that call to
+ * H5C_protect().
*
* Return: Non-negative on success/Negative on failure
*
- * If the deleted flag is TRUE, simply remove the target entry
- * from the cache, clear it, and free it without writing it to
- * disk.
+ * If the deleted flag is TRUE, simply remove the target entry
+ * from the cache, clear it, and free it without writing it to
+ * disk.
*
* Return: Non-negative on success/Negative on failure
*
@@ -3359,28 +3359,28 @@ done:
*
*
* JRM -- 5/8/20
- * Updated for the possibility that the slist will be
+ * Updated for the possibility that the slist will be
* disabled.
*
*-------------------------------------------------------------------------
*/
herr_t
-H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
+H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
{
H5C_t * cache_ptr;
- hbool_t deleted;
- hbool_t dirtied;
+ hbool_t deleted;
+ hbool_t dirtied;
hbool_t set_flush_marker;
- hbool_t pin_entry;
- hbool_t unpin_entry;
- hbool_t free_file_space;
- hbool_t take_ownership;
- hbool_t was_clean;
+ hbool_t pin_entry;
+ hbool_t unpin_entry;
+ hbool_t free_file_space;
+ hbool_t take_ownership;
+ hbool_t was_clean;
#ifdef H5_HAVE_PARALLEL
- hbool_t clear_entry = FALSE;
+ hbool_t clear_entry = FALSE;
#endif /* H5_HAVE_PARALLEL */
- H5C_cache_entry_t * entry_ptr;
- H5C_cache_entry_t * test_entry_ptr;
+ H5C_cache_entry_t * entry_ptr;
+ H5C_cache_entry_t * test_entry_ptr;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -3542,19 +3542,19 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
/* Update index for newly dirtied entry */
H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr)
- /* If the entry's type has a 'notify' callback send a
- * 'entry dirtied' notice now that the entry is fully
+ /* If the entry's type has a 'notify' callback send a
+ * 'entry dirtied' notice now that the entry is fully
* integrated into the cache.
*/
if ( ( entry_ptr->type->notify ) &&
- ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_DIRTIED,
+ ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_DIRTIED,
entry_ptr) < 0 ) )
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, \
"can't notify client about entry dirty flag set")
/* Propagate the flush dep dirty flag up the flush dependency chain
- * if appropriate
+ * if appropriate
*/
if ( entry_ptr->flush_dep_nparents > 0 ) {
@@ -3567,19 +3567,19 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
/* Check for newly clean entry */
else if ( ! was_clean && ! entry_ptr->is_dirty ) {
- /* If the entry's type has a 'notify' callback send a
- * 'entry cleaned' notice now that the entry is fully
+ /* If the entry's type has a 'notify' callback send a
+ * 'entry cleaned' notice now that the entry is fully
* integrated into the cache.
*/
if ( ( entry_ptr->type->notify ) &&
- ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED,
+ ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED,
entry_ptr) < 0 ) )
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, \
"can't notify client about entry dirty flag cleared")
/* Propagate the flush dep clean flag up the flush dependency chain
- * if appropriate
+ * if appropriate
*/
if ( entry_ptr->flush_dep_nparents > 0 ) {
@@ -3587,8 +3587,8 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
"Can't propagate flush dep dirty flag")
-
- }
+
+ }
} /* end else-if */
/* Pin or unpin the entry as requested. */
@@ -3625,7 +3625,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
if ( !entry_ptr->in_slist ) {
- /* this is a no-op if cache_ptr->slist_enabled is FALSE */
+ /* this is a no-op if cache_ptr->slist_enabled is FALSE */
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
}
} /* end if */
@@ -3688,7 +3688,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
/* verify that the target entry is in the cache. */
H5C__SEARCH_INDEX(cache_ptr, addr, test_entry_ptr, FAIL)
- if ( test_entry_ptr == NULL )
+ if ( test_entry_ptr == NULL )
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
"entry not in hash table?!?")
@@ -3698,8 +3698,8 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
"hash table contains multiple entries for addr?!?")
- if ( H5C__flush_single_entry(f, entry_ptr,
- H5C__FLUSH_CLEAR_ONLY_FLAG |
+ if ( H5C__flush_single_entry(f, entry_ptr,
+ H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) < 0 )
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
"Can't clear entry")
@@ -3725,7 +3725,7 @@ done:
} /* H5C_unprotect() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_unsettle_entry_ring
@@ -3769,36 +3769,36 @@ H5C_unsettle_entry_ring(void *_entry)
HDassert(cache->magic == H5C__H5C_T_MAGIC);
switch(entry->ring) {
- case H5C_RING_USER:
+ case H5C_RING_USER:
/* Do nothing */
- break;
-
- case H5C_RING_RDFSM:
- if(cache->rdfsm_settled) {
- if(cache->flush_in_progress || cache->close_warning_received)
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle")
- cache->rdfsm_settled = FALSE;
- } /* end if */
- break;
-
- case H5C_RING_MDFSM:
- if(cache->mdfsm_settled) {
- if(cache->flush_in_progress || cache->close_warning_received)
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle")
- cache->mdfsm_settled = FALSE;
- } /* end if */
- break;
-
- default:
- HDassert(FALSE); /* this should be un-reachable */
- break;
+ break;
+
+ case H5C_RING_RDFSM:
+ if(cache->rdfsm_settled) {
+ if(cache->flush_in_progress || cache->close_warning_received)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle")
+ cache->rdfsm_settled = FALSE;
+ } /* end if */
+ break;
+
+ case H5C_RING_MDFSM:
+ if(cache->mdfsm_settled) {
+ if(cache->flush_in_progress || cache->close_warning_received)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle")
+ cache->mdfsm_settled = FALSE;
+ } /* end if */
+ break;
+
+ default:
+ HDassert(FALSE); /* this should be un-reachable */
+ break;
} /* end switch */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_unsettle_entry_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_unsettle_ring()
*
@@ -3856,24 +3856,24 @@ H5C_unsettle_ring(H5F_t * f, H5C_ring_t ring)
} /* end if */
break;
- default:
- HDassert(FALSE); /* this should be un-reachable */
- break;
+ default:
+ HDassert(FALSE); /* this should be un-reachable */
+ break;
} /* end switch */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_unsettle_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_validate_resize_config()
*
- * Purpose: Run a sanity check on the specified sections of the
- * provided instance of struct H5C_auto_size_ctl_t.
+ * Purpose: Run a sanity check on the specified sections of the
+ * provided instance of struct H5C_auto_size_ctl_t.
*
- * Do nothing and return SUCCEED if no errors are detected,
- * and flag an error and return FAIL otherwise.
+ * Do nothing and return SUCCEED if no errors are detected,
+ * and flag an error and return FAIL otherwise.
*
* Return: Non-negative on success/Negative on failure
*
@@ -4025,15 +4025,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_validate_resize_config() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_create_flush_dependency()
*
- * Purpose: Initiates a parent<->child entry flush dependency. The parent
+ * Purpose: Initiates a parent<->child entry flush dependency. The parent
* entry must be pinned or protected at the time of call, and must
* have all dependencies removed before the cache can shut down.
*
- * Note: Flush dependencies in the cache indicate that a child entry
+ * Note: Flush dependencies in the cache indicate that a child entry
* must be flushed to the file before its parent. (This is
* currently used to implement Single-Writer/Multiple-Reader (SWMR)
* I/O access for data structures in the file).
@@ -4052,7 +4052,7 @@ herr_t
H5C_create_flush_dependency(void * parent_thing, void * child_thing)
{
H5C_t * cache_ptr;
- H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent thing's entry */
+ H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent thing's entry */
H5C_cache_entry_t * child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child thing's entry */
herr_t ret_value = SUCCEED; /* Return value */
@@ -4169,11 +4169,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_create_flush_dependency() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_destroy_flush_dependency()
*
- * Purpose: Terminates a parent<-> child entry flush dependency. The
+ * Purpose: Terminates a parent<-> child entry flush dependency. The
* parent entry must be pinned.
*
* Return: Non-negative on success/Negative on failure
@@ -4187,8 +4187,8 @@ herr_t
H5C_destroy_flush_dependency(void *parent_thing, void * child_thing)
{
H5C_t * cache_ptr;
- H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent entry */
- H5C_cache_entry_t * child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child entry */
+ H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent entry */
+ H5C_cache_entry_t * child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child entry */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -4286,16 +4286,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_destroy_flush_dependency() */
-
+
/*************************************************************************/
/**************************** Private Functions: *************************/
/*************************************************************************/
-
+
/*-------------------------------------------------------------------------
* Function: H5C__pin_entry_from_client()
*
- * Purpose: Internal routine to pin a cache entry from a client action.
+ * Purpose: Internal routine to pin a cache entry from a client action.
*
* Return: Non-negative on success/Negative on failure
*
@@ -4340,11 +4340,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__pin_entry_from_client() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__unpin_entry_real()
*
- * Purpose: Internal routine to unpin a cache entry.
+ * Purpose: Internal routine to unpin a cache entry.
*
* Return: Non-negative on success/Negative on failure
*
@@ -4386,11 +4386,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__unpin_entry_real() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__unpin_entry_from_client()
*
- * Purpose: Internal routine to unpin a cache entry from a client action.
+ * Purpose: Internal routine to unpin a cache entry from a client action.
*
* Return: Non-negative on success/Negative on failure
*
@@ -4431,18 +4431,18 @@ done:
/*-------------------------------------------------------------------------
*
- * Function: H5C__auto_adjust_cache_size
+ * Function: H5C__auto_adjust_cache_size
*
- * Purpose: Obtain the current full cache hit rate, and compare it
- * with the hit rate thresholds for modifying cache size.
- * If one of the thresholds has been crossed, adjusts the
- * size of the cache accordingly.
+ * Purpose: Obtain the current full cache hit rate, and compare it
+ * with the hit rate thresholds for modifying cache size.
+ * If one of the thresholds has been crossed, adjusts the
+ * size of the cache accordingly.
*
- * The function then resets the full cache hit rate
- * statistics, and exits.
+ * The function then resets the full cache hit rate
+ * statistics, and exits.
*
* Return: Non-negative on success/Negative on failure or if there was
- * an attempt to flush a protected item.
+ * an attempt to flush a protected item.
*
*
* Programmer: John Mainzer, 10/7/04
@@ -4452,16 +4452,16 @@ done:
static herr_t
H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
{
- H5C_t * cache_ptr = f->shared->cache;
- hbool_t reentrant_call = FALSE;
- hbool_t inserted_epoch_marker = FALSE;
- size_t new_max_cache_size = 0;
- size_t old_max_cache_size = 0;
- size_t new_min_clean_size = 0;
- size_t old_min_clean_size = 0;
- double hit_rate;
- enum H5C_resize_status status = in_spec; /* will change if needed */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_t * cache_ptr = f->shared->cache;
+ hbool_t reentrant_call = FALSE;
+ hbool_t inserted_epoch_marker = FALSE;
+ size_t new_max_cache_size = 0;
+ size_t old_max_cache_size = 0;
+ size_t new_min_clean_size = 0;
+ size_t old_min_clean_size = 0;
+ double hit_rate;
+ enum H5C_resize_status status = in_spec; /* will change if needed */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -4682,9 +4682,9 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
/* new_min_clean_size is of size_t, and thus must be non-negative.
* Hence we have
*
- * ( 0 <= new_min_clean_size ).
+ * ( 0 <= new_min_clean_size ).
*
- * by definition.
+ * by definition.
*/
HDassert( new_min_clean_size <= new_max_cache_size );
HDassert( (cache_ptr->resize_ctl).min_size <= new_max_cache_size );
@@ -4702,8 +4702,8 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
cache_ptr->size_decreased = TRUE;
}
- /* update flash cache size increase fields as appropriate */
- if ( cache_ptr->flash_size_increase_possible ) {
+ /* update flash cache size increase fields as appropriate */
+ if ( cache_ptr->flash_size_increase_possible ) {
switch ( (cache_ptr->resize_ctl).flash_incr_mode )
{
@@ -4751,17 +4751,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__auto_adjust_cache_size() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__autoadjust__ageout
*
* Purpose: Implement the ageout automatic cache size decrement
- * algorithm. Note that while this code evicts aged out
- * entries, the code does not change the maximum cache size.
- * Instead, the function simply computes the new value (if
- * any change is indicated) and reports this value in
- * *new_max_cache_size_ptr.
+ * algorithm. Note that while this code evicts aged out
+ * entries, the code does not change the maximum cache size.
+ * Instead, the function simply computes the new value (if
+ * any change is indicated) and reports this value in
+ * *new_max_cache_size_ptr.
*
* Return: Non-negative on success/Negative on failure or if there was
* an attempt to flush a protected item.
@@ -4776,8 +4776,8 @@ H5C__autoadjust__ageout(H5F_t * f, double hit_rate, enum H5C_resize_status * sta
size_t * new_max_cache_size_ptr, hbool_t write_permitted)
{
H5C_t * cache_ptr = f->shared->cache;
- size_t test_size;
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t test_size;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -4860,16 +4860,16 @@ done:
} /* H5C__autoadjust__ageout() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__autoadjust__ageout__cycle_epoch_marker
*
* Purpose: Remove the oldest epoch marker from the LRU list,
- * and reinsert it at the head of the LRU list. Also
- * remove the epoch marker's index from the head of the
- * ring buffer, and re-insert it at the tail of the ring
- * buffer.
+ * and reinsert it at the head of the LRU list. Also
+ * remove the epoch marker's index from the head of the
+ * ring buffer, and re-insert it at the tail of the ring
+ * buffer.
*
* Return: SUCCEED on success/FAIL on failure.
*
@@ -4944,37 +4944,37 @@ done:
} /* H5C__autoadjust__ageout__cycle_epoch_marker() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__autoadjust__ageout__evict_aged_out_entries
*
* Purpose: Evict clean entries in the cache that haven't
- * been accessed for at least
+ * been accessed for at least
* (cache_ptr->resize_ctl).epochs_before_eviction epochs,
- * and flush dirty entries that haven't been accessed for
- * that amount of time.
+ * and flush dirty entries that haven't been accessed for
+ * that amount of time.
*
- * Depending on configuration, the function will either
- * flush or evict all such entries, or all such entries it
- * encounters until it has freed the maximum amount of space
- * allowed under the maximum decrement.
+ * Depending on configuration, the function will either
+ * flush or evict all such entries, or all such entries it
+ * encounters until it has freed the maximum amount of space
+ * allowed under the maximum decrement.
*
- * If we are running in parallel mode, writes may not be
- * permitted. If so, the function simply skips any dirty
- * entries it may encounter.
+ * If we are running in parallel mode, writes may not be
+ * permitted. If so, the function simply skips any dirty
+ * entries it may encounter.
*
- * The function makes no attempt to maintain the minimum
- * clean size, as there is no guarantee that the cache size
- * will be changed.
+ * The function makes no attempt to maintain the minimum
+ * clean size, as there is no guarantee that the cache size
+ * will be changed.
*
- * If there is no cache size change, the minimum clean size
- * constraint will be met through a combination of clean
- * entries and free space in the cache.
+ * If there is no cache size change, the minimum clean size
+ * constraint will be met through a combination of clean
+ * entries and free space in the cache.
*
- * If there is a cache size reduction, the minimum clean size
- * will be re-calculated, and will be enforced the next time
- * we have to make space in the cache.
+ * If there is a cache size reduction, the minimum clean size
+ * will be re-calculated, and will be enforced the next time
+ * we have to make space in the cache.
*
* Observe that this function cannot occasion a read.
*
@@ -4987,10 +4987,10 @@ done:
static herr_t
H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitted)
{
- H5C_t * cache_ptr = f->shared->cache;
- size_t eviction_size_limit;
- size_t bytes_evicted = 0;
- hbool_t prev_is_dirty = FALSE;
+ H5C_t * cache_ptr = f->shared->cache;
+ size_t eviction_size_limit;
+ size_t bytes_evicted = 0;
+ hbool_t prev_is_dirty = FALSE;
hbool_t restart_scan;
H5C_cache_entry_t * entry_ptr;
H5C_cache_entry_t * next_ptr;
@@ -5034,10 +5034,10 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
HDassert( ! (entry_ptr->is_read_only) );
HDassert( (entry_ptr->ro_ref_count) == 0 );
- next_ptr = entry_ptr->next;
+ next_ptr = entry_ptr->next;
prev_ptr = entry_ptr->prev;
- if(prev_ptr != NULL)
+ if(prev_ptr != NULL)
prev_is_dirty = prev_ptr->is_dirty;
if(entry_ptr->is_dirty ) {
@@ -5082,23 +5082,23 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
if(prev_ptr != NULL) {
if(skipping_entry)
entry_ptr = prev_ptr;
- else if(restart_scan || (prev_ptr->is_dirty != prev_is_dirty)
+ else if(restart_scan || (prev_ptr->is_dirty != prev_is_dirty)
|| (prev_ptr->next != next_ptr)
|| (prev_ptr->is_protected)
|| (prev_ptr->is_pinned)) {
/* Something has happened to the LRU -- start over
- * from the tail.
+ * from the tail.
*/
restart_scan = FALSE;
entry_ptr = cache_ptr->LRU_tail_ptr;
- H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr)
+ H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr)
} /* end else-if */
else
entry_ptr = prev_ptr;
- } /* end if */
+ } /* end if */
else
- entry_ptr = NULL;
+ entry_ptr = NULL;
} /* end while */
/* for now at least, don't bother to maintain the minimum clean size,
@@ -5146,10 +5146,10 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
/* just skip the entry if it is dirty, as we can't do
* anything with it now since we can't write.
- *
- * Since all entries are clean, serialize() will not be called,
- * and thus we needn't test to see if the LRU has been changed
- * out from under us.
+ *
+ * Since all entries are clean, serialize() will not be called,
+ * and thus we needn't test to see if the LRU has been changed
+ * out from under us.
*/
entry_ptr = prev_ptr;
} /* end while */
@@ -5162,14 +5162,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__autoadjust__ageout__evict_aged_out_entries() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__autoadjust__ageout__insert_new_marker
*
* Purpose: Find an unused marker cache entry, mark it as used, and
- * insert it at the head of the LRU list. Also add the
- * marker's index in the epoch_markers array.
+ * insert it at the head of the LRU list. Also add the
+ * marker's index in the epoch_markers array.
*
* Return: SUCCEED on success/FAIL on failure.
*
@@ -5233,13 +5233,13 @@ done:
} /* H5C__autoadjust__ageout__insert_new_marker() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__autoadjust__ageout__remove_all_markers
*
* Purpose: Remove all epoch markers from the LRU list and mark them
- * as inactive.
+ * as inactive.
*
* Return: SUCCEED on success/FAIL on failure.
*
@@ -5308,15 +5308,15 @@ done:
} /* H5C__autoadjust__ageout__remove_all_markers() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__autoadjust__ageout__remove_excess_markers
*
* Purpose: Remove epoch markers from the end of the LRU list and
- * mark them as inactive until the number of active markers
- * equals the the current value of
- * (cache_ptr->resize_ctl).epochs_before_eviction.
+ * mark them as inactive until the number of active markers
+ * equals the the current value of
+ * (cache_ptr->resize_ctl).epochs_before_eviction.
*
* Return: SUCCEED on success/FAIL on failure.
*
@@ -5327,9 +5327,9 @@ done:
static herr_t
H5C__autoadjust__ageout__remove_excess_markers(H5C_t * cache_ptr)
{
- int ring_buf_index;
- int i;
- herr_t ret_value = SUCCEED; /* Return value */
+ int ring_buf_index;
+ int i;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -5386,7 +5386,7 @@ done:
} /* H5C__autoadjust__ageout__remove_excess_markers() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__flash_increase_cache_size
@@ -5448,7 +5448,7 @@ H5C__flash_increase_cache_size(H5C_t * cache_ptr,
HDassert( (cache_ptr->max_cache_size - cache_ptr->index_size)
< space_needed );
space_needed -= cache_ptr->max_cache_size -
- cache_ptr->index_size;
+ cache_ptr->index_size;
}
space_needed =
(size_t)(((double)space_needed) *
@@ -5504,9 +5504,9 @@ H5C__flash_increase_cache_size(H5C_t * cache_ptr,
}
/* note that we don't cycle the epoch markers. We can
- * argue either way as to whether we should, but for now
- * we don't.
- */
+ * argue either way as to whether we should, but for now
+ * we don't.
+ */
if ( (cache_ptr->resize_ctl).rpt_fcn != NULL ) {
@@ -5538,37 +5538,37 @@ done:
} /* H5C__flash_increase_cache_size() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__flush_invalidate_cache
*
- * Purpose: Flush and destroy the entries contained in the target
- * cache.
+ * Purpose: Flush and destroy the entries contained in the target
+ * cache.
*
- * If the cache contains protected entries, the function will
- * fail, as protected entries cannot be either flushed or
- * destroyed. However all unprotected entries should be
- * flushed and destroyed before the function returns failure.
+ * If the cache contains protected entries, the function will
+ * fail, as protected entries cannot be either flushed or
+ * destroyed. However all unprotected entries should be
+ * flushed and destroyed before the function returns failure.
*
- * While pinned entries can usually be flushed, they cannot
- * be destroyed. However, they should be unpinned when all
- * the entries that reference them have been destroyed (thus
- * reduding the pinned entry's reference count to 0, allowing
- * it to be unpinned).
+ * While pinned entries can usually be flushed, they cannot
+ * be destroyed. However, they should be unpinned when all
+ * the entries that reference them have been destroyed (thus
+ * reduding the pinned entry's reference count to 0, allowing
+ * it to be unpinned).
*
- * If pinned entries are present, the function makes repeated
- * passes through the cache, flushing all dirty entries
- * (including the pinned dirty entries where permitted) and
- * destroying all unpinned entries. This process is repeated
- * until either the cache is empty, or the number of pinned
- * entries stops decreasing on each pass.
+ * If pinned entries are present, the function makes repeated
+ * passes through the cache, flushing all dirty entries
+ * (including the pinned dirty entries where permitted) and
+ * destroying all unpinned entries. This process is repeated
+ * until either the cache is empty, or the number of pinned
+ * entries stops decreasing on each pass.
*
* Return: Non-negative on success/Negative on failure or if there was
- * a request to flush all items and something was protected.
+ * a request to flush all items and something was protected.
*
* Programmer: John Mainzer
- * 3/24/065
+ * 3/24/065
*
* Modifications:
*
@@ -5589,7 +5589,7 @@ done:
* Note that this is a pretty bad scenario if it ever
* happens. The code I have added should allow us to
* handle the situation under all but the worst conditions,
- * but one can argue that we should just scream and die if
+ * but one can argue that we should just scream and die if
* we ever detect the condition.
*
* -- JRM 10/13/07
@@ -5598,15 +5598,15 @@ done:
*
*
* Added support for the H5C__EVICT_ALLOW_LAST_PINS_FLAG.
- * This flag is used to flush and evict all entries in
+ * This flag is used to flush and evict all entries in
* the metadata cache that are not pinned -- typically,
* everything other than the superblock.
*
* ??? -- ??/??/??
*
- * Added sanity checks to verify that the skip list is
- * enabled on entry. On the face of it, it would make
- * sense to enable the slist on entry, and disable it
+ * Added sanity checks to verify that the skip list is
+ * enabled on entry. On the face of it, it would make
+ * sense to enable the slist on entry, and disable it
* on exit, as this function is not called repeatedly.
* However, since this function can be called from
* H5C_flush_cache(), this would create cases in the test
@@ -5620,9 +5620,9 @@ done:
static herr_t
H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
{
- H5C_t * cache_ptr;
- H5C_ring_t ring;
- herr_t ret_value = SUCCEED;
+ H5C_t * cache_ptr;
+ H5C_ring_t ring;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
@@ -5636,13 +5636,13 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
#if H5C_DO_SANITY_CHECKS
{
- int32_t i;
- uint32_t index_len = 0;
- uint32_t slist_len = 0;
- size_t index_size = (size_t)0;
- size_t clean_index_size = (size_t)0;
- size_t dirty_index_size = (size_t)0;
- size_t slist_size = (size_t)0;
+ int32_t i;
+ uint32_t index_len = 0;
+ uint32_t slist_len = 0;
+ size_t index_size = (size_t)0;
+ size_t clean_index_size = (size_t)0;
+ size_t dirty_index_size = (size_t)0;
+ size_t slist_size = (size_t)0;
HDassert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
HDassert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
@@ -5690,7 +5690,7 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
if(H5C__flush_invalidate_ring(f, ring, flags) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL,
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL,
"flush invalidate ring failed")
ring++;
@@ -5749,7 +5749,7 @@ done:
} /* H5C__flush_invalidate_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__flush_invalidate_ring
*
@@ -5785,7 +5785,7 @@ done:
* 9/1/15
*
* Changes: Added support for the H5C__EVICT_ALLOW_LAST_PINS_FLAG.
- * This flag is used to flush and evict all entries in
+ * This flag is used to flush and evict all entries in
* the metadata cache that are not pinned -- typically,
* everything other than the superblock.
*
@@ -5793,7 +5793,7 @@ done:
*
* A recent optimization turns off the slist unless a flush
* is in progress. This should not effect this function, as
- * it is only called during a flush. Added an assertion to
+ * it is only called during a flush. Added an assertion to
* verify this.
*
* JRM -- 5/6/20
@@ -6017,7 +6017,7 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags)
*/
if ( ( ( !entry_ptr->flush_me_last ) ||
( ( entry_ptr->flush_me_last ) &&
- ( cache_ptr->num_last_entries >= cache_ptr->slist_len ) )
+ ( cache_ptr->num_last_entries >= cache_ptr->slist_len ) )
) &&
( entry_ptr->flush_dep_nchildren == 0 ) &&
( entry_ptr->ring == ring ) ) {
@@ -6032,7 +6032,7 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags)
} /* end if */
else if ( entry_ptr->is_pinned ) {
- if ( H5C__flush_single_entry(f, entry_ptr,
+ if ( H5C__flush_single_entry(f, entry_ptr,
H5C__DURING_FLUSH_FLAG) < 0 )
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
@@ -6055,13 +6055,13 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags)
} /* end else-if */
else {
- if ( H5C__flush_single_entry(f, entry_ptr,
- (cooked_flags |
- H5C__DURING_FLUSH_FLAG |
+ if ( H5C__flush_single_entry(f, entry_ptr,
+ (cooked_flags |
+ H5C__DURING_FLUSH_FLAG |
H5C__FLUSH_INVALIDATE_FLAG |
H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) ) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL,
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL,
"dirty entry flush destroy failed")
if ( cache_ptr->slist_changed ) {
@@ -6093,12 +6093,12 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags)
if ( node_ptr == NULL ) {
- HDassert(cache_ptr->slist_len ==
- (uint32_t)((int32_t)initial_slist_len +
+ HDassert(cache_ptr->slist_len ==
+ (uint32_t)((int32_t)initial_slist_len +
cache_ptr->slist_len_increase));
- HDassert(cache_ptr->slist_size ==
- (size_t)((ssize_t)initial_slist_size +
+ HDassert(cache_ptr->slist_size ==
+ (size_t)((ssize_t)initial_slist_size +
cache_ptr->slist_size_increase));
} /* end if */
#endif /* H5C_DO_SANITY_CHECKS */
@@ -6134,11 +6134,11 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags)
HDassert((next_entry_ptr == NULL) ||
(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC));
- if ( ( ( ! entry_ptr->flush_me_last ) ||
- ( entry_ptr->flush_me_last &&
- ( cache_ptr->num_last_entries >= cache_ptr->slist_len ) )
- ) &&
- ( entry_ptr->flush_dep_nchildren == 0 ) &&
+ if ( ( ( ! entry_ptr->flush_me_last ) ||
+ ( entry_ptr->flush_me_last &&
+ ( cache_ptr->num_last_entries >= cache_ptr->slist_len ) )
+ ) &&
+ ( entry_ptr->flush_dep_nchildren == 0 ) &&
( entry_ptr->ring == ring ) ) {
if ( entry_ptr->is_protected ) {
@@ -6184,10 +6184,10 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags)
*/
cache_ptr->entry_watched_for_removal = next_entry_ptr;
- if ( H5C__flush_single_entry(f, entry_ptr,
- (cooked_flags |
- H5C__DURING_FLUSH_FLAG |
- H5C__FLUSH_INVALIDATE_FLAG |
+ if ( H5C__flush_single_entry(f, entry_ptr,
+ (cooked_flags |
+ H5C__DURING_FLUSH_FLAG |
+ H5C__FLUSH_INVALIDATE_FLAG |
H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG)) < 0 )
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
@@ -6201,8 +6201,8 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags)
* if this results in the size of the pinned entry
* failing to decline during the pass.
*/
- if ( ( ( NULL != next_entry_ptr ) &&
- ( NULL == cache_ptr->entry_watched_for_removal )
+ if ( ( ( NULL != next_entry_ptr ) &&
+ ( NULL == cache_ptr->entry_watched_for_removal )
) ||
( cache_ptr->entries_loaded_counter > 0 ) ||
( cache_ptr->entries_inserted_counter > 0 ) ||
@@ -6254,7 +6254,7 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags)
/* Check if the number of pinned entries in the ring is positive, and
* it is not declining. Scream and die if so.
*/
- if ( ( cur_ring_pel_len > 0 ) &&
+ if ( ( cur_ring_pel_len > 0 ) &&
( cur_ring_pel_len >= old_ring_pel_len ) ) {
/* Don't error if allowed to have pinned entries remaining */
@@ -6271,7 +6271,7 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags)
HDassert(protected_entries == cache_ptr->pl_len);
- if ( ( protected_entries > 0 ) &&
+ if ( ( protected_entries > 0 ) &&
( protected_entries == cache_ptr->index_len ) )
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
@@ -6312,7 +6312,7 @@ done:
} /* H5C__flush_invalidate_ring() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__flush_ring
@@ -6338,7 +6338,7 @@ done:
*
* Changes: A recent optimization turns off the slist unless a flush
* is in progress. This should not effect this function, as
- * it is only called during a flush. Added an assertion to
+ * it is only called during a flush. Added an assertion to
* verify this.
*
* JRM -- 5/6/20
@@ -6350,21 +6350,21 @@ static herr_t
H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
{
H5C_t * cache_ptr = f->shared->cache;
- hbool_t flushed_entries_last_pass;
- hbool_t flush_marked_entries;
- hbool_t ignore_protected;
- hbool_t tried_to_flush_protected_entry = FALSE;
- hbool_t restart_slist_scan;
- uint32_t protected_entries = 0;
- H5SL_node_t * node_ptr = NULL;
- H5C_cache_entry_t * entry_ptr = NULL;
- H5C_cache_entry_t * next_entry_ptr = NULL;
+ hbool_t flushed_entries_last_pass;
+ hbool_t flush_marked_entries;
+ hbool_t ignore_protected;
+ hbool_t tried_to_flush_protected_entry = FALSE;
+ hbool_t restart_slist_scan;
+ uint32_t protected_entries = 0;
+ H5SL_node_t * node_ptr = NULL;
+ H5C_cache_entry_t * entry_ptr = NULL;
+ H5C_cache_entry_t * next_entry_ptr = NULL;
#if H5C_DO_SANITY_CHECKS
- uint32_t initial_slist_len = 0;
+ uint32_t initial_slist_len = 0;
size_t initial_slist_size = 0;
#endif /* H5C_DO_SANITY_CHECKS */
int i;
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
@@ -6381,7 +6381,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
( H5C__validate_pinned_entry_list(cache_ptr ) < 0 ) ||
( H5C__validate_lru_list(cache_ptr) < 0 ) )
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL,
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL,
"an extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -6550,15 +6550,15 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
next_entry_ptr = NULL;
}
- if ( ( ! flush_marked_entries || entry_ptr->flush_marker ) &&
+ if ( ( ! flush_marked_entries || entry_ptr->flush_marker ) &&
( ( ! entry_ptr->flush_me_last ) ||
- ( ( entry_ptr->flush_me_last ) &&
+ ( ( entry_ptr->flush_me_last ) &&
( ( cache_ptr->num_last_entries >= cache_ptr->slist_len )||
( flush_marked_entries && entry_ptr->flush_marker ) )
)
- ) &&
- ( ( entry_ptr->flush_dep_nchildren == 0 ) ||
- ( entry_ptr->flush_dep_ndirty_children == 0 ) ) &&
+ ) &&
+ ( ( entry_ptr->flush_dep_nchildren == 0 ) ||
+ ( entry_ptr->flush_dep_ndirty_children == 0 ) ) &&
( entry_ptr->ring == ring ) ) {
HDassert(entry_ptr->flush_dep_nunser_children == 0);
@@ -6575,7 +6575,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
} /* end if */
else {
- if ( H5C__flush_single_entry(f, entry_ptr,
+ if ( H5C__flush_single_entry(f, entry_ptr,
(flags | H5C__DURING_FLUSH_FLAG)) < 0 )
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
@@ -6614,7 +6614,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
HDassert(protected_entries <= cache_ptr->pl_len);
- if ( ( ( cache_ptr->pl_len > 0 ) && ( ! ignore_protected ) ) ||
+ if ( ( ( cache_ptr->pl_len > 0 ) && ( ! ignore_protected ) ) ||
( tried_to_flush_protected_entry ) )
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
@@ -6635,7 +6635,7 @@ done:
} /* H5C__flush_ring() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__flush_single_entry
@@ -6718,10 +6718,10 @@ done:
*
*
* JRM -- 5/8/20
- * Updated sanity checks for the possibility that the slist
+ * Updated sanity checks for the possibility that the slist
* is disabled.
*
- * Also updated main comment to conform more closely with
+ * Also updated main comment to conform more closely with
* the current state of the code.
*
*-------------------------------------------------------------------------
@@ -6762,7 +6762,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
clear_only = ((flags & H5C__FLUSH_CLEAR_ONLY_FLAG) != 0);
free_file_space = ((flags & H5C__FREE_FILE_SPACE_FLAG) != 0);
take_ownership = ((flags & H5C__TAKE_OWNERSHIP_FLAG) != 0);
- del_from_slist_on_destroy =
+ del_from_slist_on_destroy =
((flags & H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) != 0);
during_flush = ((flags & H5C__DURING_FLUSH_FLAG) != 0);
generate_image = ((flags & H5C__GENERATE_IMAGE_FLAG) != 0);
@@ -6799,9 +6799,9 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* Set suppress_image_entry_writes to TRUE if indicated by the
* image_ctl flags.
*/
- if ( ( cache_ptr->close_warning_received ) &&
- ( cache_ptr->image_ctl.generate_image ) &&
- ( cache_ptr->num_entries_in_image > 0 ) &&
+ if ( ( cache_ptr->close_warning_received ) &&
+ ( cache_ptr->image_ctl.generate_image ) &&
+ ( cache_ptr->num_entries_in_image > 0 ) &&
( cache_ptr->image_entries != NULL ) ) {
/* Sanity checks */
@@ -6820,8 +6820,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
} /* end if */
} /* end if */
- /* run initial sanity checks */
-#if H5C_DO_SANITY_CHECKS
+ /* run initial sanity checks */
+#if H5C_DO_SANITY_CHECKS
if ( cache_ptr->slist_enabled ) {
if ( entry_ptr->in_slist ) {
@@ -6891,14 +6891,14 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
if ( NULL == entry_ptr->image_ptr ) {
- if ( NULL == (entry_ptr->image_ptr =
+ if ( NULL == (entry_ptr->image_ptr =
H5MM_malloc(entry_ptr->size + H5C_IMAGE_EXTRA_SPACE)) )
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, \
"memory allocation failed for on disk image buffer")
#if H5C_DO_MEMORY_SANITY_CHECKS
- H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size,
+ H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size,
H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
@@ -6929,7 +6929,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
HDassert(entry_ptr->is_dirty);
#if H5C_DO_SANITY_CHECKS
- if ( ( cache_ptr->check_write_permitted ) &&
+ if ( ( cache_ptr->check_write_permitted ) &&
( ! ( cache_ptr->write_permitted ) ) )
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
@@ -6943,8 +6943,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* H5AC__CLASS_SKIP_WRITES is set in the entry's type. This
* flag should only be used in test code
*/
- if ( ( ( ! suppress_image_entry_writes ) ||
- ( ! entry_ptr->include_in_image ) ) &&
+ if ( ( ( ! suppress_image_entry_writes ) ||
+ ( ! entry_ptr->include_in_image ) ) &&
( ( (entry_ptr->type->flags) & H5C__CLASS_SKIP_WRITES) == 0 ) ) {
H5FD_mem_t mem_type = H5FD_MEM_DEFAULT;
@@ -6952,7 +6952,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
#ifdef H5_HAVE_PARALLEL
if ( cache_ptr->coll_write_list ) {
- if ( H5SL_insert(cache_ptr->coll_write_list, entry_ptr,
+ if ( H5SL_insert(cache_ptr->coll_write_list, entry_ptr,
&entry_ptr->addr) < 0 )
HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, \
@@ -6975,7 +6975,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
mem_type = entry_ptr->type->mem_type;
}
- if ( H5F_block_write(f, mem_type, entry_ptr->addr,
+ if ( H5F_block_write(f, mem_type, entry_ptr->addr,
entry_ptr->size, entry_ptr->image_ptr) < 0 )
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
@@ -6991,7 +6991,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* just flushed the entry.
*/
if ( ( entry_ptr->type->notify ) &&
- ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_FLUSH,
+ ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_FLUSH,
entry_ptr) < 0 ) )
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, \
@@ -7052,8 +7052,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* to be removed from the cache, send a 'before eviction' notice while
* the entry is still fully integrated in the cache.
*/
- if ( ( entry_ptr->type->notify ) &&
- ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_BEFORE_EVICT,
+ if ( ( entry_ptr->type->notify ) &&
+ ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_BEFORE_EVICT,
entry_ptr) < 0 ) )
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, \
@@ -7136,19 +7136,19 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
/* Check for entry changing status and do notifications, etc. */
if ( was_dirty ) {
- /* If the entry's type has a 'notify' callback send a
- * 'entry cleaned' notice now that the entry is fully
+ /* If the entry's type has a 'notify' callback send a
+ * 'entry cleaned' notice now that the entry is fully
* integrated into the cache.
*/
if ( ( entry_ptr->type->notify ) &&
- ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED,
+ ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED,
entry_ptr) < 0 ) )
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, \
"can't notify client about entry dirty flag cleared")
- /* Propagate the clean flag up the flush dependency chain
- * if appropriate
+ /* Propagate the clean flag up the flush dependency chain
+ * if appropriate
*/
if ( entry_ptr->flush_dep_ndirty_children != 0 ) {
@@ -7169,7 +7169,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
entry_ptr->flush_in_progress = FALSE;
/* capture the cache entry address for the log_flush call at the
- * end before the entry_ptr gets freed
+ * end before the entry_ptr gets freed
*/
entry_addr = entry_ptr->addr;
@@ -7251,7 +7251,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
}
/* Release the space on disk */
- if ( H5MF_xfree(f, entry_ptr->type->mem_type,
+ if ( H5MF_xfree(f, entry_ptr->type->mem_type,
entry_ptr->addr, fsf_size) < 0 )
HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, \
@@ -7294,8 +7294,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
/* Reset dirty flag */
entry_ptr->is_dirty = FALSE;
- /* If the entry's type has a 'notify' callback send a
- * 'entry cleaned' notice now that the entry is fully
+ /* If the entry's type has a 'notify' callback send a
+ * 'entry cleaned' notice now that the entry is fully
* integrated into the cache.
*/
if ( ( entry_ptr->type->notify ) &&
@@ -7344,10 +7344,10 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
HDassert(!destroy);
HDassert(entry_ptr->image_ptr);
- if ( ( f->shared->page_buf ) &&
+ if ( ( f->shared->page_buf ) &&
( f->shared->page_buf->page_size >= entry_ptr->size ) ) {
- if ( H5PB_update_entry(f->shared->page_buf, entry_ptr->addr,
+ if ( H5PB_update_entry(f->shared->page_buf, entry_ptr->addr,
entry_ptr->size, entry_ptr->image_ptr) > 0 )
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
@@ -7357,7 +7357,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
if ( cache_ptr->log_flush ) {
- if ( (cache_ptr->log_flush)(cache_ptr, entry_addr,
+ if ( (cache_ptr->log_flush)(cache_ptr, entry_addr,
was_dirty, flags) < 0 )
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
@@ -7377,7 +7377,7 @@ done:
} /* H5C__flush_single_entry() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__verify_len_eoa
@@ -7404,8 +7404,8 @@ H5C__verify_len_eoa(H5F_t *f, const H5C_class_t *type, haddr_t addr,
size_t *len, hbool_t actual)
{
H5FD_mem_t cooked_type; /* Modified type, accounting for switching global heaps */
- haddr_t eoa; /* End-of-allocation in the file */
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t eoa; /* End-of-allocation in the file */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -7419,29 +7419,29 @@ H5C__verify_len_eoa(H5F_t *f, const H5C_class_t *type, haddr_t addr,
/* Get the file's end-of-allocation value */
eoa = H5F_get_eoa(f, cooked_type);
if(!H5F_addr_defined(eoa))
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid EOA address for file")
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid EOA address for file")
/* Check for bad address in general */
if(H5F_addr_gt(addr, eoa))
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "address of object past end of allocation")
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "address of object past end of allocation")
/* Check if the amount of data to read will be past the EOA */
if(H5F_addr_gt((addr + *len), eoa)) {
- if(actual)
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "actual len exceeds EOA")
- else
- /* Trim down the length of the metadata */
- *len = (size_t)(eoa - addr);
+ if(actual)
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "actual len exceeds EOA")
+ else
+ /* Trim down the length of the metadata */
+ *len = (size_t)(eoa - addr);
} /* end if */
if(*len <= 0)
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "len not positive after adjustment for EOA")
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "len not positive after adjustment for EOA")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__verify_len_eoa() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__load_entry
@@ -7680,7 +7680,7 @@ H5C__load_entry(H5F_t * f,
*
* In the following assert:
*
- * HDassert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) );
+ * HDassert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) );
*
* note that type ids 5 & 6 are associated with object headers in the
* metadata cache.
@@ -7700,7 +7700,7 @@ H5C__load_entry(H5F_t * f,
entry->image_ptr = image;
entry->image_up_to_date = !dirty;
entry->type = type;
- entry->is_dirty = dirty;
+ entry->is_dirty = dirty;
entry->dirtied = FALSE;
entry->is_protected = FALSE;
entry->is_read_only = FALSE;
@@ -7728,7 +7728,7 @@ H5C__load_entry(H5F_t * f,
entry->ht_next = NULL;
entry->ht_prev = NULL;
entry->il_next = NULL;
- entry->il_prev = NULL;
+ entry->il_prev = NULL;
entry->next = NULL;
entry->prev = NULL;
@@ -7781,28 +7781,28 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__load_entry() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__make_space_in_cache
*
* Purpose: Attempt to evict cache entries until the index_size
- * is at least needed_space below max_cache_size.
+ * is at least needed_space below max_cache_size.
*
- * In passing, also attempt to bring cLRU_list_size to a
- * value greater than min_clean_size.
+ * In passing, also attempt to bring cLRU_list_size to a
+ * value greater than min_clean_size.
*
- * Depending on circumstances, both of these goals may
- * be impossible, as in parallel mode, we must avoid generating
- * a write as part of a read (to avoid deadlock in collective
- * I/O), and in all cases, it is possible (though hopefully
- * highly unlikely) that the protected list may exceed the
- * maximum size of the cache.
+ * Depending on circumstances, both of these goals may
+ * be impossible, as in parallel mode, we must avoid generating
+ * a write as part of a read (to avoid deadlock in collective
+ * I/O), and in all cases, it is possible (though hopefully
+ * highly unlikely) that the protected list may exceed the
+ * maximum size of the cache.
*
- * Thus the function simply does its best, returning success
- * unless an error is encountered.
+ * Thus the function simply does its best, returning success
+ * unless an error is encountered.
*
- * Observe that this function cannot occasion a read.
+ * Observe that this function cannot occasion a read.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -7811,26 +7811,26 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
+H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
{
- H5C_t * cache_ptr = f->shared->cache;
+ H5C_t * cache_ptr = f->shared->cache;
#if H5C_COLLECT_CACHE_STATS
int32_t clean_entries_skipped = 0;
int32_t dirty_pf_entries_skipped = 0;
int32_t total_entries_scanned = 0;
#endif /* H5C_COLLECT_CACHE_STATS */
- uint32_t entries_examined = 0;
- uint32_t initial_list_len;
- size_t empty_space;
+ uint32_t entries_examined = 0;
+ uint32_t initial_list_len;
+ size_t empty_space;
hbool_t reentrant_call = FALSE;
- hbool_t prev_is_dirty = FALSE;
+ hbool_t prev_is_dirty = FALSE;
hbool_t didnt_flush_entry = FALSE;
- hbool_t restart_scan;
- H5C_cache_entry_t * entry_ptr;
- H5C_cache_entry_t * prev_ptr;
- H5C_cache_entry_t * next_ptr;
- uint32_t num_corked_entries = 0;
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t restart_scan;
+ H5C_cache_entry_t * entry_ptr;
+ H5C_cache_entry_t * prev_ptr;
+ H5C_cache_entry_t * next_ptr;
+ uint32_t num_corked_entries = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -7857,47 +7857,47 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
initial_list_len = cache_ptr->LRU_list_len;
entry_ptr = cache_ptr->LRU_tail_ptr;
- if(cache_ptr->index_size >= cache_ptr->max_cache_size)
- empty_space = 0;
- else
- empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
+ if(cache_ptr->index_size >= cache_ptr->max_cache_size)
+ empty_space = 0;
+ else
+ empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
while ( ( ( (cache_ptr->index_size + space_needed)
>
cache_ptr->max_cache_size
)
- ||
- (
- ( empty_space + cache_ptr->clean_index_size )
- <
- ( cache_ptr->min_clean_size )
+ ||
+ (
+ ( empty_space + cache_ptr->clean_index_size )
+ <
+ ( cache_ptr->min_clean_size )
)
- )
+ )
&&
( entries_examined <= (2 * initial_list_len) )
&&
( entry_ptr != NULL )
)
{
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert( !(entry_ptr->is_protected) );
HDassert( ! (entry_ptr->is_read_only) );
HDassert( (entry_ptr->ro_ref_count) == 0 );
- next_ptr = entry_ptr->next;
+ next_ptr = entry_ptr->next;
prev_ptr = entry_ptr->prev;
- if(prev_ptr != NULL)
- prev_is_dirty = prev_ptr->is_dirty;
+ if(prev_ptr != NULL)
+ prev_is_dirty = prev_ptr->is_dirty;
- if(entry_ptr->is_dirty &&
+ if(entry_ptr->is_dirty &&
(entry_ptr->tag_info && entry_ptr->tag_info->corked)) {
/* Skip "dirty" corked entries. */
- ++num_corked_entries;
+ ++num_corked_entries;
didnt_flush_entry = TRUE;
- } else if ( ( (entry_ptr->type)->id != H5AC_EPOCH_MARKER_ID ) &&
+ } else if ( ( (entry_ptr->type)->id != H5AC_EPOCH_MARKER_ID ) &&
( ! entry_ptr->flush_in_progress ) &&
( ! entry_ptr->prefetched_dirty ) ) {
@@ -7914,7 +7914,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- /* reset entries_removed_counter and
+ /* reset entries_removed_counter and
* last_entry_removed_ptr prior to the call to
* H5C__flush_single_entry() so that we can spot
* unexpected removals of entries from the cache,
@@ -7928,7 +7928,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
if(H5C__flush_single_entry(f, entry_ptr, H5C__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry")
- if ( ( cache_ptr->entries_removed_counter > 1 ) ||
+ if ( ( cache_ptr->entries_removed_counter > 1 ) ||
( cache_ptr->last_entry_removed_ptr == prev_ptr ) )
restart_scan = TRUE;
@@ -7970,63 +7970,63 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
#endif /* H5C_COLLECT_CACHE_STATS */
}
- if ( prev_ptr != NULL ) {
+ if ( prev_ptr != NULL ) {
- if ( didnt_flush_entry ) {
+ if ( didnt_flush_entry ) {
- /* epoch markers don't get flushed, and we don't touch
+ /* epoch markers don't get flushed, and we don't touch
* entries that are in the process of being flushed.
* Hence no need for sanity checks, as we haven't
* flushed anything. Thus just set entry_ptr to prev_ptr
* and go on.
- */
+ */
entry_ptr = prev_ptr;
- } else if ( ( restart_scan )
+ } else if ( ( restart_scan )
||
( prev_ptr->is_dirty != prev_is_dirty )
- ||
- ( prev_ptr->next != next_ptr )
- ||
- ( prev_ptr->is_protected )
- ||
- ( prev_ptr->is_pinned ) ) {
-
- /* something has happened to the LRU -- start over
- * from the tail.
- */
+ ||
+ ( prev_ptr->next != next_ptr )
+ ||
+ ( prev_ptr->is_protected )
+ ||
+ ( prev_ptr->is_pinned ) ) {
+
+ /* something has happened to the LRU -- start over
+ * from the tail.
+ */
restart_scan = FALSE;
- entry_ptr = cache_ptr->LRU_tail_ptr;
- H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr)
+ entry_ptr = cache_ptr->LRU_tail_ptr;
+ H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr)
- } else {
+ } else {
- entry_ptr = prev_ptr;
+ entry_ptr = prev_ptr;
- }
- } else {
+ }
+ } else {
- entry_ptr = NULL;
+ entry_ptr = NULL;
- }
+ }
- entries_examined++;
+ entries_examined++;
- if ( cache_ptr->index_size >= cache_ptr->max_cache_size ) {
+ if ( cache_ptr->index_size >= cache_ptr->max_cache_size ) {
- empty_space = 0;
+ empty_space = 0;
- } else {
+ } else {
- empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
+ empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
- }
+ }
- HDassert( cache_ptr->index_size ==
- (cache_ptr->clean_index_size +
- cache_ptr->dirty_index_size) );
+ HDassert( cache_ptr->index_size ==
+ (cache_ptr->clean_index_size +
+ cache_ptr->dirty_index_size) );
- }
+ }
#if H5C_COLLECT_CACHE_STATS
cache_ptr->calls_to_msic++;
@@ -8050,19 +8050,19 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
#endif /* H5C_COLLECT_CACHE_STATS */
- /* NEED: work on a better assert for corked entries */
- HDassert( ( entries_examined > (2 * initial_list_len) ) ||
- ( (cache_ptr->pl_size + cache_ptr->pel_size + cache_ptr->min_clean_size) >
- cache_ptr->max_cache_size ) ||
- ( ( cache_ptr->clean_index_size + empty_space )
- >= cache_ptr->min_clean_size ) ||
- ( ( num_corked_entries )));
+ /* NEED: work on a better assert for corked entries */
+ HDassert( ( entries_examined > (2 * initial_list_len) ) ||
+ ( (cache_ptr->pl_size + cache_ptr->pel_size + cache_ptr->min_clean_size) >
+ cache_ptr->max_cache_size ) ||
+ ( ( cache_ptr->clean_index_size + empty_space )
+ >= cache_ptr->min_clean_size ) ||
+ ( ( num_corked_entries )));
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
HDassert( ( entries_examined > (2 * initial_list_len) ) ||
- ( cache_ptr->cLRU_list_size <= cache_ptr->clean_index_size ) );
+ ( cache_ptr->cLRU_list_size <= cache_ptr->clean_index_size ) );
HDassert( ( entries_examined > (2 * initial_list_len) ) ||
- ( cache_ptr->dLRU_list_size <= cache_ptr->dirty_index_size ) );
+ ( cache_ptr->dLRU_list_size <= cache_ptr->dirty_index_size ) );
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
@@ -8102,14 +8102,14 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
} /* end if */
- /* we are scanning the clean LRU, so the serialize function
- * will not be called on any entry -- thus there is no
- * concern about the list being modified out from under
- * this function.
- */
+ /* we are scanning the clean LRU, so the serialize function
+ * will not be called on any entry -- thus there is no
+ * concern about the list being modified out from under
+ * this function.
+ */
entry_ptr = prev_ptr;
- entries_examined++;
+ entries_examined++;
}
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
}
@@ -8124,16 +8124,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__make_space_in_cache() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__validate_lru_list
*
* Purpose: Debugging function that scans the LRU list for errors.
*
- * If an error is detected, the function generates a
- * diagnostic and returns FAIL. If no error is detected,
- * the function returns SUCCEED.
+ * If an error is detected, the function generates a
+ * diagnostic and returns FAIL. If no error is detected,
+ * the function returns SUCCEED.
*
* Return: FAIL if error is detected, SUCCEED otherwise.
*
@@ -8147,8 +8147,8 @@ H5C__validate_lru_list(H5C_t * cache_ptr)
{
int32_t len = 0;
size_t size = 0;
- H5C_cache_entry_t * entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -8202,7 +8202,7 @@ done:
} /* H5C__validate_lru_list() */
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__validate_pinned_entry_list
@@ -8210,9 +8210,9 @@ done:
* Purpose: Debugging function that scans the pinned entry list for
* errors.
*
- * If an error is detected, the function generates a
- * diagnostic and returns FAIL. If no error is detected,
- * the function returns SUCCEED.
+ * If an error is detected, the function generates a
+ * diagnostic and returns FAIL. If no error is detected,
+ * the function returns SUCCEED.
*
* Return: FAIL if error is detected, SUCCEED otherwise.
*
@@ -8226,8 +8226,8 @@ H5C__validate_pinned_entry_list(H5C_t * cache_ptr)
{
int32_t len = 0;
size_t size = 0;
- H5C_cache_entry_t * entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -8286,7 +8286,7 @@ done:
} /* H5C__validate_pinned_entry_list() */
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__validate_protected_entry_list
@@ -8294,9 +8294,9 @@ done:
* Purpose: Debugging function that scans the protected entry list for
* errors.
*
- * If an error is detected, the function generates a
- * diagnostic and returns FAIL. If no error is detected,
- * the function returns SUCCEED.
+ * If an error is detected, the function generates a
+ * diagnostic and returns FAIL. If no error is detected,
+ * the function returns SUCCEED.
*
* Return: FAIL if error is detected, SUCCEED otherwise.
*
@@ -8310,8 +8310,8 @@ H5C__validate_protected_entry_list(H5C_t * cache_ptr)
{
int32_t len = 0;
size_t size = 0;
- H5C_cache_entry_t * entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -8370,17 +8370,17 @@ done:
} /* H5C__validate_protected_entry_list() */
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__entry_in_skip_list
*
* Purpose: Debugging function that scans skip list to see if it
- * is in present. We need this, as it is possible for
- * an entry to be in the skip list twice.
+ * is in present. We need this, as it is possible for
+ * an entry to be in the skip list twice.
*
* Return: FALSE if the entry is not in the skip list, and TRUE
- * if it is.
+ * if it is.
*
* Programmer: John Mainzer, 11/1/14
*
@@ -8404,22 +8404,22 @@ H5C__entry_in_skip_list(H5C_t * cache_ptr, H5C_cache_entry_t *target_ptr)
entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(entry_ptr);
+ HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(entry_ptr->is_dirty);
HDassert(entry_ptr->in_slist);
if(entry_ptr == target_ptr)
- in_slist = TRUE;
- else
- node_ptr = H5SL_next(node_ptr);
+ in_slist = TRUE;
+ else
+ node_ptr = H5SL_next(node_ptr);
}
return(in_slist);
} /* H5C__entry_in_skip_list() */
#endif /* H5C_DO_SLIST_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__flush_marked_entries
@@ -8431,11 +8431,11 @@ H5C__entry_in_skip_list(H5C_t * cache_ptr, H5C_cache_entry_t *target_ptr)
* Programmer: Mike McGreevy
* November 3, 2010
*
- * Changes: Modified function to setup the slist before calling
+ * Changes: Modified function to setup the slist before calling
* H%C_flush_cache(), and take it down afterwards. Note
- * that the slist need not be empty after the call to
- * H5C_flush_cache() since we are only flushing marked
- * entries. Thus must set the clear_slist parameter
+ * that the slist need not be empty after the call to
+ * H5C_flush_cache() since we are only flushing marked
+ * entries. Thus must set the clear_slist parameter
* of H5C_set_slist_enabled to TRUE.
*
* JRM -- 5/6/20
@@ -8461,13 +8461,13 @@ H5C__flush_marked_entries(H5F_t * f)
/* Flush all marked entries */
- if ( H5C_flush_cache(f, H5C__FLUSH_MARKED_ENTRIES_FLAG |
+ if ( H5C_flush_cache(f, H5C__FLUSH_MARKED_ENTRIES_FLAG |
H5C__FLUSH_IGNORE_PROTECTED_FLAG) < 0 )
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush cache")
/* Disable the slist. Set the clear_slist parameter to TRUE
- * since we called H5C_flush_cache() with the
+ * since we called H5C_flush_cache() with the
* H5C__FLUSH_MARKED_ENTRIES_FLAG.
*/
if ( H5C_set_slist_enabled(f->shared->cache, FALSE, TRUE) < 0 )
@@ -8480,34 +8480,34 @@ done:
} /* H5C__flush_marked_entries */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_cork
*
* Purpose: To cork/uncork/get cork status of an object depending on "action":
- * H5C__SET_CORK:
- * To cork the object
- * Return error if the object is already corked
- * H5C__UNCORK:
- * To uncork the obejct
- * Return error if the object is not corked
- * H5C__GET_CORKED:
- * To retrieve the cork status of an object in
- * the parameter "corked"
+ * H5C__SET_CORK:
+ * To cork the object
+ * Return error if the object is already corked
+ * H5C__UNCORK:
+ * To uncork the obejct
+ * Return error if the object is not corked
+ * H5C__GET_CORKED:
+ * To retrieve the cork status of an object in
+ * the parameter "corked"
*
* Return: Success: Non-negative
* Failure: Negative
*
* Programmer: Vailin Choi
- * January 2014
+ * January 2014
*
*-------------------------------------------------------------------------
*/
herr_t
H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
{
- H5C_tag_info_t *tag_info; /* Points to a tag info struct */
+ H5C_tag_info_t *tag_info; /* Points to a tag info struct */
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -8590,7 +8590,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_cork() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__mark_flush_dep_dirty()
*
@@ -8619,11 +8619,11 @@ H5C__mark_flush_dep_dirty(H5C_cache_entry_t * entry)
/* Iterate over the parent entries, if any */
for(u = 0; u < entry->flush_dep_nparents; u++) {
- /* Sanity check */
- HDassert(entry->flush_dep_parent[u]->flush_dep_ndirty_children < entry->flush_dep_parent[u]->flush_dep_nchildren);
+ /* Sanity check */
+ HDassert(entry->flush_dep_parent[u]->flush_dep_ndirty_children < entry->flush_dep_parent[u]->flush_dep_nchildren);
- /* Adjust the parent's number of dirty children */
- entry->flush_dep_parent[u]->flush_dep_ndirty_children++;
+ /* Adjust the parent's number of dirty children */
+ entry->flush_dep_parent[u]->flush_dep_ndirty_children++;
/* If the parent has a 'notify' callback, send a 'child entry dirtied' notice */
if(entry->flush_dep_parent[u]->type->notify &&
@@ -8635,7 +8635,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__mark_flush_dep_dirty() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__mark_flush_dep_clean()
*
@@ -8667,11 +8667,11 @@ H5C__mark_flush_dep_clean(H5C_cache_entry_t * entry)
* dependency - QAK, 2017/08/12
*/
for(i = ((int)entry->flush_dep_nparents) - 1; i >= 0; i--) {
- /* Sanity check */
- HDassert(entry->flush_dep_parent[i]->flush_dep_ndirty_children > 0);
+ /* Sanity check */
+ HDassert(entry->flush_dep_parent[i]->flush_dep_ndirty_children > 0);
- /* Adjust the parent's number of dirty children */
- entry->flush_dep_parent[i]->flush_dep_ndirty_children--;
+ /* Adjust the parent's number of dirty children */
+ entry->flush_dep_parent[i]->flush_dep_ndirty_children--;
/* If the parent has a 'notify' callback, send a 'child entry cleaned' notice */
if(entry->flush_dep_parent[i]->type->notify &&
@@ -8683,13 +8683,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__mark_flush_dep_clean() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__mark_flush_dep_serialized()
*
* Purpose: Decrement the flush_dep_nunser_children fields of all the
- * target entry's flush dependency parents in response to
- * the target entry becoming serialized.
+ * target entry's flush dependency parents in response to
+ * the target entry becoming serialized.
*
* Return: Non-negative on success/Negative on failure
*
@@ -8714,7 +8714,7 @@ H5C__mark_flush_dep_serialized(H5C_cache_entry_t * entry_ptr)
* dependency - QAK, 2017/08/12
*/
for(i = ((int)entry_ptr->flush_dep_nparents) - 1; i >= 0; i--) {
- /* Sanity checks */
+ /* Sanity checks */
HDassert(entry_ptr->flush_dep_parent);
HDassert(entry_ptr->flush_dep_parent[i]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(entry_ptr->flush_dep_parent[i]->flush_dep_nunser_children > 0);
@@ -8732,7 +8732,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__mark_flush_dep_serialized() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__mark_flush_dep_unserialized()
*
@@ -8779,7 +8779,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__mark_flush_dep_unserialized() */
-
+
#ifndef NDEBUG
/*-------------------------------------------------------------------------
* Function: H5C__assert_flush_dep_nocycle()
@@ -8813,46 +8813,46 @@ H5C__assert_flush_dep_nocycle(const H5C_cache_entry_t * entry,
/* Iterate over entry's parents (if any) */
for(u = 0; u < entry->flush_dep_nparents; u++)
- H5C__assert_flush_dep_nocycle(entry->flush_dep_parent[u], base_entry);
+ H5C__assert_flush_dep_nocycle(entry->flush_dep_parent[u], base_entry);
FUNC_LEAVE_NOAPI_VOID
} /* H5C__assert_flush_dep_nocycle() */
#endif /* NDEBUG */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__serialize_cache
*
- * Purpose: Serialize (i.e. construct an on disk image) for all entries
- * in the metadata cache including clean entries.
+ * Purpose: Serialize (i.e. construct an on disk image) for all entries
+ * in the metadata cache including clean entries.
*
- * Note that flush dependencies and "flush me last" flags
- * must be observed in the serialization process.
+ * Note that flush dependencies and "flush me last" flags
+ * must be observed in the serialization process.
*
- * Note also that entries may be loaded, flushed, evicted,
- * expunged, relocated, resized, or removed from the cache
- * during this process, just as these actions may occur during
- * a regular flush.
+ * Note also that entries may be loaded, flushed, evicted,
+ * expunged, relocated, resized, or removed from the cache
+ * during this process, just as these actions may occur during
+ * a regular flush.
*
- * However, we are given that the cache will contain no protected
- * entries on entry to this routine (although entries may be
- * briefly protected and then unprotected during the serialize
- * process).
+ * However, we are given that the cache will contain no protected
+ * entries on entry to this routine (although entries may be
+ * briefly protected and then unprotected during the serialize
+ * process).
*
- * The objective of this routine is serialize all entries and
- * to force all entries into their actual locations on disk.
+ * The objective of this routine is serialize all entries and
+ * to force all entries into their actual locations on disk.
*
- * The initial need for this routine is to settle all entries
- * in the cache prior to construction of the metadata cache
- * image so that the size of the cache image can be calculated.
- * However, I gather that other uses for the routine are
- * under consideration.
+ * The initial need for this routine is to settle all entries
+ * in the cache prior to construction of the metadata cache
+ * image so that the size of the cache image can be calculated.
+ * However, I gather that other uses for the routine are
+ * under consideration.
*
* Return: Non-negative on success/Negative on failure or if there was
- * a request to flush all items and something was protected.
+ * a request to flush all items and something was protected.
*
* Programmer: John Mainzer
- * 7/22/15
+ * 7/22/15
*
*-------------------------------------------------------------------------
*/
@@ -8928,9 +8928,9 @@ H5C__serialize_cache(H5F_t *f)
scan_ptr = cache_ptr->il_head;
while(scan_ptr != NULL) {
- HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- scan_ptr->serialization_count = 0;
- scan_ptr = scan_ptr->il_next;
+ HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ scan_ptr->serialization_count = 0;
+ scan_ptr = scan_ptr->il_next;
} /* end while */
} /* end block */
#endif /* NDEBUG */
@@ -8949,7 +8949,7 @@ H5C__serialize_cache(H5F_t *f)
*/
ring = H5C_RING_USER;
while(ring < H5C_RING_NTYPES) {
- HDassert(cache_ptr->close_warning_received);
+ HDassert(cache_ptr->close_warning_received);
switch(ring) {
case H5C_RING_USER:
break;
@@ -8993,10 +8993,10 @@ H5C__serialize_cache(H5F_t *f)
scan_ptr = cache_ptr->il_head;
while(scan_ptr != NULL) {
- HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(scan_ptr->serialization_count <= 1);
+ HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(scan_ptr->serialization_count <= 1);
- scan_ptr = scan_ptr->il_next;
+ scan_ptr = scan_ptr->il_next;
} /* end while */
} /* end block */
#endif /* NDEBUG */
@@ -9006,7 +9006,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__serialize_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__serialize_ring
*
@@ -9017,16 +9017,16 @@ done:
* If the cache contains protected entries in the specified
* ring, the function will fail, as protected entries cannot
* be serialized. However all unprotected entries in the
- * target ring should be serialized before the function
- * returns failure.
+ * target ring should be serialized before the function
+ * returns failure.
*
* If flush dependencies appear in the target ring, the
* function makes repeated passes through the index list
- * serializing entries in flush dependency order.
+ * serializing entries in flush dependency order.
*
- * All entries outside the H5C_RING_SBE are marked for
- * inclusion in the cache image. Entries in H5C_RING_SBE
- * and below are marked for exclusion from the image.
+ * All entries outside the H5C_RING_SBE are marked for
+ * inclusion in the cache image. Entries in H5C_RING_SBE
+ * and below are marked for exclusion from the image.
*
* Return: Non-negative on success/Negative on failure or if there was
* a request to flush all items and something was protected.
@@ -9039,7 +9039,7 @@ done:
static herr_t
H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
{
- hbool_t done = FALSE;
+ hbool_t done = FALSE;
H5C_t * cache_ptr;
H5C_cache_entry_t * entry_ptr;
herr_t ret_value = SUCCEED;
@@ -9138,45 +9138,45 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
* and serialize callbacks.
*/
cache_ptr->entries_loaded_counter = 0;
- cache_ptr->entries_inserted_counter = 0;
+ cache_ptr->entries_inserted_counter = 0;
cache_ptr->entries_relocated_counter = 0;
- done = TRUE; /* set to FALSE if any activity in inner loop */
- entry_ptr = cache_ptr->il_head;
- while(entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ done = TRUE; /* set to FALSE if any activity in inner loop */
+ entry_ptr = cache_ptr->il_head;
+ while(entry_ptr != NULL) {
+ HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- /* Verify that either the entry is already serialized, or
+ /* Verify that either the entry is already serialized, or
* that it is assigned to either the target or an inner
* ring.
*/
HDassert((entry_ptr->ring >= ring) || (entry_ptr->image_up_to_date));
- /* Skip flush me last entries or inner ring entries */
- if(!entry_ptr->flush_me_last && entry_ptr->ring == ring) {
+ /* Skip flush me last entries or inner ring entries */
+ if(!entry_ptr->flush_me_last && entry_ptr->ring == ring) {
- /* if we encounter an unserialized entry in the current
+ /* if we encounter an unserialized entry in the current
* ring that is not marked flush me last, we are not done.
*/
- if(!entry_ptr->image_up_to_date)
- done = FALSE;
+ if(!entry_ptr->image_up_to_date)
+ done = FALSE;
- /* Serialize the entry if its image is not up to date
+ /* Serialize the entry if its image is not up to date
* and it has no unserialized flush dependency children.
*/
- if(!entry_ptr->image_up_to_date && entry_ptr->flush_dep_nunser_children == 0) {
- HDassert(entry_ptr->serialization_count == 0);
+ if(!entry_ptr->image_up_to_date && entry_ptr->flush_dep_nunser_children == 0) {
+ HDassert(entry_ptr->serialization_count == 0);
- /* Serialize the entry */
- if(H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed")
+ /* Serialize the entry */
+ if(H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed")
HDassert(entry_ptr->flush_dep_nunser_children == 0);
- HDassert(entry_ptr->serialization_count == 0);
+ HDassert(entry_ptr->serialization_count == 0);
#ifndef NDEBUG
/* Increment serialization counter (to detect multiple serializations) */
- entry_ptr->serialization_count++;
+ entry_ptr->serialization_count++;
#endif /* NDEBUG */
} /* end if */
} /* end if */
@@ -9192,7 +9192,7 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
/* Reset the counters */
cache_ptr->entries_loaded_counter = 0;
- cache_ptr->entries_inserted_counter = 0;
+ cache_ptr->entries_inserted_counter = 0;
cache_ptr->entries_relocated_counter = 0;
/* Restart scan */
@@ -9200,8 +9200,8 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
} /* end if */
else
/* Advance to next entry */
- entry_ptr = entry_ptr->il_next;
- } /* while ( entry_ptr != NULL ) */
+ entry_ptr = entry_ptr->il_next;
+ } /* while ( entry_ptr != NULL ) */
} /* while ( ! done ) */
@@ -9210,7 +9210,7 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
* and serialize callbacks.
*/
cache_ptr->entries_loaded_counter = 0;
- cache_ptr->entries_inserted_counter = 0;
+ cache_ptr->entries_inserted_counter = 0;
cache_ptr->entries_relocated_counter = 0;
/* At this point, all entries not marked "flush me last" and in
@@ -9221,43 +9221,43 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
*/
entry_ptr = cache_ptr->il_head;
while(entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring > H5C_RING_UNDEFINED);
+ HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(entry_ptr->ring > H5C_RING_UNDEFINED);
HDassert(entry_ptr->ring < H5C_RING_NTYPES);
HDassert((entry_ptr->ring >= ring) || (entry_ptr->image_up_to_date));
- if(entry_ptr->ring == ring) {
- if(entry_ptr->flush_me_last) {
- if(!entry_ptr->image_up_to_date) {
- HDassert(entry_ptr->serialization_count == 0);
+ if(entry_ptr->ring == ring) {
+ if(entry_ptr->flush_me_last) {
+ if(!entry_ptr->image_up_to_date) {
+ HDassert(entry_ptr->serialization_count == 0);
HDassert(entry_ptr->flush_dep_nunser_children == 0);
- /* Serialize the entry */
- if(H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed")
+ /* Serialize the entry */
+ if(H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed")
/* Check for the cache changing */
if((cache_ptr->entries_loaded_counter > 0) ||
(cache_ptr->entries_inserted_counter > 0) ||
(cache_ptr->entries_relocated_counter > 0))
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "flush_me_last entry serialization triggered restart")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "flush_me_last entry serialization triggered restart")
HDassert(entry_ptr->flush_dep_nunser_children == 0);
- HDassert(entry_ptr->serialization_count == 0);
+ HDassert(entry_ptr->serialization_count == 0);
#ifndef NDEBUG
/* Increment serialization counter (to detect multiple serializations) */
- entry_ptr->serialization_count++;
+ entry_ptr->serialization_count++;
#endif /* NDEBUG */
} /* end if */
} /* end if */
else {
- HDassert(entry_ptr->image_up_to_date);
- HDassert(entry_ptr->serialization_count <= 1);
+ HDassert(entry_ptr->image_up_to_date);
+ HDassert(entry_ptr->serialization_count <= 1);
HDassert(entry_ptr->flush_dep_nunser_children == 0);
} /* end else */
} /* if ( entry_ptr->ring == ring ) */
- entry_ptr = entry_ptr->il_next;
+ entry_ptr = entry_ptr->il_next;
} /* while ( entry_ptr != NULL ) */
done:
@@ -9265,12 +9265,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__serialize_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__serialize_single_entry
*
* Purpose: Serialize the cache entry pointed to by the entry_ptr
- * parameter.
+ * parameter.
*
* Return: Non-negative on success/Negative on failure
*
@@ -9281,7 +9281,7 @@ done:
static herr_t
H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -9327,7 +9327,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__serialize_single_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__generate_image
*
@@ -9347,7 +9347,7 @@ done:
* Programmer: Mohamad Chaarawi
* 2/10/16
*
- * Changes: Updated sanity checks for the possibility that the skip
+ * Changes: Updated sanity checks for the possibility that the skip
* list is disabled.
* JRM 5/16/20
*
@@ -9381,8 +9381,8 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
/* Call client's pre-serialize callback, if there's one */
if ( ( entry_ptr->type->pre_serialize ) &&
( (entry_ptr->type->pre_serialize)(f, (void *)entry_ptr,
- entry_ptr->addr, entry_ptr->size,
- &new_addr, &new_len,
+ entry_ptr->addr, entry_ptr->size,
+ &new_addr, &new_len,
&serialize_flags) < 0 ) )
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
@@ -9392,7 +9392,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
if ( serialize_flags != H5C__SERIALIZE_NO_FLAGS_SET ) {
/* Check for unexpected flags from serialize callback */
- if ( serialize_flags & ~(H5C__SERIALIZE_RESIZED_FLAG |
+ if ( serialize_flags & ~(H5C__SERIALIZE_RESIZED_FLAG |
H5C__SERIALIZE_MOVED_FLAG) )
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \
@@ -9432,7 +9432,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
#endif
/* If required, resize the buffer and update the entry and the cache
- * data structures
+ * data structures
*/
if ( serialize_flags & H5C__SERIALIZE_RESIZED_FLAG ) {
@@ -9440,15 +9440,15 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
HDassert(new_len > 0);
/* Allocate a new image buffer */
- if ( NULL == (entry_ptr->image_ptr =
- H5MM_realloc(entry_ptr->image_ptr,
+ if ( NULL == (entry_ptr->image_ptr =
+ H5MM_realloc(entry_ptr->image_ptr,
new_len + H5C_IMAGE_EXTRA_SPACE)) )
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, \
"memory allocation failed for on disk image buffer")
#if H5C_DO_MEMORY_SANITY_CHECKS
- H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + new_len,
+ H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + new_len,
H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
@@ -9469,8 +9469,8 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
/* As we haven't updated the cache data structures for
* for the flush or flush destroy yet, the entry should
- * be in the slist if the slist is enabled. Since
- * H5C__UPDATE_SLIST_FOR_SIZE_CHANGE() is a no-op if the
+ * be in the slist if the slist is enabled. Since
+ * H5C__UPDATE_SLIST_FOR_SIZE_CHANGE() is a no-op if the
* slist is enabled, call it un-conditionally.
*/
HDassert(entry_ptr->is_dirty);
@@ -9515,7 +9515,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
} /* end if(serialize_flags != H5C__SERIALIZE_NO_FLAGS_SET) */
/* Serialize object into buffer */
- if ( entry_ptr->type->serialize(f, entry_ptr->image_ptr, entry_ptr->size,
+ if ( entry_ptr->type->serialize(f, entry_ptr->image_ptr, entry_ptr->size,
(void *)entry_ptr) < 0 )
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to serialize entry")
@@ -9547,13 +9547,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__generate_image */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_remove_entry
*
* Purpose: Remove an entry from the cache. Must be not protected, pinned,
- * dirty, involved in flush dependencies, etc.
+ * dirty, involved in flush dependencies, etc.
*
* Return: Non-negative on success/Negative on failure
*
@@ -9617,10 +9617,10 @@ H5C_remove_entry(void *_entry)
/* Update the cache internal data structures as appropriate for a destroy.
* Specifically:
- * 1) Delete it from the index
- * 2) Delete it from the collective read access list
- * 3) Update the replacement policy for eviction
- * 4) Remove it from the tag list for this object
+ * 1) Delete it from the index
+ * 2) Delete it from the collective read access list
+ * 3) Update the replacement policy for eviction
+ * 4) Remove it from the tag list for this object
*/
H5C__DELETE_FROM_INDEX(cache, entry, FAIL)
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index 1226aa6..e7b50ba 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -17,13 +17,13 @@
* Purpose: This file contains declarations which are normally visible
* only within the H5C package.
*
- * Source files outside the H5C package should include
- * H5Cprivate.h instead.
+ * Source files outside the H5C package should include
+ * H5Cprivate.h instead.
*
- * The one exception to this rule is test/cache.c. The test
- * code is easier to write if it can look at the cache's
- * internal data structures. Indeed, this is the main
- * reason why this file was created.
+ * The one exception to this rule is test/cache.c. The test
+ * code is easier to write if it can look at the cache's
+ * internal data structures. Indeed, this is the main
+ * reason why this file was created.
*/
#if !(defined H5C_FRIEND || defined H5C_MODULE)
@@ -50,7 +50,7 @@
/* Cache configuration settings */
#define H5C__HASH_TABLE_LEN (64 * 1024) /* must be a power of 2 */
-#define H5C__H5C_T_MAGIC 0x005CAC0E
+#define H5C__H5C_T_MAGIC 0x005CAC0E
/* Initial allocated size of the "flush_dep_parent" array */
@@ -81,7 +81,7 @@
* to the HGOTO_ERROR macro, which may not be appropriate in all cases.
* If so, we will need versions of the insertion and deletion macros which
* do not reference the sanity checking macros.
- * JRM - 5/5/04
+ * JRM - 5/5/04
*
* Changes:
*
@@ -156,19 +156,20 @@
* sanity checking macros. These macro are used to update the size of
* a DLL when one of its entries changes size.
*
- * JRM - 9/8/05
+ * JRM - 9/8/05
*
* - Added macros supporting the index list -- a doubly liked list of
* all entries in the index. This list is necessary to reduce the
* cost of visiting all entries in the cache, which was previously
* done via a scan of the hash table.
*
- * JRM - 10/15/15
+ * JRM - 10/15/15
*
****************************************************************************/
#if H5C_DO_SANITY_CHECKS
+/* clang-format off */
#define H5C__DLL_PRE_REMOVE_SC(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \
if ( ( (head_ptr) == NULL ) || \
( (tail_ptr) == NULL ) || \
@@ -246,6 +247,7 @@ if ( ( (new_size) > (dll_size) ) || \
( ( (dll_len) == 1 ) && ( (new_size) != (dll_size) ) ) ) { \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "DLL post size update SC failed") \
}
+/* clang-format on */
#else /* H5C_DO_SANITY_CHECKS */
@@ -334,6 +336,7 @@ if ( ( (new_size) > (dll_size) ) || \
#if H5C_DO_SANITY_CHECKS
+/* clang-format off */
#define H5C__AUX_DLL_PRE_REMOVE_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \
if ( ( (hd_ptr) == NULL ) || \
( (tail_ptr) == NULL ) || \
@@ -395,6 +398,7 @@ if ( ( (entry_ptr) == NULL ) || \
) { \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "AUX DLL pre insert SC failed") \
}
+/* clang-format on */
#else /* H5C_DO_SANITY_CHECKS */
@@ -471,6 +475,7 @@ if ( ( (entry_ptr) == NULL ) || \
#if H5C_DO_SANITY_CHECKS
+/* clang-format off */
#define H5C__IL_DLL_PRE_REMOVE_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \
if ( ( (hd_ptr) == NULL ) || \
( (tail_ptr) == NULL ) || \
@@ -533,6 +538,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
HDassert(0 && "IL DLL sanity check failed"); \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "IL DLL sanity check failed") \
}
+/* clang-format on */
#else /* H5C_DO_SANITY_CHECKS */
@@ -591,7 +597,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
H5C__IL_DLL_SC(head_ptr, tail_ptr, len, Size, fv) \
} /* H5C__IL_DLL_REMOVE() */
-
+
/***********************************************************************
*
* Stats collection macros
@@ -613,6 +619,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
#if H5C_COLLECT_CACHE_STATS
+/* clang-format off */
#define H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \
if ( (cache_ptr)->index_size > (cache_ptr)->max_index_size ) \
(cache_ptr)->max_index_size = (cache_ptr)->index_size; \
@@ -624,70 +631,71 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
(cache_ptr)->max_dirty_index_size ) \
(cache_ptr)->max_dirty_index_size = \
(cache_ptr)->dirty_index_size;
+/* clang-format on */
#define H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr) \
- (((cache_ptr)->dirty_pins)[(entry_ptr)->type->id])++;
+ (((cache_ptr)->dirty_pins)[(entry_ptr)->type->id])++;
#define H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr) \
if ( (cache_ptr)->slist_len > (cache_ptr)->max_slist_len ) \
- (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \
+ (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \
if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \
- (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \
- if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
- (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
- if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \
- (cache_ptr)->max_pel_size = (cache_ptr)->pel_size;
+ (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \
+ if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
+ (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
+ if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \
+ (cache_ptr)->max_pel_size = (cache_ptr)->pel_size;
#define H5C__UPDATE_STATS_FOR_MOVE(cache_ptr, entry_ptr) \
- if ( cache_ptr->flush_in_progress ) \
+ if ( cache_ptr->flush_in_progress ) \
((cache_ptr)->cache_flush_moves[(entry_ptr)->type->id])++; \
if ( entry_ptr->flush_in_progress ) \
((cache_ptr)->entry_flush_moves[(entry_ptr)->type->id])++; \
- (((cache_ptr)->moves)[(entry_ptr)->type->id])++; \
+ (((cache_ptr)->moves)[(entry_ptr)->type->id])++; \
(cache_ptr)->entries_relocated_counter++;
#define H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size)\
- if ( cache_ptr->flush_in_progress ) \
+ if ( cache_ptr->flush_in_progress ) \
((cache_ptr)->cache_flush_size_changes[(entry_ptr)->type->id])++; \
if ( entry_ptr->flush_in_progress ) \
((cache_ptr)->entry_flush_size_changes[(entry_ptr)->type->id])++; \
- if ( (entry_ptr)->size < (new_size) ) { \
- ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \
+ if ( (entry_ptr)->size < (new_size) ) { \
+ ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \
H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \
if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \
(cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \
if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \
(cache_ptr)->max_pl_size = (cache_ptr)->pl_size; \
- } else if ( (entry_ptr)->size > (new_size) ) { \
- ((cache_ptr)->size_decreases[(entry_ptr)->type->id])++; \
- }
+ } else if ( (entry_ptr)->size > (new_size) ) { \
+ ((cache_ptr)->size_decreases[(entry_ptr)->type->id])++; \
+ }
#define H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \
- (cache_ptr)->total_ht_insertions++;
+ (cache_ptr)->total_ht_insertions++;
#define H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \
- (cache_ptr)->total_ht_deletions++;
+ (cache_ptr)->total_ht_deletions++;
#define H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, success, depth) \
- if ( success ) { \
- (cache_ptr)->successful_ht_searches++; \
- (cache_ptr)->total_successful_ht_search_depth += depth; \
- } else { \
- (cache_ptr)->failed_ht_searches++; \
- (cache_ptr)->total_failed_ht_search_depth += depth; \
- }
+ if ( success ) { \
+ (cache_ptr)->successful_ht_searches++; \
+ (cache_ptr)->total_successful_ht_search_depth += depth; \
+ } else { \
+ (cache_ptr)->failed_ht_searches++; \
+ (cache_ptr)->total_failed_ht_search_depth += depth; \
+ }
#define H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr) \
- ((cache_ptr)->unpins)[(entry_ptr)->type->id]++;
+ ((cache_ptr)->unpins)[(entry_ptr)->type->id]++;
#define H5C__UPDATE_STATS_FOR_SLIST_SCAN_RESTART(cache_ptr) \
- ((cache_ptr)->slist_scan_restarts)++;
+ ((cache_ptr)->slist_scan_restarts)++;
#define H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) \
- ((cache_ptr)->LRU_scan_restarts)++;
+ ((cache_ptr)->LRU_scan_restarts)++;
#define H5C__UPDATE_STATS_FOR_INDEX_SCAN_RESTART(cache_ptr) \
- ((cache_ptr)->index_scan_restarts)++;
+ ((cache_ptr)->index_scan_restarts)++;
#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_CREATE(cache_ptr) \
{ \
@@ -747,6 +755,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
((entry_ptr)->flushes)++; \
}
+/* clang-format off */
#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr, take_ownership) \
{ \
if ( take_ownership ) \
@@ -913,6 +922,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \
(cache_ptr)->max_pl_size = (cache_ptr)->pl_size; \
}
+/* clang-format on */
#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) \
{ \
@@ -953,7 +963,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
#endif /* H5C_COLLECT_CACHE_STATS */
-
+
/***********************************************************************
*
* Hash table access and manipulation macros:
@@ -970,13 +980,13 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
* the clean_index_size and dirty_index_size fields of H5C_t. Also
* added macros to allow us to track entry cleans and dirties.
*
- * JRM -- 11/5/08
+ * JRM -- 11/5/08
*
* - Updated existing index macros and sanity check macros to maintain
* the index_ring_len, index_ring_size, clean_index_ring_size, and
* dirty_index_ring_size fields of H5C_t.
*
- * JRM -- 9/1/15
+ * JRM -- 9/1/15
*
* - Updated existing index macros and sanity checks macros to
* maintain an doubly linked list of all entries in the index.
@@ -990,12 +1000,13 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
/* H5C__HASH_TABLE_LEN is defined in H5Cpkg.h. It mut be a power of two. */
-#define H5C__HASH_MASK ((size_t)(H5C__HASH_TABLE_LEN - 1) << 3)
+#define H5C__HASH_MASK ((size_t)(H5C__HASH_TABLE_LEN - 1) << 3)
-#define H5C__HASH_FCN(x) (int)((unsigned)((x) & H5C__HASH_MASK) >> 3)
+#define H5C__HASH_FCN(x) (int)((unsigned)((x) & H5C__HASH_MASK) >> 3)
#if H5C_DO_SANITY_CHECKS
+/* clang-format off */
#define H5C__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \
if ( ( (cache_ptr) == NULL ) || \
( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \
@@ -1008,7 +1019,7 @@ if ( ( (cache_ptr) == NULL ) || \
( H5C__HASH_FCN((entry_ptr)->addr) >= H5C__HASH_TABLE_LEN ) || \
( (cache_ptr)->index_size != \
((cache_ptr)->clean_index_size + \
- (cache_ptr)->dirty_index_size) ) || \
+ (cache_ptr)->dirty_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \
( (entry_ptr)->ring <= H5C_RING_UNDEFINED ) || \
@@ -1031,7 +1042,7 @@ if ( ( (cache_ptr) == NULL ) || \
( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \
( (cache_ptr)->index_size != \
((cache_ptr)->clean_index_size + \
- (cache_ptr)->dirty_index_size) ) || \
+ (cache_ptr)->dirty_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \
( (cache_ptr)->index_ring_len[(entry_ptr)->ring] == 0 ) || \
@@ -1068,7 +1079,7 @@ if ( ( (cache_ptr) == NULL ) || \
( (entry_ptr)->ht_prev != NULL ) ) || \
( (cache_ptr)->index_size != \
((cache_ptr)->clean_index_size + \
- (cache_ptr)->dirty_index_size) ) || \
+ (cache_ptr)->dirty_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \
( (entry_ptr)->ring <= H5C_RING_UNDEFINED ) || \
@@ -1099,7 +1110,7 @@ if ( ( (cache_ptr) == NULL ) || \
( (entry_ptr)->ht_prev != NULL ) || \
( (cache_ptr)->index_size != \
((cache_ptr)->clean_index_size + \
- (cache_ptr)->dirty_index_size) ) || \
+ (cache_ptr)->dirty_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \
( (cache_ptr)->index_ring_len[(entry_ptr)->ring] > \
@@ -1158,7 +1169,7 @@ if ( ( (cache_ptr) == NULL ) || \
}
#define H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr, was_clean) \
+ entry_ptr, was_clean) \
if ( ( (cache_ptr) == NULL ) || \
( (cache_ptr)->index_len <= 0 ) || \
( (cache_ptr)->index_size <= 0 ) || \
@@ -1172,9 +1183,9 @@ if ( ( (cache_ptr) == NULL ) || \
( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \
( ( !( was_clean ) || \
- ( (cache_ptr)->clean_index_size < (old_size) ) ) && \
- ( ( (was_clean) ) || \
- ( (cache_ptr)->dirty_index_size < (old_size) ) ) ) || \
+ ( (cache_ptr)->clean_index_size < (old_size) ) ) && \
+ ( ( (was_clean) ) || \
+ ( (cache_ptr)->dirty_index_size < (old_size) ) ) ) || \
( (entry_ptr) == NULL ) || \
( (entry_ptr)->ring <= H5C_RING_UNDEFINED ) || \
( (entry_ptr)->ring >= H5C_RING_NTYPES ) || \
@@ -1193,20 +1204,20 @@ if ( ( (cache_ptr) == NULL ) || \
}
#define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr) \
+ entry_ptr) \
if ( ( (cache_ptr) == NULL ) || \
( (cache_ptr)->index_len <= 0 ) || \
( (cache_ptr)->index_size <= 0 ) || \
( (new_size) > (cache_ptr)->index_size ) || \
( (cache_ptr)->index_size != \
- ((cache_ptr)->clean_index_size + \
+ ((cache_ptr)->clean_index_size + \
(cache_ptr)->dirty_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \
( ( !((entry_ptr)->is_dirty ) || \
- ( (cache_ptr)->dirty_index_size < (new_size) ) ) && \
- ( ( ((entry_ptr)->is_dirty) ) || \
- ( (cache_ptr)->clean_index_size < (new_size) ) ) ) || \
+ ( (cache_ptr)->dirty_index_size < (new_size) ) ) && \
+ ( ( ((entry_ptr)->is_dirty) ) || \
+ ( (cache_ptr)->clean_index_size < (new_size) ) ) ) || \
( ( (cache_ptr)->index_len == 1 ) && \
( (cache_ptr)->index_size != (new_size) ) ) || \
( (cache_ptr)->index_ring_len[(entry_ptr)->ring] > \
@@ -1307,6 +1318,7 @@ if ( ( (cache_ptr)->index_size != \
HDassert(FALSE); \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "post HT update for entry dirty SC failed") \
}
+/* clang-format on */
#else /* H5C_DO_SANITY_CHECKS */
@@ -1320,15 +1332,16 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr)
#define H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr)
#define H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr, was_clean)
+ entry_ptr, was_clean)
#define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr)
+ entry_ptr)
#define H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr)
#define H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr)
#endif /* H5C_DO_SANITY_CHECKS */
+/* clang-format off */
#define H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, fail_val) \
{ \
int k; \
@@ -1462,10 +1475,10 @@ if ( ( (cache_ptr)->index_size != \
H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr); \
(cache_ptr)->dirty_index_size -= (entry_ptr)->size; \
((cache_ptr)->dirty_index_ring_size[entry_ptr->ring]) \
- -= (entry_ptr)->size; \
+ -= (entry_ptr)->size; \
(cache_ptr)->clean_index_size += (entry_ptr)->size; \
((cache_ptr)->clean_index_ring_size[entry_ptr->ring]) \
- += (entry_ptr)->size; \
+ += (entry_ptr)->size; \
H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr); \
}
@@ -1474,18 +1487,18 @@ if ( ( (cache_ptr)->index_size != \
H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr); \
(cache_ptr)->clean_index_size -= (entry_ptr)->size; \
((cache_ptr)->clean_index_ring_size[entry_ptr->ring]) \
- -= (entry_ptr)->size; \
+ -= (entry_ptr)->size; \
(cache_ptr)->dirty_index_size += (entry_ptr)->size; \
((cache_ptr)->dirty_index_ring_size[entry_ptr->ring]) \
- += (entry_ptr)->size; \
+ += (entry_ptr)->size; \
H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr); \
}
#define H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size, \
- entry_ptr, was_clean) \
+ entry_ptr, was_clean) \
{ \
H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr, was_clean) \
+ entry_ptr, was_clean) \
(cache_ptr)->index_size -= (old_size); \
(cache_ptr)->index_size += (new_size); \
((cache_ptr)->index_ring_size[entry_ptr->ring]) -= (old_size); \
@@ -1494,14 +1507,14 @@ if ( ( (cache_ptr)->index_size != \
(cache_ptr)->clean_index_size -= (old_size); \
((cache_ptr)->clean_index_ring_size[entry_ptr->ring])-= (old_size); \
} else { \
- (cache_ptr)->dirty_index_size -= (old_size); \
+ (cache_ptr)->dirty_index_size -= (old_size); \
((cache_ptr)->dirty_index_ring_size[entry_ptr->ring])-= (old_size); \
} \
if((entry_ptr)->is_dirty) { \
(cache_ptr)->dirty_index_size += (new_size); \
((cache_ptr)->dirty_index_ring_size[entry_ptr->ring])+= (new_size); \
} else { \
- (cache_ptr)->clean_index_size += (new_size); \
+ (cache_ptr)->clean_index_size += (new_size); \
((cache_ptr)->clean_index_ring_size[entry_ptr->ring])+= (new_size); \
} \
H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->il_len, \
@@ -1510,8 +1523,9 @@ if ( ( (cache_ptr)->index_size != \
H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
entry_ptr) \
}
+/* clang-format on */
+
-
/**************************************************************************
*
* Skip list insertion and deletion macros:
@@ -1523,11 +1537,11 @@ if ( ( (cache_ptr)->index_size != \
/*-------------------------------------------------------------------------
*
- * Macro: H5C__INSERT_ENTRY_IN_SLIST
+ * Macro: H5C__INSERT_ENTRY_IN_SLIST
*
* Purpose: Insert the specified instance of H5C_cache_entry_t into
- * the skip list in the specified instance of H5C_t. Update
- * the associated length and size fields.
+ * the skip list in the specified instance of H5C_t. Update
+ * the associated length and size fields.
*
* Return: N/A
*
@@ -1535,66 +1549,66 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 7/21/04
- * Updated function to set the in_tree flag when inserting
- * an entry into the tree. Also modified the function to
- * update the tree size and len fields instead of the similar
- * index fields.
+ * JRM -- 7/21/04
+ * Updated function to set the in_tree flag when inserting
+ * an entry into the tree. Also modified the function to
+ * update the tree size and len fields instead of the similar
+ * index fields.
*
- * All of this is part of the modifications to support the
- * hash table.
+ * All of this is part of the modifications to support the
+ * hash table.
*
- * JRM -- 7/27/04
- * Converted the function H5C_insert_entry_in_tree() into
- * the macro H5C__INSERT_ENTRY_IN_TREE in the hopes of
- * wringing a little more speed out of the cache.
+ * JRM -- 7/27/04
+ * Converted the function H5C_insert_entry_in_tree() into
+ * the macro H5C__INSERT_ENTRY_IN_TREE in the hopes of
+ * wringing a little more speed out of the cache.
*
- * Note that we don't bother to check if the entry is already
- * in the tree -- if it is, H5SL_insert() will fail.
+ * Note that we don't bother to check if the entry is already
+ * in the tree -- if it is, H5SL_insert() will fail.
*
- * QAK -- 11/27/04
- * Switched over to using skip list routines.
+ * QAK -- 11/27/04
+ * Switched over to using skip list routines.
*
- * JRM -- 6/27/06
- * Added fail_val parameter.
+ * JRM -- 6/27/06
+ * Added fail_val parameter.
*
- * JRM -- 8/25/06
- * Added the H5C_DO_SANITY_CHECKS version of the macro.
+ * JRM -- 8/25/06
+ * Added the H5C_DO_SANITY_CHECKS version of the macro.
*
- * This version maintains the slist_len_increase and
- * slist_size_increase fields that are used in sanity
- * checks in the flush routines.
+ * This version maintains the slist_len_increase and
+ * slist_size_increase fields that are used in sanity
+ * checks in the flush routines.
*
- * All this is needed as the fractal heap needs to be
- * able to dirty, resize and/or move entries during the
- * flush.
+ * All this is needed as the fractal heap needs to be
+ * able to dirty, resize and/or move entries during the
+ * flush.
*
- * JRM -- 12/13/14
- * Added code to set cache_ptr->slist_changed to TRUE
- * when an entry is inserted in the slist.
+ * JRM -- 12/13/14
+ * Added code to set cache_ptr->slist_changed to TRUE
+ * when an entry is inserted in the slist.
*
- * JRM -- 9/1/15
- * Added code to maintain the cache_ptr->slist_ring_len
- * and cache_ptr->slist_ring_size arrays.
+ * JRM -- 9/1/15
+ * Added code to maintain the cache_ptr->slist_ring_len
+ * and cache_ptr->slist_ring_size arrays.
*
* JRM -- 4/29/20
- * Reworked macro to support the slist_enabled field
- * of H5C_t. If slist_enabled == TRUE, the macro
+ * Reworked macro to support the slist_enabled field
+ * of H5C_t. If slist_enabled == TRUE, the macro
* functions as before. Otherwise, the macro is a no-op,
* and the slist must be empty.
*
*-------------------------------------------------------------------------
*/
-/* NOTE: The H5C__INSERT_ENTRY_IN_SLIST() macro is set up so that
- *
- * H5C_DO_SANITY_CHECKS
+/* NOTE: The H5C__INSERT_ENTRY_IN_SLIST() macro is set up so that
*
- * and
+ * H5C_DO_SANITY_CHECKS
*
- * H5C_DO_SLIST_SANITY_CHECKS
+ * and
*
- * can be selected independantly. This is easy to miss as the
+ * H5C_DO_SLIST_SANITY_CHECKS
+ *
+ * can be selected independantly. This is easy to miss as the
* two #defines are easy to confuse.
*/
@@ -1701,7 +1715,7 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_DO_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__REMOVE_ENTRY_FROM_SLIST
@@ -1736,8 +1750,8 @@ if ( ( (cache_ptr)->index_size != \
* when an entry is removed from the slist.
*
* JRM -- 4/29/20
- * Reworked macro to support the slist_enabled field
- * of H5C_t. If slist_enabled == TRUE, the macro
+ * Reworked macro to support the slist_enabled field
+ * of H5C_t. If slist_enabled == TRUE, the macro
* functions as before. Otherwise, the macro is a no-op,
* and the slist must be empty.
*
@@ -1839,7 +1853,7 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_DO_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__UPDATE_SLIST_FOR_SIZE_CHANGE
@@ -1873,8 +1887,8 @@ if ( ( (cache_ptr)->index_size != \
* and cache_ptr->slist_ring_size arrays.
*
* JRM -- 4/29/20
- * Reworked macro to support the slist_enabled field
- * of H5C_t. If slist_enabled == TRUE, the macro
+ * Reworked macro to support the slist_enabled field
+ * of H5C_t. If slist_enabled == TRUE, the macro
* functions as before. Otherwise, the macro is a no-op,
* and the slist must be empty.
*
@@ -1969,7 +1983,7 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_DO_SANITY_CHECKS */
-
+
/**************************************************************************
*
* Replacement policy update macros:
@@ -1981,18 +1995,18 @@ if ( ( (cache_ptr)->index_size != \
/*-------------------------------------------------------------------------
*
- * Macro: H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS
+ * Macro: H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS
*
* Purpose: For efficiency, we sometimes change the order of flushes --
- * but doing so can confuse the replacement policy. This
- * macro exists to allow us to specify an entry as the
- * most recently touched so we can repair any such
- * confusion.
+ * but doing so can confuse the replacement policy. This
+ * macro exists to allow us to specify an entry as the
+ * most recently touched so we can repair any such
+ * confusion.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the macro
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the macro
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2000,15 +2014,15 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 3/20/06
- * Modified macro to ignore pinned entries. Pinned entries
- * do not appear in the data structures maintained by the
- * replacement policy code, and thus this macro has nothing
- * to do if called for such an entry.
+ * JRM -- 3/20/06
+ * Modified macro to ignore pinned entries. Pinned entries
+ * do not appear in the data structures maintained by the
+ * replacement policy code, and thus this macro has nothing
+ * to do if called for such an entry.
*
- * JRM -- 3/28/07
- * Added sanity checks using the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM -- 3/28/07
+ * Added sanity checks using the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2030,16 +2044,16 @@ if ( ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head.\
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* Use the dirty flag to infer whether the entry is on the clean or \
@@ -2093,16 +2107,16 @@ if ( ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head \
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2111,18 +2125,18 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_EVICTION
+ * Macro: H5C__UPDATE_RP_FOR_EVICTION
*
* Purpose: Update the replacement policy data structures for an
- * eviction of the specified cache entry.
+ * eviction of the specified cache entry.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -2130,27 +2144,27 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_eviction() to the
- * macro H5C__UPDATE_RP_FOR_EVICTION in an effort to squeeze
- * a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_eviction() to the
+ * macro H5C__UPDATE_RP_FOR_EVICTION in an effort to squeeze
+ * a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * the pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * the pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two version, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two version, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/20/06
- * Pinned entries can't be evicted, so this entry should never
- * be called on a pinned entry. Added assert to verify this.
+ * JRM - 3/20/06
+ * Pinned entries can't be evicted, so this entry should never
+ * be called on a pinned entry. Added assert to verify this.
*
- * JRM -- 3/28/07
- * Added sanity checks for the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM -- 3/28/07
+ * Added sanity checks for the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2222,18 +2236,18 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_FLUSH
+ * Macro: H5C__UPDATE_RP_FOR_FLUSH
*
* Purpose: Update the replacement policy data structures for a flush
- * of the specified cache entry.
+ * of the specified cache entry.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2241,29 +2255,29 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_flush() to the
- * macro H5C__UPDATE_RP_FOR_FLUSH in an effort to squeeze
- * a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_flush() to the
+ * macro H5C__UPDATE_RP_FOR_FLUSH in an effort to squeeze
+ * a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two versions, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two versions, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/20/06
- * While pinned entries can be flushed, they don't reside in
- * the replacement policy data structures when unprotected.
- * Thus I modified this macro to do nothing if the entry is
- * pinned.
+ * JRM - 3/20/06
+ * While pinned entries can be flushed, they don't reside in
+ * the replacement policy data structures when unprotected.
+ * Thus I modified this macro to do nothing if the entry is
+ * pinned.
*
- * JRM - 3/28/07
- * Added sanity checks based on the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM - 3/28/07
+ * Added sanity checks based on the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2285,28 +2299,28 @@ if ( ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the \
- * head. \
- */ \
+ * head. \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* since the entry is being flushed or cleared, one would think \
- * that it must be dirty -- but that need not be the case. Use the \
- * dirty flag to infer whether the entry is on the clean or dirty \
- * LRU list, and remove it. Then insert it at the head of the \
- * clean LRU list. \
+ * that it must be dirty -- but that need not be the case. Use the \
+ * dirty flag to infer whether the entry is on the clean or dirty \
+ * LRU list, and remove it. Then insert it at the head of the \
+ * clean LRU list. \
* \
* The function presumes that a dirty entry will be either cleared \
- * or flushed shortly, so it is OK if we put a dirty entry on the \
- * clean LRU list. \
+ * or flushed shortly, so it is OK if we put a dirty entry on the \
+ * clean LRU list. \
*/ \
\
if ( (entry_ptr)->is_dirty ) { \
@@ -2347,17 +2361,17 @@ if ( ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the \
- * head. \
- */ \
+ * head. \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2366,26 +2380,26 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_INSERT_APPEND
+ * Macro: H5C__UPDATE_RP_FOR_INSERT_APPEND
*
* Purpose: Update the replacement policy data structures for an
- * insertion of the specified cache entry.
+ * insertion of the specified cache entry.
*
- * Unlike H5C__UPDATE_RP_FOR_INSERTION below, mark the
- * new entry as the LEAST recently used entry, not the
- * most recently used.
+ * Unlike H5C__UPDATE_RP_FOR_INSERTION below, mark the
+ * new entry as the LEAST recently used entry, not the
+ * most recently used.
*
- * For now at least, this macro should only be used in
- * the reconstruction of the metadata cache from a cache
- * image block.
+ * For now at least, this macro should only be used in
+ * the reconstruction of the metadata cache from a cache
+ * image block.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2421,7 +2435,7 @@ if ( ( (cache_ptr)->index_size != \
\
H5C__DLL_APPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* insert the entry at the tail of the clean or dirty LRU list as \
@@ -2462,7 +2476,7 @@ if ( ( (cache_ptr)->index_size != \
(cache_ptr)->pel_tail_ptr, \
(cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
- \
+ \
} else { \
\
/* modified LRU specific code */ \
@@ -2471,7 +2485,7 @@ if ( ( (cache_ptr)->index_size != \
\
H5C__DLL_APPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2480,18 +2494,18 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_INSERTION
+ * Macro: H5C__UPDATE_RP_FOR_INSERTION
*
* Purpose: Update the replacement policy data structures for an
- * insertion of the specified cache entry.
+ * insertion of the specified cache entry.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2499,31 +2513,31 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_insertion() to the
- * macro H5C__UPDATE_RP_FOR_INSERTION in an effort to squeeze
- * a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_insertion() to the
+ * macro H5C__UPDATE_RP_FOR_INSERTION in an effort to squeeze
+ * a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two version, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two version, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/10/06
- * This macro should never be called on a pinned entry.
- * Inserted an assert to verify this.
+ * JRM - 3/10/06
+ * This macro should never be called on a pinned entry.
+ * Inserted an assert to verify this.
*
- * JRM - 8/9/06
- * Not any more. We must now allow insertion of pinned
- * entries. Updated macro to support this.
+ * JRM - 8/9/06
+ * Not any more. We must now allow insertion of pinned
+ * entries. Updated macro to support this.
*
- * JRM - 3/28/07
- * Added sanity checks using the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM - 3/28/07
+ * Added sanity checks using the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2555,7 +2569,7 @@ if ( ( (cache_ptr)->index_size != \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* insert the entry at the head of the clean or dirty LRU list as \
@@ -2596,7 +2610,7 @@ if ( ( (cache_ptr)->index_size != \
(cache_ptr)->pel_tail_ptr, \
(cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
- \
+ \
} else { \
\
/* modified LRU specific code */ \
@@ -2605,7 +2619,7 @@ if ( ( (cache_ptr)->index_size != \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2614,22 +2628,22 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_PROTECT
+ * Macro: H5C__UPDATE_RP_FOR_PROTECT
*
* Purpose: Update the replacement policy data structures for a
- * protect of the specified cache entry.
+ * protect of the specified cache entry.
*
- * To do this, unlink the specified entry from any data
- * structures used by the replacement policy, and add the
- * entry to the protected list.
+ * To do this, unlink the specified entry from any data
+ * structures used by the replacement policy, and add the
+ * entry to the protected list.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2637,28 +2651,28 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_protect() to the
- * macro H5C__UPDATE_RP_FOR_PROTECT in an effort to squeeze
- * a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_protect() to the
+ * macro H5C__UPDATE_RP_FOR_PROTECT in an effort to squeeze
+ * a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two version, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two version, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/17/06
- * Modified macro to attempt to remove pinned entriese from
- * the pinned entry list instead of from the data structures
- * maintained by the replacement policy.
+ * JRM - 3/17/06
+ * Modified macro to attempt to remove pinned entriese from
+ * the pinned entry list instead of from the data structures
+ * maintained by the replacement policy.
*
- * JRM - 3/28/07
- * Added sanity checks based on the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM - 3/28/07
+ * Added sanity checks based on the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2674,12 +2688,12 @@ if ( ( (cache_ptr)->index_size != \
HDassert( !((entry_ptr)->is_read_only) ); \
HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
HDassert( (entry_ptr)->size > 0 ); \
- \
+ \
if ( (entry_ptr)->is_pinned ) { \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
- (cache_ptr)->pel_tail_ptr, \
- (cache_ptr)->pel_len, \
+ (cache_ptr)->pel_tail_ptr, \
+ (cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
\
} else { \
@@ -2690,7 +2704,7 @@ if ( ( (cache_ptr)->index_size != \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* Similarly, remove the entry from the clean or dirty LRU list \
@@ -2736,12 +2750,12 @@ if ( ( (cache_ptr)->index_size != \
HDassert( !((entry_ptr)->is_read_only) ); \
HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
HDassert( (entry_ptr)->size > 0 ); \
- \
+ \
if ( (entry_ptr)->is_pinned ) { \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
- (cache_ptr)->pel_tail_ptr, \
- (cache_ptr)->pel_len, \
+ (cache_ptr)->pel_tail_ptr, \
+ (cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
\
} else { \
@@ -2752,7 +2766,7 @@ if ( ( (cache_ptr)->index_size != \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2770,18 +2784,18 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_MOVE
+ * Macro: H5C__UPDATE_RP_FOR_MOVE
*
* Purpose: Update the replacement policy data structures for a
- * move of the specified cache entry.
+ * move of the specified cache entry.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2792,6 +2806,7 @@ if ( ( (cache_ptr)->index_size != \
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
+/* clang-format off */
#define H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, fail_val) \
{ \
HDassert( (cache_ptr) ); \
@@ -2802,20 +2817,20 @@ if ( ( (cache_ptr)->index_size != \
HDassert( (entry_ptr)->size > 0 ); \
\
if ( ! ( (entry_ptr)->is_pinned ) && ! ( (entry_ptr->is_protected ) ) ) { \
- \
+ \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head. \
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* remove the entry from either the clean or dirty LUR list as \
@@ -2824,43 +2839,43 @@ if ( ( (cache_ptr)->index_size != \
if ( was_dirty ) { \
\
H5C__AUX_DLL_REMOVE((entry_ptr), \
- (cache_ptr)->dLRU_head_ptr, \
+ (cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
\
} else { \
\
H5C__AUX_DLL_REMOVE((entry_ptr), \
- (cache_ptr)->cLRU_head_ptr, \
+ (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
} \
\
/* insert the entry at the head of either the clean or dirty \
- * LRU list as appropriate. \
+ * LRU list as appropriate. \
*/ \
\
if ( (entry_ptr)->is_dirty ) { \
\
H5C__AUX_DLL_PREPEND((entry_ptr), \
- (cache_ptr)->dLRU_head_ptr, \
+ (cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
\
} else { \
\
H5C__AUX_DLL_PREPEND((entry_ptr), \
- (cache_ptr)->cLRU_head_ptr, \
+ (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
} \
\
/* End modified LRU specific code. */ \
@@ -2879,47 +2894,48 @@ if ( ( (cache_ptr)->index_size != \
HDassert( (entry_ptr)->size > 0 ); \
\
if ( ! ( (entry_ptr)->is_pinned ) && ! ( (entry_ptr->is_protected ) ) ) { \
- \
+ \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head. \
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
} \
} /* H5C__UPDATE_RP_FOR_MOVE */
+/* clang-format on */
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_SIZE_CHANGE
+ * Macro: H5C__UPDATE_RP_FOR_SIZE_CHANGE
*
* Purpose: Update the replacement policy data structures for a
- * size change of the specified cache entry.
+ * size change of the specified cache entry.
*
- * To do this, determine if the entry is pinned. If it is,
- * update the size of the pinned entry list.
+ * To do this, determine if the entry is pinned. If it is,
+ * update the size of the pinned entry list.
*
- * If it isn't pinned, the entry must handled by the
- * replacement policy. Update the appropriate replacement
- * policy data structures.
+ * If it isn't pinned, the entry must handled by the
+ * replacement policy. Update the appropriate replacement
+ * policy data structures.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2927,15 +2943,16 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 3/28/07
- * Added sanity checks based on the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM -- 3/28/07
+ * Added sanity checks based on the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
+/* clang-format off */
#define H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) \
{ \
HDassert( (cache_ptr) ); \
@@ -2949,49 +2966,49 @@ if ( ( (cache_ptr)->index_size != \
\
if ( (entry_ptr)->coll_access ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->coll_list_len, \
- (cache_ptr)->coll_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
- \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->coll_list_len, \
+ (cache_ptr)->coll_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
+ \
} \
\
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
- (cache_ptr)->pel_size, \
- (entry_ptr)->size, \
- (new_size)); \
- \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
+ (cache_ptr)->pel_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
+ \
} else { \
\
/* modified LRU specific code */ \
\
- /* Update the size of the LRU list */ \
+ /* Update the size of the LRU list */ \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
/* Similarly, update the size of the clean or dirty LRU list as \
- * appropriate. At present, the entry must be clean, but that \
- * could change. \
+ * appropriate. At present, the entry must be clean, but that \
+ * could change. \
*/ \
\
if ( (entry_ptr)->is_dirty ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \
- (cache_ptr)->dLRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \
+ (cache_ptr)->dLRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
} else { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \
- (cache_ptr)->cLRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \
+ (cache_ptr)->cLRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
} \
\
/* End modified LRU specific code. */ \
@@ -3011,48 +3028,49 @@ if ( ( (cache_ptr)->index_size != \
HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
HDassert( (entry_ptr)->size > 0 ); \
HDassert( new_size > 0 ); \
- \
+ \
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
- (cache_ptr)->pel_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
+ (cache_ptr)->pel_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
} else { \
\
/* modified LRU specific code */ \
\
- /* Update the size of the LRU list */ \
+ /* Update the size of the LRU list */ \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
/* End modified LRU specific code. */ \
} \
\
} /* H5C__UPDATE_RP_FOR_SIZE_CHANGE */
+ /* clang-format on */
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_UNPIN
+ * Macro: H5C__UPDATE_RP_FOR_UNPIN
*
* Purpose: Update the replacement policy data structures for an
- * unpin of the specified cache entry.
+ * unpin of the specified cache entry.
*
- * To do this, unlink the specified entry from the protected
- * entry list, and re-insert it in the data structures used
- * by the current replacement policy.
+ * To do this, unlink the specified entry from the protected
+ * entry list, and re-insert it in the data structures used
+ * by the current replacement policy.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the macro
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the macro
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -3060,15 +3078,16 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 3/28/07
- * Added sanity checks based on the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM -- 3/28/07
+ * Added sanity checks based on the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
+ /* clang-format off */
#define H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
@@ -3155,25 +3174,26 @@ if ( ( (cache_ptr)->index_size != \
/* End modified LRU specific code. */ \
\
} /* H5C__UPDATE_RP_FOR_UNPIN */
+ /* clang-format off */
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_UNPROTECT
+ * Macro: H5C__UPDATE_RP_FOR_UNPROTECT
*
* Purpose: Update the replacement policy data structures for an
- * unprotect of the specified cache entry.
+ * unprotect of the specified cache entry.
*
- * To do this, unlink the specified entry from the protected
- * list, and re-insert it in the data structures used by the
- * current replacement policy.
+ * To do this, unlink the specified entry from the protected
+ * list, and re-insert it in the data structures used by the
+ * current replacement policy.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -3181,30 +3201,31 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_unprotect() to
- * the macro H5C__UPDATE_RP_FOR_UNPROTECT in an effort to
- * squeeze a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_unprotect() to
+ * the macro H5C__UPDATE_RP_FOR_UNPROTECT in an effort to
+ * squeeze a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two version, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two version, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/17/06
- * Modified macro to put pinned entries on the pinned entry
- * list instead of inserting them in the data structures
- * maintained by the replacement policy.
+ * JRM - 3/17/06
+ * Modified macro to put pinned entries on the pinned entry
+ * list instead of inserting them in the data structures
+ * maintained by the replacement policy.
*
*-------------------------------------------------------------------------
*/
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
+ /* clang-format off */
#define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
@@ -3300,6 +3321,7 @@ if ( ( (cache_ptr)->index_size != \
/* End modified LRU specific code. */ \
} \
} /* H5C__UPDATE_RP_FOR_UNPROTECT */
+ /* clang-format on */
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
@@ -3307,6 +3329,7 @@ if ( ( (cache_ptr)->index_size != \
#if H5C_DO_SANITY_CHECKS
+ /* clang-format off */
#define H5C__COLL_DLL_PRE_REMOVE_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \
if ( ( (hd_ptr) == NULL ) || \
( (tail_ptr) == NULL ) || \
@@ -3371,6 +3394,7 @@ if ( ( (entry_ptr) == NULL ) || \
HDassert(0 && "COLL DLL pre insert SC failed"); \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "COLL DLL pre insert SC failed") \
}
+ /* clang-format on */
#else /* H5C_DO_SANITY_CHECKS */
@@ -3447,10 +3471,10 @@ if ( ( (entry_ptr) == NULL ) || \
} \
} /* H5C__COLL_DLL_REMOVE() */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__INSERT_IN_COLL_LIST
+ * Macro: H5C__INSERT_IN_COLL_LIST
*
* Purpose: Insert entry into collective entries list
*
@@ -3461,6 +3485,7 @@ if ( ( (entry_ptr) == NULL ) || \
*-------------------------------------------------------------------------
*/
+ /* clang-format off */
#define H5C__INSERT_IN_COLL_LIST(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
@@ -3476,11 +3501,12 @@ if ( ( (entry_ptr) == NULL ) || \
(fail_val)) \
\
} /* H5C__INSERT_IN_COLL_LIST */
+ /* clang-format on */
+
-
/*-------------------------------------------------------------------------
*
- * Macro: H5C__REMOVE_FROM_COLL_LIST
+ * Macro: H5C__REMOVE_FROM_COLL_LIST
*
* Purpose: Remove entry from collective entries list
*
@@ -3491,6 +3517,7 @@ if ( ( (entry_ptr) == NULL ) || \
*-------------------------------------------------------------------------
*/
+ /* clang-format off */
#define H5C__REMOVE_FROM_COLL_LIST(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
@@ -3506,11 +3533,12 @@ if ( ( (entry_ptr) == NULL ) || \
(fail_val)) \
\
} /* H5C__REMOVE_FROM_COLL_LIST */
+ /* clang-format on */
+
-
/*-------------------------------------------------------------------------
*
- * Macro: H5C__MOVE_TO_TOP_IN_COLL_LIST
+ * Macro: H5C__MOVE_TO_TOP_IN_COLL_LIST
*
* Purpose: Update entry position in collective entries list
*
@@ -3521,6 +3549,7 @@ if ( ( (entry_ptr) == NULL ) || \
*-------------------------------------------------------------------------
*/
+ /* clang-format off */
#define H5C__MOVE_TO_TOP_IN_COLL_LIST(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
@@ -3541,6 +3570,7 @@ if ( ( (entry_ptr) == NULL ) || \
(fail_val)) \
\
} /* H5C__MOVE_TO_TOP_IN_COLL_LIST */
+ /* clang-format on */
#endif /* H5_HAVE_PARALLEL */
@@ -3563,7 +3593,7 @@ if ( ( (entry_ptr) == NULL ) || \
*
* The fields of this structure are discussed individually below:
*
- * tag: Address (i.e. "tag") of the object header for all the entries
+ * tag: Address (i.e. "tag") of the object header for all the entries
* corresponding to parts of that object.
*
* head: Head of doubly-linked list of all entries belonging to the tag.
@@ -3571,7 +3601,7 @@ if ( ( (entry_ptr) == NULL ) || \
* entry_cnt: Number of entries on linked list of entries for this tag.
*
* corked: Boolean flag indicating whether entries for this object can be
- * evicted.
+ * evicted.
*
****************************************************************************/
typedef struct H5C_tag_info_t {
@@ -3613,32 +3643,32 @@ typedef struct H5C_tag_info_t {
* Note that index_size and index_len now refer to the total size of
* and number of entries in the hash table.
*
- * JRM - 7/19/04
+ * JRM - 7/19/04
*
* The TBBT has since been replaced with a skip list. This change
* greatly predates this note.
*
- * JRM - 9/26/05
+ * JRM - 9/26/05
*
- * magic: Unsigned 32 bit integer always set to H5C__H5C_T_MAGIC.
- * This field is used to validate pointers to instances of
- * H5C_t.
+ * magic: Unsigned 32 bit integer always set to H5C__H5C_T_MAGIC.
+ * This field is used to validate pointers to instances of
+ * H5C_t.
*
* flush_in_progress: Boolean flag indicating whether a flush is in
- * progress.
+ * progress.
*
* log_info: Information used by the MDC logging functionality.
* Described in H5Clog.h.
*
- * aux_ptr: Pointer to void used to allow wrapper code to associate
- * its data with an instance of H5C_t. The H5C cache code
- * sets this field to NULL, and otherwise leaves it alone.
+ * aux_ptr: Pointer to void used to allow wrapper code to associate
+ * its data with an instance of H5C_t. The H5C cache code
+ * sets this field to NULL, and otherwise leaves it alone.
*
- * max_type_id: Integer field containing the maximum type id number assigned
- * to a type of entry in the cache. All type ids from 0 to
- * max_type_id inclusive must be defined. The names of the
- * types are stored in the type_name_table discussed below, and
- * indexed by the ids.
+ * max_type_id: Integer field containing the maximum type id number assigned
+ * to a type of entry in the cache. All type ids from 0 to
+ * max_type_id inclusive must be defined. The names of the
+ * types are stored in the type_name_table discussed below, and
+ * indexed by the ids.
*
* class_table_ptr: Pointer to an array of H5C_class_t of length
* max_type_id + 1. Entry classes for the cache.
@@ -3654,19 +3684,19 @@ typedef struct H5C_tag_info_t {
* to reduce its size as entries are unprotected.
*
* b) When running in parallel mode, the cache may not be
- * permitted to flush a dirty entry in response to a read.
- * If there are no clean entries available to evict, the
- * cache will exceed its maximum size. Again the cache
+ * permitted to flush a dirty entry in response to a read.
+ * If there are no clean entries available to evict, the
+ * cache will exceed its maximum size. Again the cache
* will attempt to reduce its size to the max_cache_size
* limit on the next cache write.
*
- * c) When an entry increases in size, the cache may exceed
- * the max_cache_size limit until the next time the cache
- * attempts to load or insert an entry.
+ * c) When an entry increases in size, the cache may exceed
+ * the max_cache_size limit until the next time the cache
+ * attempts to load or insert an entry.
*
- * d) When the evictions_enabled field is false (see below),
- * the cache size will increase without limit until the
- * field is set to true.
+ * d) When the evictions_enabled field is false (see below),
+ * the cache size will increase without limit until the
+ * field is set to true.
*
* min_clean_size: Nominal minimum number of clean bytes in the cache.
* The cache attempts to maintain this number of bytes of
@@ -3674,7 +3704,7 @@ typedef struct H5C_tag_info_t {
* a soft limit.
*
* close_warning_received: Boolean flag indicating that a file closing
- * warning has been received.
+ * warning has been received.
*
*
* In addition to the call back functions required for each entry, the
@@ -3682,19 +3712,19 @@ typedef struct H5C_tag_info_t {
* the cache as a whole:
*
* check_write_permitted: In certain applications, the cache may not
- * be allowed to write to disk at certain time. If specified,
- * the check_write_permitted function is used to determine if
- * a write is permissible at any given point in time.
+ * be allowed to write to disk at certain time. If specified,
+ * the check_write_permitted function is used to determine if
+ * a write is permissible at any given point in time.
*
- * If no such function is specified (i.e. this field is NULL),
- * the cache uses the following write_permitted field to
- * determine whether writes are permitted.
+ * If no such function is specified (i.e. this field is NULL),
+ * the cache uses the following write_permitted field to
+ * determine whether writes are permitted.
*
* write_permitted: If check_write_permitted is NULL, this boolean flag
- * indicates whether writes are permitted.
+ * indicates whether writes are permitted.
*
- * log_flush: If provided, this function is called whenever a dirty
- * entry is flushed to disk.
+ * log_flush: If provided, this function is called whenever a dirty
+ * entry is flushed to disk.
*
*
* In cases where memory is plentiful, and performance is an issue, it may
@@ -3702,11 +3732,11 @@ typedef struct H5C_tag_info_t {
* writes. The following field is used to implement this.
*
* evictions_enabled: Boolean flag that is initialized to TRUE. When
- * this flag is set to FALSE, the metadata cache will not
- * attempt to evict entries to make space for newly protected
- * entries, and instead the will grow without limit.
+ * this flag is set to FALSE, the metadata cache will not
+ * attempt to evict entries to make space for newly protected
+ * entries, and instead the will grow without limit.
*
- * Needless to say, this feature must be used with care.
+ * Needless to say, this feature must be used with care.
*
*
* The cache requires an index to facilitate searching for entries. The
@@ -3724,7 +3754,7 @@ typedef struct H5C_tag_info_t {
* index, and must have the same length and size as the index proper.
*
* index_len: Number of entries currently in the hash table used to index
- * the cache.
+ * the cache.
*
* index_size: Number of bytes of cache entries currently stored in the
* hash table used to index the cache.
@@ -3736,84 +3766,84 @@ typedef struct H5C_tag_info_t {
* of the cache's memory footprint.
*
* index_ring_len: Array of integer of length H5C_RING_NTYPES used to
- * maintain a count of entries in the index by ring. Note
- * that the sum of all the cells in this array must equal
- * the value stored in index_len above.
+ * maintain a count of entries in the index by ring. Note
+ * that the sum of all the cells in this array must equal
+ * the value stored in index_len above.
*
* index_ring_size: Array of size_t of length H5C_RING_NTYPES used to
- * maintain the sum of the sizes of all entries in the index
- * by ring. Note that the sum of all cells in this array must
- * equal the value stored in index_size above.
+ * maintain the sum of the sizes of all entries in the index
+ * by ring. Note that the sum of all cells in this array must
+ * equal the value stored in index_size above.
*
* clean_index_size: Number of bytes of clean entries currently stored in
- * the hash table. Note that the index_size field (above)
- * is also the sum of the sizes of all entries in the cache.
- * Thus we should have the invariant that clean_index_size +
- * dirty_index_size == index_size.
+ * the hash table. Note that the index_size field (above)
+ * is also the sum of the sizes of all entries in the cache.
+ * Thus we should have the invariant that clean_index_size +
+ * dirty_index_size == index_size.
*
- * WARNING:
+ * WARNING:
*
- * The value of the clean_index_size must not be mistaken
- * for the current clean size of the cache. Rather, the
- * clean size of the cache is the current value of
- * clean_index_size plus the amount of empty space (if any)
+ * The value of the clean_index_size must not be mistaken
+ * for the current clean size of the cache. Rather, the
+ * clean size of the cache is the current value of
+ * clean_index_size plus the amount of empty space (if any)
* in the cache.
*
* clean_index_ring_size: Array of size_t of length H5C_RING_NTYPES used to
- * maintain the sum of the sizes of all clean entries in the
- * index by ring. Note that the sum of all cells in this array
- * must equal the value stored in clean_index_size above.
+ * maintain the sum of the sizes of all clean entries in the
+ * index by ring. Note that the sum of all cells in this array
+ * must equal the value stored in clean_index_size above.
*
* dirty_index_size: Number of bytes of dirty entries currently stored in
- * the hash table. Note that the index_size field (above)
- * is also the sum of the sizes of all entries in the cache.
- * Thus we should have the invariant that clean_index_size +
- * dirty_index_size == index_size.
+ * the hash table. Note that the index_size field (above)
+ * is also the sum of the sizes of all entries in the cache.
+ * Thus we should have the invariant that clean_index_size +
+ * dirty_index_size == index_size.
*
* dirty_index_ring_size: Array of size_t of length H5C_RING_NTYPES used to
- * maintain the sum of the sizes of all dirty entries in the
- * index by ring. Note that the sum of all cells in this array
- * must equal the value stored in dirty_index_size above.
- *
- * index: Array of pointer to H5C_cache_entry_t of size
- * H5C__HASH_TABLE_LEN. At present, this value is a power
- * of two, not the usual prime number.
- *
- * I hope that the variable size of cache elements, the large
- * hash table size, and the way in which HDF5 allocates space
- * will combine to avoid problems with periodicity. If so, we
- * can use a trivial hash function (a bit-and and a 3 bit left
- * shift) with some small savings.
- *
- * If not, it will become evident in the statistics. Changing
- * to the usual prime number length hash table will require
- * changing the H5C__HASH_FCN macro and the deletion of the
- * H5C__HASH_MASK #define. No other changes should be required.
- *
- * il_len: Number of entries on the index list.
- *
- * This must always be equal to index_len. As such, this
- * field is redundant. However, the existing linked list
- * management macros expect to maintain a length field, so
- * this field exists primarily to avoid adding complexity to
- * these macros.
- *
- * il_size: Number of bytes of cache entries currently stored in the
- * index list.
- *
- * This must always be equal to index_size. As such, this
- * field is redundant. However, the existing linked list
- * management macros expect to maintain a size field, so
- * this field exists primarily to avoid adding complexity to
- * these macros.
- *
- * il_head: Pointer to the head of the doubly linked list of entries in
+ * maintain the sum of the sizes of all dirty entries in the
+ * index by ring. Note that the sum of all cells in this array
+ * must equal the value stored in dirty_index_size above.
+ *
+ * index: Array of pointer to H5C_cache_entry_t of size
+ * H5C__HASH_TABLE_LEN. At present, this value is a power
+ * of two, not the usual prime number.
+ *
+ * I hope that the variable size of cache elements, the large
+ * hash table size, and the way in which HDF5 allocates space
+ * will combine to avoid problems with periodicity. If so, we
+ * can use a trivial hash function (a bit-and and a 3 bit left
+ * shift) with some small savings.
+ *
+ * If not, it will become evident in the statistics. Changing
+ * to the usual prime number length hash table will require
+ * changing the H5C__HASH_FCN macro and the deletion of the
+ * H5C__HASH_MASK #define. No other changes should be required.
+ *
+ * il_len: Number of entries on the index list.
+ *
+ * This must always be equal to index_len. As such, this
+ * field is redundant. However, the existing linked list
+ * management macros expect to maintain a length field, so
+ * this field exists primarily to avoid adding complexity to
+ * these macros.
+ *
+ * il_size: Number of bytes of cache entries currently stored in the
+ * index list.
+ *
+ * This must always be equal to index_size. As such, this
+ * field is redundant. However, the existing linked list
+ * management macros expect to maintain a size field, so
+ * this field exists primarily to avoid adding complexity to
+ * these macros.
+ *
+ * il_head: Pointer to the head of the doubly linked list of entries in
* the index list. Note that cache entries on this list are
- * linked by their il_next and il_prev fields.
+ * linked by their il_next and il_prev fields.
*
* This field is NULL if the index is empty.
*
- * il_tail: Pointer to the tail of the doubly linked list of entries in
+ * il_tail: Pointer to the tail of the doubly linked list of entries in
* the index list. Note that cache entries on this list are
* linked by their il_next and il_prev fields.
*
@@ -3830,32 +3860,32 @@ typedef struct H5C_tag_info_t {
*
* The following fields are maintained to facilitate this.
*
- * entries_removed_counter: Counter that is incremented each time an
- * entry is removed from the cache by any means (eviction,
- * expungement, or take ownership at this point in time).
- * Functions that perform scans on lists may set this field
- * to zero prior to calling H5C__flush_single_entry().
- * Unexpected changes to the counter indicate that an entry
- * was removed from the cache as a side effect of the flush.
- *
- * last_entry_removed_ptr: Pointer to the instance of H5C_cache_entry_t
- * which contained the last entry to be removed from the cache,
- * or NULL if there either is no such entry, or if a function
- * performing a scan of a list has set this field to NULL prior
- * to calling H5C__flush_single_entry().
- *
- * WARNING!!! This field must NEVER be dereferenced. It is
- * maintained to allow functions that perform scans of lists
- * to compare this pointer with their pointers to next, thus
- * allowing them to avoid unnecessary restarts of scans if the
- * pointers don't match, and if entries_removed_counter is
- * one.
- *
- * entry_watched_for_removal: Pointer to an instance of H5C_cache_entry_t
+ * entries_removed_counter: Counter that is incremented each time an
+ * entry is removed from the cache by any means (eviction,
+ * expungement, or take ownership at this point in time).
+ * Functions that perform scans on lists may set this field
+ * to zero prior to calling H5C__flush_single_entry().
+ * Unexpected changes to the counter indicate that an entry
+ * was removed from the cache as a side effect of the flush.
+ *
+ * last_entry_removed_ptr: Pointer to the instance of H5C_cache_entry_t
+ * which contained the last entry to be removed from the cache,
+ * or NULL if there either is no such entry, or if a function
+ * performing a scan of a list has set this field to NULL prior
+ * to calling H5C__flush_single_entry().
+ *
+ * WARNING!!! This field must NEVER be dereferenced. It is
+ * maintained to allow functions that perform scans of lists
+ * to compare this pointer with their pointers to next, thus
+ * allowing them to avoid unnecessary restarts of scans if the
+ * pointers don't match, and if entries_removed_counter is
+ * one.
+ *
+ * entry_watched_for_removal: Pointer to an instance of H5C_cache_entry_t
* which contains the 'next' entry for an iteration. Removing
* this entry must trigger a rescan of the iteration, so each
* entry removed from the cache is compared against this pointer
- * and the pointer is reset to NULL if the watched entry is
+ * and the pointer is reset to NULL if the watched entry is
* removed.
* (This functions similarly to a "dead man's switch")
*
@@ -3870,14 +3900,14 @@ typedef struct H5C_tag_info_t {
* are flushed. (this has been changed -- dirty entries are now removed from
* the skip list as they are flushed. JRM - 10/25/05)
*
- * Update 4/21/20:
+ * Update 4/21/20:
*
- * Profiling indicates that the cost of maintaining the skip list is
+ * Profiling indicates that the cost of maintaining the skip list is
* significant. As it is only used on flush and close, maintaining it
* only when needed is an obvious optimization.
*
* To do this, we add a flag to control maintenanace of the skip list.
- * This flag is initially set to FALSE, which disables all operations
+ * This flag is initially set to FALSE, which disables all operations
* on the skip list.
*
* At the beginning of either flush or close, we scan the index list,
@@ -3885,27 +3915,27 @@ typedef struct H5C_tag_info_t {
* on skip list by setting above control flag to true.
*
* At the end of a complete flush, we verify that the skip list is empty,
- * and set the control flag back to false, so as to avoid skip list
- * maintenance overhead until the next flush or close.
+ * and set the control flag back to false, so as to avoid skip list
+ * maintenance overhead until the next flush or close.
*
* In the case of a partial flush (i.e. flush marked entries), we remove
* all remaining entries from the skip list, and then set the control flag
- * back to false -- again avoiding skip list maintenance overhead until
+ * back to false -- again avoiding skip list maintenance overhead until
* the next flush or close.
*
* slist_enabled: Boolean flag used to control operation of the skip
- * list. If this filed is FALSE, operations on the
+ * list. If this filed is FALSE, operations on the
* slist are no-ops, and the slist must be empty. If
* it is TRUE, operations on the slist proceed as usual,
* and all dirty entries in the metadata cache must be
* listed in the slist.
*
* slist_changed: Boolean flag used to indicate whether the contents of
- * the slist has changed since the last time this flag was
- * reset. This is used in the cache flush code to detect
- * conditions in which pre-serialize or serialize callbacks
- * have modified the slist -- which obliges us to restart
- * the scan of the slist from the beginning.
+ * the slist has changed since the last time this flag was
+ * reset. This is used in the cache flush code to detect
+ * conditions in which pre-serialize or serialize callbacks
+ * have modified the slist -- which obliges us to restart
+ * the scan of the slist from the beginning.
*
* slist_len: Number of entries currently in the skip list
* used to maintain a sorted list of dirty entries in the
@@ -3916,14 +3946,14 @@ typedef struct H5C_tag_info_t {
* dirty entries in the cache.
*
* slist_ring_len: Array of integer of length H5C_RING_NTYPES used to
- * maintain a count of entries in the slist by ring. Note
- * that the sum of all the cells in this array must equal
- * the value stored in slist_len above.
+ * maintain a count of entries in the slist by ring. Note
+ * that the sum of all the cells in this array must equal
+ * the value stored in slist_len above.
*
* slist_ring_size: Array of size_t of length H5C_RING_NTYPES used to
* maintain the sum of the sizes of all entries in the
- * slist by ring. Note that the sum of all cells in this
- * array must equal the value stored in slist_size above.
+ * slist by ring. Note that the sum of all cells in this
+ * array must equal the value stored in slist_size above.
*
* slist_ptr: pointer to the instance of H5SL_t used maintain a sorted
* list of dirty entries in the cache. This sorted list has
@@ -3938,7 +3968,7 @@ typedef struct H5C_tag_info_t {
* some optimizations when I get to it.
*
* num_last_entries: The number of entries in the cache that can only be
- * flushed after all other entries in the cache have
+ * flushed after all other entries in the cache have
* been flushed. At this time, this will only ever be
* one entry (the superblock), and the code has been
* protected with HDasserts to enforce this. This restraint
@@ -3947,10 +3977,10 @@ typedef struct H5C_tag_info_t {
* explicit tests for that case should be added when said
* HDasserts are removed.
*
- * Update: There are now two possible last entries
- * (superblock and file driver info message). This
- * number will probably increase as we add superblock
- * messages. JRM -- 11/18/14
+ * Update: There are now two possible last entries
+ * (superblock and file driver info message). This
+ * number will probably increase as we add superblock
+ * messages. JRM -- 11/18/14
*
* With the addition of the fractal heap, the cache must now deal with
* the case in which entries may be dirtied, moved, or have their sizes
@@ -3959,12 +3989,12 @@ typedef struct H5C_tag_info_t {
* H5C_DO_SANITY_CHECKS is TRUE.
*
* slist_len_increase: Number of entries that have been added to the
- * slist since the last time this field was set to zero.
- * Note that this value can be negative.
+ * slist since the last time this field was set to zero.
+ * Note that this value can be negative.
*
* slist_size_increase: Total size of all entries that have been added
- * to the slist since the last time this field was set to
- * zero. Note that this value can be negative.
+ * to the slist since the last time this field was set to
+ * zero. Note that this value can be negative.
*
* Cache entries belonging to a particular object are "tagged" with that
* object's base object header address.
@@ -3981,7 +4011,7 @@ typedef struct H5C_tag_info_t {
* freelist, as well as shared entries like global
* heaps and shared object header messages, are not tagged.
*
- * ignore_tags: Boolean flag to disable tag validation during entry insertion.
+ * ignore_tags: Boolean flag to disable tag validation during entry insertion.
*
* num_objs_corked: Unsigned integer field containing the number of objects
* that are "corked". The "corked" status of an object is
@@ -4020,15 +4050,15 @@ typedef struct H5C_tag_info_t {
*
* Pinning an entry has the following implications:
*
- * 1) A pinned entry cannot be evicted. Thus unprotected
+ * 1) A pinned entry cannot be evicted. Thus unprotected
* pinned entries reside in the pinned entry list, instead
* of the LRU list(s) (or other lists maintained by the current
* replacement policy code).
*
* 2) A pinned entry can be accessed or modified at any time.
* This places an additional burden on the associated pre-serialize
- * and serialize callbacks, which must ensure the the entry is in
- * a consistent state before creating an image of it.
+ * and serialize callbacks, which must ensure the the entry is in
+ * a consistent state before creating an image of it.
*
* 3) A pinned entry can be marked as dirty (and possibly
* change size) while it is unprotected.
@@ -4043,21 +4073,21 @@ typedef struct H5C_tag_info_t {
*
* Maintaining the pinned entry list requires the following fields:
*
- * pel_len: Number of entries currently residing on the pinned
- * entry list.
+ * pel_len: Number of entries currently residing on the pinned
+ * entry list.
*
- * pel_size: Number of bytes of cache entries currently residing on
- * the pinned entry list.
+ * pel_size: Number of bytes of cache entries currently residing on
+ * the pinned entry list.
*
* pel_head_ptr: Pointer to the head of the doubly linked list of pinned
- * but not protected entries. Note that cache entries on
- * this list are linked by their next and prev fields.
+ * but not protected entries. Note that cache entries on
+ * this list are linked by their next and prev fields.
*
* This field is NULL if the list is empty.
*
* pel_tail_ptr: Pointer to the tail of the doubly linked list of pinned
- * but not protected entries. Note that cache entries on
- * this list are linked by their next and prev fields.
+ * but not protected entries. Note that cache entries on
+ * this list are linked by their next and prev fields.
*
* This field is NULL if the list is empty.
*
@@ -4115,13 +4145,13 @@ typedef struct H5C_tag_info_t {
* LRU_list_len: Number of cache entries currently on the LRU list.
*
* Observe that LRU_list_len + pl_len + pel_len must always
- * equal index_len.
+ * equal index_len.
*
* LRU_list_size: Number of bytes of cache entries currently residing on the
* LRU list.
*
* Observe that LRU_list_size + pl_size + pel_size must always
- * equal index_size.
+ * equal index_size.
*
* LRU_head_ptr: Pointer to the head of the doubly linked LRU list. Cache
* entries on this list are linked by their next and prev fields.
@@ -4190,10 +4220,10 @@ typedef struct H5C_tag_info_t {
* the structure described below:
*
* size_increase_possible: Depending on the configuration data given
- * in the resize_ctl field, it may or may not be possible
- * to increase the size of the cache. Rather than test for
- * all the ways this can happen, we simply set this flag when
- * we receive a new configuration.
+ * in the resize_ctl field, it may or may not be possible
+ * to increase the size of the cache. Rather than test for
+ * all the ways this can happen, we simply set this flag when
+ * we receive a new configuration.
*
* flash_size_increase_possible: Depending on the configuration data given
* in the resize_ctl field, it may or may not be possible
@@ -4214,37 +4244,37 @@ typedef struct H5C_tag_info_t {
* we receive a new configuration.
*
* resize_enabled: This is another convenience flag which is set whenever
- * a new set of values for resize_ctl are provided. Very
- * simply,
+ * a new set of values for resize_ctl are provided. Very
+ * simply,
*
- * resize_enabled = size_increase_possible ||
+ * resize_enabled = size_increase_possible ||
* size_decrease_possible;
*
- * cache_full: Boolean flag used to keep track of whether the cache is
- * full, so we can refrain from increasing the size of a
- * cache which hasn't used up the space allotted to it.
+ * cache_full: Boolean flag used to keep track of whether the cache is
+ * full, so we can refrain from increasing the size of a
+ * cache which hasn't used up the space allotted to it.
*
- * The field is initialized to FALSE, and then set to TRUE
- * whenever we attempt to make space in the cache.
+ * The field is initialized to FALSE, and then set to TRUE
+ * whenever we attempt to make space in the cache.
*
* size_decreased: Boolean flag set to TRUE whenever the maximum cache
- * size is decreased. The flag triggers a call to
- * H5C__make_space_in_cache() on the next call to H5C_protect().
+ * size is decreased. The flag triggers a call to
+ * H5C__make_space_in_cache() on the next call to H5C_protect().
*
* resize_in_progress: As the metadata cache has become re-entrant, it is
- * possible that a protect may trigger a call to
- * H5C__auto_adjust_cache_size(), which may trigger a flush,
- * which may trigger a protect, which will result in another
- * call to H5C__auto_adjust_cache_size().
+ * possible that a protect may trigger a call to
+ * H5C__auto_adjust_cache_size(), which may trigger a flush,
+ * which may trigger a protect, which will result in another
+ * call to H5C__auto_adjust_cache_size().
*
- * The resize_in_progress boolean flag is used to detect this,
- * and to prevent the infinite recursion that would otherwise
- * occur.
+ * The resize_in_progress boolean flag is used to detect this,
+ * and to prevent the infinite recursion that would otherwise
+ * occur.
*
- * Note that this issue is not hypothetical -- this field
- * was added 12/29/15 to fix a bug exposed in the testing
- * of changes to the file driver info superblock extension
- * management code needed to support rings.
+ * Note that this issue is not hypothetical -- this field
+ * was added 12/29/15 to fix a bug exposed in the testing
+ * of changes to the file driver info superblock extension
+ * management code needed to support rings.
*
* msic_in_progress: As the metadata cache has become re-entrant, and as
* the free space manager code has become more tightly
@@ -4263,62 +4293,62 @@ typedef struct H5C_tag_info_t {
* exposed by modifications to test/fheap.c to cause it to
* use paged allocation.
*
- * resize_ctl: Instance of H5C_auto_size_ctl_t containing configuration
- * data for automatic cache resizing.
+ * resize_ctl: Instance of H5C_auto_size_ctl_t containing configuration
+ * data for automatic cache resizing.
*
* epoch_markers_active: Integer field containing the number of epoch
- * markers currently in use in the LRU list. This value
- * must be in the range [0, H5C__MAX_EPOCH_MARKERS - 1].
+ * markers currently in use in the LRU list. This value
+ * must be in the range [0, H5C__MAX_EPOCH_MARKERS - 1].
*
* epoch_marker_active: Array of boolean of length H5C__MAX_EPOCH_MARKERS.
- * This array is used to track which epoch markers are currently
- * in use.
+ * This array is used to track which epoch markers are currently
+ * in use.
*
* epoch_marker_ringbuf: Array of int of length H5C__MAX_EPOCH_MARKERS + 1.
*
- * To manage the epoch marker cache entries, it is necessary
- * to track their order in the LRU list. This is done with
- * epoch_marker_ringbuf. When markers are inserted at the
- * head of the LRU list, the index of the marker in the
- * epoch_markers array is inserted at the tail of the ring
- * buffer. When it becomes the epoch_marker_active'th marker
- * in the LRU list, it will have worked its way to the head
- * of the ring buffer as well. This allows us to remove it
- * without scanning the LRU list if such is required.
+ * To manage the epoch marker cache entries, it is necessary
+ * to track their order in the LRU list. This is done with
+ * epoch_marker_ringbuf. When markers are inserted at the
+ * head of the LRU list, the index of the marker in the
+ * epoch_markers array is inserted at the tail of the ring
+ * buffer. When it becomes the epoch_marker_active'th marker
+ * in the LRU list, it will have worked its way to the head
+ * of the ring buffer as well. This allows us to remove it
+ * without scanning the LRU list if such is required.
*
* epoch_marker_ringbuf_first: Integer field containing the index of the
- * first entry in the ring buffer.
+ * first entry in the ring buffer.
*
* epoch_marker_ringbuf_last: Integer field containing the index of the
- * last entry in the ring buffer.
+ * last entry in the ring buffer.
*
* epoch_marker_ringbuf_size: Integer field containing the number of entries
- * in the ring buffer.
+ * in the ring buffer.
*
* epoch_markers: Array of instances of H5C_cache_entry_t of length
- * H5C__MAX_EPOCH_MARKERS. The entries are used as markers
- * in the LRU list to identify cache entries that haven't
- * been accessed for some (small) specified number of
- * epochs. These entries (if any) can then be evicted and
- * the cache size reduced -- ideally without evicting any
- * of the current working set. Needless to say, the epoch
- * length and the number of epochs before an unused entry
- * must be chosen so that all, or almost all, the working
- * set will be accessed before the limit.
- *
- * Epoch markers only appear in the LRU list, never in
- * the index or slist. While they are of type
- * H5C__EPOCH_MARKER_TYPE, and have associated class
- * functions, these functions should never be called.
- *
- * The addr fields of these instances of H5C_cache_entry_t
- * are set to the index of the instance in the epoch_markers
- * array, the size is set to 0, and the type field points
- * to the constant structure epoch_marker_class defined
- * in H5C.c. The next and prev fields are used as usual
- * to link the entry into the LRU list.
- *
- * All other fields are unused.
+ * H5C__MAX_EPOCH_MARKERS. The entries are used as markers
+ * in the LRU list to identify cache entries that haven't
+ * been accessed for some (small) specified number of
+ * epochs. These entries (if any) can then be evicted and
+ * the cache size reduced -- ideally without evicting any
+ * of the current working set. Needless to say, the epoch
+ * length and the number of epochs before an unused entry
+ * must be chosen so that all, or almost all, the working
+ * set will be accessed before the limit.
+ *
+ * Epoch markers only appear in the LRU list, never in
+ * the index or slist. While they are of type
+ * H5C__EPOCH_MARKER_TYPE, and have associated class
+ * functions, these functions should never be called.
+ *
+ * The addr fields of these instances of H5C_cache_entry_t
+ * are set to the index of the instance in the epoch_markers
+ * array, the size is set to 0, and the type field points
+ * to the constant structure epoch_marker_class defined
+ * in H5C.c. The next and prev fields are used as usual
+ * to link the entry into the LRU list.
+ *
+ * All other fields are unused.
*
*
* Cache hit rate collection fields:
@@ -4328,62 +4358,62 @@ typedef struct H5C_tag_info_t {
* collection is enabled. The following fields support this capability.
*
* cache_hits: Number of cache hits since the last time the cache hit
- * rate statistics were reset. Note that when automatic cache
- * re-sizing is enabled, this field will be reset every automatic
- * resize epoch.
+ * rate statistics were reset. Note that when automatic cache
+ * re-sizing is enabled, this field will be reset every automatic
+ * resize epoch.
*
* cache_accesses: Number of times the cache has been accessed while
- * since the last since the last time the cache hit rate statistics
- * were reset. Note that when automatic cache re-sizing is enabled,
- * this field will be reset every automatic resize epoch.
+ * since the last since the last time the cache hit rate statistics
+ * were reset. Note that when automatic cache re-sizing is enabled,
+ * this field will be reset every automatic resize epoch.
*
*
* Metadata cache image management related fields.
*
- * image_ctl: Instance of H5C_cache_image_ctl_t containing configuration
- * data for generation of a cache image on file close.
+ * image_ctl: Instance of H5C_cache_image_ctl_t containing configuration
+ * data for generation of a cache image on file close.
*
* serialization_in_progress: Boolean field that is set to TRUE iff
- * the cache is in the process of being serialized. This
- * field is needed to support the H5C_serialization_in_progress()
- * call, which is in turn required for sanity checks in some
- * cache clients.
+ * the cache is in the process of being serialized. This
+ * field is needed to support the H5C_serialization_in_progress()
+ * call, which is in turn required for sanity checks in some
+ * cache clients.
*
- * load_image: Boolean flag indicating that the metadata cache image
- * superblock extension message exists and should be
- * read, and the image block read and decoded on the next
- * call to H5C_protect().
+ * load_image: Boolean flag indicating that the metadata cache image
+ * superblock extension message exists and should be
+ * read, and the image block read and decoded on the next
+ * call to H5C_protect().
*
* image_loaded: Boolean flag indicating that the metadata cache has
* loaded the metadata cache image as directed by the
* MDC cache image superblock extension message.
*
* delete_image: Boolean flag indicating whether the metadata cache image
- * superblock message should be deleted and the cache image
- * file space freed after they have been read and decoded.
+ * superblock message should be deleted and the cache image
+ * file space freed after they have been read and decoded.
*
- * This flag should be set to TRUE iff the file is opened
- * R/W and there is a cache image to be read.
+ * This flag should be set to TRUE iff the file is opened
+ * R/W and there is a cache image to be read.
*
* image_addr: haddr_t containing the base address of the on disk
- * metadata cache image, or HADDR_UNDEF if that value is
- * undefined. Note that this field is used both in the
- * construction and write, and the read and decode of
- * metadata cache image blocks.
+ * metadata cache image, or HADDR_UNDEF if that value is
+ * undefined. Note that this field is used both in the
+ * construction and write, and the read and decode of
+ * metadata cache image blocks.
*
- * image_len: hsize_t containing the size of the on disk metadata cache
- * image, or zero if that value is undefined. Note that this
- * field is used both in the construction and write, and the
- * read and decode of metadata cache image blocks.
+ * image_len: hsize_t containing the size of the on disk metadata cache
+ * image, or zero if that value is undefined. Note that this
+ * field is used both in the construction and write, and the
+ * read and decode of metadata cache image blocks.
*
* image_data_len: size_t containing the number of bytes of data in the
- * on disk metadata cache image, or zero if that value is
- * undefined.
+ * on disk metadata cache image, or zero if that value is
+ * undefined.
*
- * In most cases, this value is the same as the image_len
- * above. It exists to allow for metadata cache image blocks
- * that are larger than the actual image. Thus in all
- * cases image_data_len <= image_len.
+ * In most cases, this value is the same as the image_len
+ * above. It exists to allow for metadata cache image blocks
+ * that are larger than the actual image. Thus in all
+ * cases image_data_len <= image_len.
*
* To create the metadata cache image, we must first serialize all the
* entries in the metadata cache. This is done by a scan of the index.
@@ -4410,35 +4440,35 @@ typedef struct H5C_tag_info_t {
* Note that all these new fields would work just as well as booleans.
*
* entries_loaded_counter: Number of entries loaded into the cache
- * since the last time this field was reset.
+ * since the last time this field was reset.
*
* entries_inserted_counter: Number of entries inserted into the cache
- * since the last time this field was reset.
+ * since the last time this field was reset.
*
* entries relocated_counter: Number of entries whose base address has
- * been changed since the last time this field was reset.
+ * been changed since the last time this field was reset.
*
* entry_fd_height_change_counter: Number of entries whose flush dependency
- * height has changed since the last time this field was reset.
+ * height has changed since the last time this field was reset.
*
* The following fields are used assemble the cache image prior to
* writing it to disk.
*
* num_entries_in_image: Unsigned integer field containing the number of entries
- * to be copied into the metadata cache image. Note that
- * this value will be less than the number of entries in
- * the cache, and the superblock and its related entries
- * are not written to the metadata cache image.
+ * to be copied into the metadata cache image. Note that
+ * this value will be less than the number of entries in
+ * the cache, and the superblock and its related entries
+ * are not written to the metadata cache image.
*
* image_entries: Pointer to a dynamically allocated array of instance of
- * H5C_image_entry_t of length num_entries_in_image, or NULL
- * if that array does not exist. This array is used to
- * assemble entry data to be included in the image, and to
- * sort them by flush dependency height and LRU rank.
+ * H5C_image_entry_t of length num_entries_in_image, or NULL
+ * if that array does not exist. This array is used to
+ * assemble entry data to be included in the image, and to
+ * sort them by flush dependency height and LRU rank.
*
* image_buffer: Pointer to the dynamically allocated buffer of length
- * image_len in which the metadata cache image is assembled,
- * or NULL if that buffer does not exist.
+ * image_len in which the metadata cache image is assembled,
+ * or NULL if that buffer does not exist.
*
*
* Free Space Manager Related fields:
@@ -4460,13 +4490,13 @@ typedef struct H5C_tag_info_t {
* flush is complete.
*
* rdfsm_settled: Boolean flag indicating whether the raw data free space
- * manager is settled -- i.e. whether the correct space has
- * been allocated for it in the file.
+ * manager is settled -- i.e. whether the correct space has
+ * been allocated for it in the file.
*
- * Note that the name of this field is deceptive. In the
- * multi file case, the flag applies to all free space
- * managers that are not involved in allocating space for
- * free space manager metadata.
+ * Note that the name of this field is deceptive. In the
+ * multi file case, the flag applies to all free space
+ * managers that are not involved in allocating space for
+ * free space manager metadata.
*
* mdfsm_settled: Boolean flag indicating whether the meta data free space
* manager is settled -- i.e. whether the correct space has
@@ -4474,8 +4504,8 @@ typedef struct H5C_tag_info_t {
*
* Note that the name of this field is deceptive. In the
* multi file case, the flag applies only to free space
- * managers that are involved in allocating space for free
- * space managers.
+ * managers that are involved in allocating space for free
+ * space managers.
*
*
* Statistics collection fields:
@@ -4485,144 +4515,144 @@ typedef struct H5C_tag_info_t {
* is true.
*
* hits: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type id
- * equal to the array index has been in cache when requested in
- * the current epoch.
+ * are used to record the number of times an entry with type id
+ * equal to the array index has been in cache when requested in
+ * the current epoch.
*
* misses: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type id
- * equal to the array index has not been in cache when
- * requested in the current epoch.
+ * are used to record the number of times an entry with type id
+ * equal to the array index has not been in cache when
+ * requested in the current epoch.
*
* write_protects: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry with
- * type id equal to the array index has been write protected
- * in the current epoch.
+ * cells are used to record the number of times an entry with
+ * type id equal to the array index has been write protected
+ * in the current epoch.
*
- * Observe that (hits + misses) = (write_protects + read_protects).
+ * Observe that (hits + misses) = (write_protects + read_protects).
*
* read_protects: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry with
- * type id equal to the array index has been read protected in
- * the current epoch.
+ * cells are used to record the number of times an entry with
+ * type id equal to the array index has been read protected in
+ * the current epoch.
*
* Observe that (hits + misses) = (write_protects + read_protects).
*
* max_read_protects: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to maximum number of simultaneous read
- * protects on any entry with type id equal to the array index
- * in the current epoch.
+ * The cells are used to maximum number of simultaneous read
+ * protects on any entry with type id equal to the array index
+ * in the current epoch.
*
* insertions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been inserted into the
- * cache in the current epoch.
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been inserted into the
+ * cache in the current epoch.
*
* pinned_insertions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has been inserted
- * pinned into the cache in the current epoch.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has been inserted
+ * pinned into the cache in the current epoch.
*
* clears: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times a dirty entry with type
- * id equal to the array index has been cleared in the current
- * epoch.
+ * are used to record the number of times a dirty entry with type
+ * id equal to the array index has been cleared in the current
+ * epoch.
*
* flushes: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type id
- * equal to the array index has been written to disk in the
+ * are used to record the number of times an entry with type id
+ * equal to the array index has been written to disk in the
* current epoch.
*
* evictions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type id
- * equal to the array index has been evicted from the cache in
- * the current epoch.
+ * are used to record the number of times an entry with type id
+ * equal to the array index has been evicted from the cache in
+ * the current epoch.
*
* take_ownerships: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry with
- * type id equal to the array index has been removed from the
- * cache via the H5C__TAKE_OWNERSHIP_FLAG in the current epoch.
+ * cells are used to record the number of times an entry with
+ * type id equal to the array index has been removed from the
+ * cache via the H5C__TAKE_OWNERSHIP_FLAG in the current epoch.
*
* moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been moved in the current
- * epoch.
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been moved in the current
+ * epoch.
*
* entry_flush_moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has been moved
- * during its pre-serialize callback in the current epoch.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has been moved
+ * during its pre-serialize callback in the current epoch.
*
* cache_flush_moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has been moved
- * during a cache flush in the current epoch.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has been moved
+ * during a cache flush in the current epoch.
*
* pins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been pinned in the current
- * epoch.
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been pinned in the current
+ * epoch.
*
* unpins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been unpinned in the current
- * epoch.
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been unpinned in the current
+ * epoch.
*
- * dirty_pins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been marked dirty while pinned
- * in the current epoch.
+ * dirty_pins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been marked dirty while pinned
+ * in the current epoch.
*
* pinned_flushes: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry
- * with type id equal to the array index has been flushed while
- * pinned in the current epoch.
+ * cells are used to record the number of times an entry
+ * with type id equal to the array index has been flushed while
+ * pinned in the current epoch.
*
* pinned_clears: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry
- * with type id equal to the array index has been cleared while
- * pinned in the current epoch.
+ * cells are used to record the number of times an entry
+ * with type id equal to the array index has been cleared while
+ * pinned in the current epoch.
*
* size_increases: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has increased in
- * size in the current epoch.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has increased in
+ * size in the current epoch.
*
* size_decreases: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has decreased in
- * size in the current epoch.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has decreased in
+ * size in the current epoch.
*
* entry_flush_size_changes: Array of int64 of length
- * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
- * the number of times an entry with type id equal to the
- * array index has changed size while in its pre-serialize
- * callback.
+ * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
+ * the number of times an entry with type id equal to the
+ * array index has changed size while in its pre-serialize
+ * callback.
*
* cache_flush_size_changes: Array of int64 of length
- * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
- * the number of times an entry with type id equal to the
- * array index has changed size during a cache flush
+ * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
+ * the number of times an entry with type id equal to the
+ * array index has changed size during a cache flush
*
* total_ht_insertions: Number of times entries have been inserted into the
- * hash table in the current epoch.
+ * hash table in the current epoch.
*
* total_ht_deletions: Number of times entries have been deleted from the
* hash table in the current epoch.
*
* successful_ht_searches: int64 containing the total number of successful
- * searches of the hash table in the current epoch.
+ * searches of the hash table in the current epoch.
*
* total_successful_ht_search_depth: int64 containing the total number of
- * entries other than the targets examined in successful
- * searches of the hash table in the current epoch.
+ * entries other than the targets examined in successful
+ * searches of the hash table in the current epoch.
*
* failed_ht_searches: int64 containing the total number of unsuccessful
* searches of the hash table in the current epoch.
*
* total_failed_ht_search_depth: int64 containing the total number of
* entries examined in unsuccessful searches of the hash
- * table in the current epoch.
+ * table in the current epoch.
*
* max_index_len: Largest value attained by the index_len field in the
* current epoch.
@@ -4631,10 +4661,10 @@ typedef struct H5C_tag_info_t {
* current epoch.
*
* max_clean_index_size: Largest value attained by the clean_index_size field
- * in the current epoch.
+ * in the current epoch.
*
* max_dirty_index_size: Largest value attained by the dirty_index_size field
- * in the current epoch.
+ * in the current epoch.
*
* max_slist_len: Largest value attained by the slist_len field in the
* current epoch.
@@ -4685,11 +4715,11 @@ typedef struct H5C_tag_info_t {
* The following fields track statistics on cache images.
*
* images_created: Integer field containing the number of cache images
- * created since the last time statistics were reset.
+ * created since the last time statistics were reset.
*
- * At present, this field must always be either 0 or 1.
- * Further, since cache images are only created at file
- * close, this field should only be set at that time.
+ * At present, this field must always be either 0 or 1.
+ * Further, since cache images are only created at file
+ * close, this field should only be set at that time.
*
* images_read: Integer field containing the number of cache images
* read from file. Note that reading an image is different
@@ -4704,12 +4734,12 @@ typedef struct H5C_tag_info_t {
* from process 0.
*
* images_loaded: Integer field containing the number of cache images
- * loaded since the last time statistics were reset.
+ * loaded since the last time statistics were reset.
*
- * At present, this field must always be either 0 or 1.
- * Further, since cache images are only loaded at the
- * time of the first protect or on file close, this value
- * should only change on those events.
+ * At present, this field must always be either 0 or 1.
+ * Further, since cache images are only loaded at the
+ * time of the first protect or on file close, this value
+ * should only change on those events.
*
* last_image_size: Size of the most recently loaded metadata cache image
* loaded into the cache, or zero if no image has been
@@ -4725,11 +4755,11 @@ typedef struct H5C_tag_info_t {
* of prefetched entries are tracked in the flushes and evictions arrays
* discused above.
*
- * prefetches: Number of prefetched entries that are loaded to the
- * cache.
+ * prefetches: Number of prefetched entries that are loaded to the
+ * cache.
*
* dirty_prefetches: Number of dirty prefetched entries that are loaded
- * into the cache.
+ * into the cache.
*
* prefetch_hits: Number of prefetched entries that are actually used.
*
@@ -4745,9 +4775,9 @@ typedef struct H5C_tag_info_t {
* obtain estimates of how frequently these restarts occur.
*
* slist_scan_restarts: Number of times a scan of the slist (that contains
- * calls to H5C__flush_single_entry()) has been restarted to
- * avoid potential issues with change of status of the next
- * entry in the scan.
+ * calls to H5C__flush_single_entry()) has been restarted to
+ * avoid potential issues with change of status of the next
+ * entry in the scan.
*
* LRU_scan_restarts: Number of times a scan of the LRU list (that contains
* calls to H5C__flush_single_entry()) has been restarted to
@@ -4755,43 +4785,43 @@ typedef struct H5C_tag_info_t {
* entry in the scan.
*
* index_scan_restarts: Number of times a scan of the index has been
- * restarted to avoid potential issues with load, insertion
- * or change in flush dependency height of an entry other
- * than the target entry as the result of call(s) to the
- * pre_serialize or serialize callbacks.
+ * restarted to avoid potential issues with load, insertion
+ * or change in flush dependency height of an entry other
+ * than the target entry as the result of call(s) to the
+ * pre_serialize or serialize callbacks.
*
- * Note that at present, this condition can only be triggered
- * by a call to H5C_serialize_single_entry().
+ * Note that at present, this condition can only be triggered
+ * by a call to H5C_serialize_single_entry().
*
* The remaining stats are collected only when both H5C_COLLECT_CACHE_STATS
* and H5C_COLLECT_CACHE_ENTRY_STATS are true.
*
* max_accesses: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the maximum number of times any single
- * entry with type id equal to the array index has been
- * accessed in the current epoch.
+ * are used to record the maximum number of times any single
+ * entry with type id equal to the array index has been
+ * accessed in the current epoch.
*
* min_accesses: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the minimum number of times any single
- * entry with type id equal to the array index has been
- * accessed in the current epoch.
+ * are used to record the minimum number of times any single
+ * entry with type id equal to the array index has been
+ * accessed in the current epoch.
*
* max_clears: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the maximum number of times any single
- * entry with type id equal to the array index has been cleared
- * in the current epoch.
+ * are used to record the maximum number of times any single
+ * entry with type id equal to the array index has been cleared
+ * in the current epoch.
*
* max_flushes: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the maximum number of times any single
- * entry with type id equal to the array index has been
- * flushed in the current epoch.
+ * are used to record the maximum number of times any single
+ * entry with type id equal to the array index has been
+ * flushed in the current epoch.
*
- * max_size: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
+ * max_size: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
* are used to record the maximum size of any single entry
- * with type id equal to the array index that has resided in
- * the cache in the current epoch.
+ * with type id equal to the array index that has resided in
+ * the cache in the current epoch.
*
- * max_pins: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
+ * max_pins: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
* are used to record the maximum number of times that any single
* entry with type id equal to the array index that has been
* marked as pinned in the cache in the current epoch.
@@ -4799,9 +4829,9 @@ typedef struct H5C_tag_info_t {
*
* Fields supporting testing:
*
- * prefix Array of char used to prefix debugging output. The
- * field is intended to allow marking of output of with
- * the processes mpi rank.
+ * prefix Array of char used to prefix debugging output. The
+ * field is intended to allow marking of output of with
+ * the processes mpi rank.
*
* get_entry_ptr_from_addr_counter: Counter used to track the number of
* times the H5C_get_entry_ptr_from_addr() function has been
@@ -4811,147 +4841,147 @@ typedef struct H5C_tag_info_t {
****************************************************************************/
struct H5C_t {
- uint32_t magic;
- hbool_t flush_in_progress;
+ uint32_t magic;
+ hbool_t flush_in_progress;
H5C_log_info_t *log_info;
- void * aux_ptr;
- int32_t max_type_id;
+ void * aux_ptr;
+ int32_t max_type_id;
const H5C_class_t * const *class_table_ptr;
size_t max_cache_size;
size_t min_clean_size;
- H5C_write_permitted_func_t check_write_permitted;
- hbool_t write_permitted;
- H5C_log_flush_func_t log_flush;
- hbool_t evictions_enabled;
- hbool_t close_warning_received;
+ H5C_write_permitted_func_t check_write_permitted;
+ hbool_t write_permitted;
+ H5C_log_flush_func_t log_flush;
+ hbool_t evictions_enabled;
+ hbool_t close_warning_received;
/* Fields for maintaining the [hash table] index of entries */
uint32_t index_len;
size_t index_size;
- uint32_t index_ring_len[H5C_RING_NTYPES];
- size_t index_ring_size[H5C_RING_NTYPES];
- size_t clean_index_size;
- size_t clean_index_ring_size[H5C_RING_NTYPES];
- size_t dirty_index_size;
- size_t dirty_index_ring_size[H5C_RING_NTYPES];
- H5C_cache_entry_t * index[H5C__HASH_TABLE_LEN];
+ uint32_t index_ring_len[H5C_RING_NTYPES];
+ size_t index_ring_size[H5C_RING_NTYPES];
+ size_t clean_index_size;
+ size_t clean_index_ring_size[H5C_RING_NTYPES];
+ size_t dirty_index_size;
+ size_t dirty_index_ring_size[H5C_RING_NTYPES];
+ H5C_cache_entry_t * index[H5C__HASH_TABLE_LEN];
uint32_t il_len;
size_t il_size;
- H5C_cache_entry_t * il_head;
- H5C_cache_entry_t * il_tail;
+ H5C_cache_entry_t * il_head;
+ H5C_cache_entry_t * il_tail;
/* Fields to detect entries removed during scans */
- int64_t entries_removed_counter;
- H5C_cache_entry_t * last_entry_removed_ptr;
- H5C_cache_entry_t * entry_watched_for_removal;
+ int64_t entries_removed_counter;
+ H5C_cache_entry_t * last_entry_removed_ptr;
+ H5C_cache_entry_t * entry_watched_for_removal;
/* Fields for maintaining list of in-order entries, for flushing */
hbool_t slist_enabled;
- hbool_t slist_changed;
+ hbool_t slist_changed;
uint32_t slist_len;
size_t slist_size;
- uint32_t slist_ring_len[H5C_RING_NTYPES];
- size_t slist_ring_size[H5C_RING_NTYPES];
+ uint32_t slist_ring_len[H5C_RING_NTYPES];
+ size_t slist_ring_size[H5C_RING_NTYPES];
H5SL_t * slist_ptr;
uint32_t num_last_entries;
#if H5C_DO_SANITY_CHECKS
- int32_t slist_len_increase;
- int64_t slist_size_increase;
+ int32_t slist_len_increase;
+ int64_t slist_size_increase;
#endif /* H5C_DO_SANITY_CHECKS */
/* Fields for maintaining list of tagged entries */
H5SL_t * tag_list;
hbool_t ignore_tags;
- uint32_t num_objs_corked;
+ uint32_t num_objs_corked;
/* Fields for tracking protected entries */
uint32_t pl_len;
size_t pl_size;
- H5C_cache_entry_t * pl_head_ptr;
- H5C_cache_entry_t * pl_tail_ptr;
+ H5C_cache_entry_t * pl_head_ptr;
+ H5C_cache_entry_t * pl_tail_ptr;
/* Fields for tracking pinned entries */
uint32_t pel_len;
size_t pel_size;
- H5C_cache_entry_t * pel_head_ptr;
- H5C_cache_entry_t * pel_tail_ptr;
+ H5C_cache_entry_t * pel_head_ptr;
+ H5C_cache_entry_t * pel_tail_ptr;
/* Fields for complete LRU list of entries */
uint32_t LRU_list_len;
size_t LRU_list_size;
- H5C_cache_entry_t * LRU_head_ptr;
- H5C_cache_entry_t * LRU_tail_ptr;
+ H5C_cache_entry_t * LRU_head_ptr;
+ H5C_cache_entry_t * LRU_tail_ptr;
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
/* Fields for clean LRU list of entries */
uint32_t cLRU_list_len;
size_t cLRU_list_size;
- H5C_cache_entry_t * cLRU_head_ptr;
- H5C_cache_entry_t * cLRU_tail_ptr;
+ H5C_cache_entry_t * cLRU_head_ptr;
+ H5C_cache_entry_t * cLRU_tail_ptr;
/* Fields for dirty LRU list of entries */
uint32_t dLRU_list_len;
size_t dLRU_list_size;
- H5C_cache_entry_t * dLRU_head_ptr;
- H5C_cache_entry_t * dLRU_tail_ptr;
+ H5C_cache_entry_t * dLRU_head_ptr;
+ H5C_cache_entry_t * dLRU_tail_ptr;
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
#ifdef H5_HAVE_PARALLEL
/* Fields for collective metadata reads */
uint32_t coll_list_len;
size_t coll_list_size;
- H5C_cache_entry_t * coll_head_ptr;
- H5C_cache_entry_t * coll_tail_ptr;
+ H5C_cache_entry_t * coll_head_ptr;
+ H5C_cache_entry_t * coll_tail_ptr;
/* Fields for collective metadata writes */
H5SL_t * coll_write_list;
#endif /* H5_HAVE_PARALLEL */
/* Fields for automatic cache size adjustment */
- hbool_t size_increase_possible;
- hbool_t flash_size_increase_possible;
- size_t flash_size_increase_threshold;
- hbool_t size_decrease_possible;
- hbool_t resize_enabled;
- hbool_t cache_full;
- hbool_t size_decreased;
- hbool_t resize_in_progress;
- hbool_t msic_in_progress;
- H5C_auto_size_ctl_t resize_ctl;
+ hbool_t size_increase_possible;
+ hbool_t flash_size_increase_possible;
+ size_t flash_size_increase_threshold;
+ hbool_t size_decrease_possible;
+ hbool_t resize_enabled;
+ hbool_t cache_full;
+ hbool_t size_decreased;
+ hbool_t resize_in_progress;
+ hbool_t msic_in_progress;
+ H5C_auto_size_ctl_t resize_ctl;
/* Fields for epoch markers used in automatic cache size adjustment */
- int32_t epoch_markers_active;
- hbool_t epoch_marker_active[H5C__MAX_EPOCH_MARKERS];
- int32_t epoch_marker_ringbuf[H5C__MAX_EPOCH_MARKERS+1];
- int32_t epoch_marker_ringbuf_first;
- int32_t epoch_marker_ringbuf_last;
- int32_t epoch_marker_ringbuf_size;
- H5C_cache_entry_t epoch_markers[H5C__MAX_EPOCH_MARKERS];
+ int32_t epoch_markers_active;
+ hbool_t epoch_marker_active[H5C__MAX_EPOCH_MARKERS];
+ int32_t epoch_marker_ringbuf[H5C__MAX_EPOCH_MARKERS+1];
+ int32_t epoch_marker_ringbuf_first;
+ int32_t epoch_marker_ringbuf_last;
+ int32_t epoch_marker_ringbuf_size;
+ H5C_cache_entry_t epoch_markers[H5C__MAX_EPOCH_MARKERS];
/* Fields for cache hit rate collection */
- int64_t cache_hits;
- int64_t cache_accesses;
+ int64_t cache_hits;
+ int64_t cache_accesses;
/* fields supporting generation of a cache image on file close */
- H5C_cache_image_ctl_t image_ctl;
- hbool_t serialization_in_progress;
- hbool_t load_image;
+ H5C_cache_image_ctl_t image_ctl;
+ hbool_t serialization_in_progress;
+ hbool_t load_image;
hbool_t image_loaded;
- hbool_t delete_image;
- haddr_t image_addr;
- hsize_t image_len;
- hsize_t image_data_len;
- int64_t entries_loaded_counter;
- int64_t entries_inserted_counter;
- int64_t entries_relocated_counter;
- int64_t entry_fd_height_change_counter;
- uint32_t num_entries_in_image;
- H5C_image_entry_t * image_entries;
+ hbool_t delete_image;
+ haddr_t image_addr;
+ hsize_t image_len;
+ hsize_t image_data_len;
+ int64_t entries_loaded_counter;
+ int64_t entries_inserted_counter;
+ int64_t entries_relocated_counter;
+ int64_t entry_fd_height_change_counter;
+ uint32_t num_entries_in_image;
+ H5C_image_entry_t * image_entries;
void * image_buffer;
/* Free Space Manager Related fields */
- hbool_t rdfsm_settled;
- hbool_t mdfsm_settled;
+ hbool_t rdfsm_settled;
+ hbool_t mdfsm_settled;
#if H5C_COLLECT_CACHE_STATS
/* stats fields */
@@ -4980,12 +5010,12 @@ struct H5C_t {
int64_t cache_flush_size_changes[H5C__MAX_NUM_TYPE_IDS + 1];
/* Fields for hash table operations */
- int64_t total_ht_insertions;
- int64_t total_ht_deletions;
- int64_t successful_ht_searches;
- int64_t total_successful_ht_search_depth;
- int64_t failed_ht_searches;
- int64_t total_failed_ht_search_depth;
+ int64_t total_ht_insertions;
+ int64_t total_ht_deletions;
+ int64_t successful_ht_searches;
+ int64_t total_successful_ht_search_depth;
+ int64_t failed_ht_searches;
+ int64_t total_failed_ht_search_depth;
uint32_t max_index_len;
size_t max_index_size;
size_t max_clean_index_size;
@@ -5014,20 +5044,20 @@ struct H5C_t {
int64_t entries_scanned_to_make_space;
/* Fields for tracking skip list scan restarts */
- int64_t slist_scan_restarts;
- int64_t LRU_scan_restarts;
- int64_t index_scan_restarts;
+ int64_t slist_scan_restarts;
+ int64_t LRU_scan_restarts;
+ int64_t index_scan_restarts;
/* Fields for tracking cache image operations */
- int32_t images_created;
- int32_t images_read;
- int32_t images_loaded;
- hsize_t last_image_size;
+ int32_t images_created;
+ int32_t images_read;
+ int32_t images_loaded;
+ hsize_t last_image_size;
/* Fields for tracking prefetched entries */
- int64_t prefetches;
- int64_t dirty_prefetches;
- int64_t prefetch_hits;
+ int64_t prefetches;
+ int64_t dirty_prefetches;
+ int64_t prefetch_hits;
#if H5C_COLLECT_CACHE_ENTRY_STATS
int32_t max_accesses[H5C__MAX_NUM_TYPE_IDS + 1];
@@ -5039,7 +5069,7 @@ struct H5C_t {
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
#endif /* H5C_COLLECT_CACHE_STATS */
- char prefix[H5C__PREFIX_LEN];
+ char prefix[H5C__PREFIX_LEN];
#ifndef NDEBUG
int64_t get_entry_ptr_from_addr_counter;
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 059e6dc..8286516 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -13,12 +13,12 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Cprivate.h
- * 6/3/04
- * John Mainzer
+ * Created: H5Cprivate.h
+ * 6/3/04
+ * John Mainzer
*
- * Purpose: Constants and typedefs available to the rest of the
- * library.
+ * Purpose: Constants and typedefs available to the rest of the
+ * library.
*
*-------------------------------------------------------------------------
*/
@@ -26,11 +26,11 @@
#ifndef _H5Cprivate_H
#define _H5Cprivate_H
-#include "H5Cpublic.h" /* public prototypes */
+#include "H5Cpublic.h" /* public prototypes */
/* Private headers needed by this header */
-#include "H5private.h" /* Generic Functions */
-#include "H5Fprivate.h" /* File access */
+#include "H5private.h" /* Generic Functions */
+#include "H5Fprivate.h" /* File access */
/**************************/
/* Library Private Macros */
@@ -44,9 +44,9 @@
* or decrease it if appropriate. Its purposes is to detect corrupt
* object sizes, so it probably doesn't matter if it is a bit big.
*
- * JRM - 5/17/04
+ * JRM - 5/17/04
*/
-#define H5C_MAX_ENTRY_SIZE ((size_t)(32 * 1024 * 1024))
+#define H5C_MAX_ENTRY_SIZE ((size_t)(32 * 1024 * 1024))
#ifdef H5_HAVE_PARALLEL
/* we must maintain the clean and dirty LRU lists when we are compiled
@@ -69,9 +69,9 @@
#define H5C__CLASS_SKIP_WRITES ((unsigned)0x4)
/* Flags for pre-serialize callback */
-#define H5C__SERIALIZE_NO_FLAGS_SET ((unsigned)0)
-#define H5C__SERIALIZE_RESIZED_FLAG ((unsigned)0x1)
-#define H5C__SERIALIZE_MOVED_FLAG ((unsigned)0x2)
+#define H5C__SERIALIZE_NO_FLAGS_SET ((unsigned)0)
+#define H5C__SERIALIZE_RESIZED_FLAG ((unsigned)0x1)
+#define H5C__SERIALIZE_MOVED_FLAG ((unsigned)0x2)
/* Upper and lower limits on cache size. These limits are picked
* out of a hat -- you should be able to change them as necessary.
@@ -81,8 +81,8 @@
* upper bound on cache size is rather large for the current hash table
* size.
*/
-#define H5C__MAX_MAX_CACHE_SIZE ((size_t)(128 * 1024 * 1024))
-#define H5C__MIN_MAX_CACHE_SIZE ((size_t)(1024))
+#define H5C__MAX_MAX_CACHE_SIZE ((size_t)(128 * 1024 * 1024))
+#define H5C__MIN_MAX_CACHE_SIZE ((size_t)(1024))
/* Default max cache size and min clean size are give here to make
* them generally accessible.
@@ -91,14 +91,15 @@
#define H5C__DEFAULT_MIN_CLEAN_SIZE ((size_t)(2 * 1024 * 1024))
/* Values for cache entry magic field */
-#define H5C__H5C_CACHE_ENTRY_T_MAGIC 0x005CAC0A
-#define H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC 0xDeadBeef
+#define H5C__H5C_CACHE_ENTRY_T_MAGIC 0x005CAC0A
+#define H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC 0xDeadBeef
/* Cache configuration validation definitions */
#define H5C_RESIZE_CFG__VALIDATE_GENERAL 0x1
#define H5C_RESIZE_CFG__VALIDATE_INCREMENT 0x2
#define H5C_RESIZE_CFG__VALIDATE_DECREMENT 0x4
#define H5C_RESIZE_CFG__VALIDATE_INTERACTIONS 0x8
+/* clang-format off */
#define H5C_RESIZE_CFG__VALIDATE_ALL \
( \
H5C_RESIZE_CFG__VALIDATE_GENERAL | \
@@ -106,30 +107,31 @@
H5C_RESIZE_CFG__VALIDATE_DECREMENT | \
H5C_RESIZE_CFG__VALIDATE_INTERACTIONS \
)
+/* clang-format on */
/* Cache configuration versions */
-#define H5C__CURR_AUTO_SIZE_CTL_VER 1
-#define H5C__CURR_AUTO_RESIZE_RPT_FCN_VER 1
-#define H5C__CURR_CACHE_IMAGE_CTL_VER 1
+#define H5C__CURR_AUTO_SIZE_CTL_VER 1
+#define H5C__CURR_AUTO_RESIZE_RPT_FCN_VER 1
+#define H5C__CURR_CACHE_IMAGE_CTL_VER 1
/* Default configuration settings */
-#define H5C__DEF_AR_UPPER_THRESHHOLD 0.9999f
-#define H5C__DEF_AR_LOWER_THRESHHOLD 0.9f
-#define H5C__DEF_AR_MAX_SIZE ((size_t)(16 * 1024 * 1024))
-#define H5C__DEF_AR_INIT_SIZE ((size_t)( 1 * 1024 * 1024))
-#define H5C__DEF_AR_MIN_SIZE ((size_t)( 1 * 1024 * 1024))
-#define H5C__DEF_AR_MIN_CLEAN_FRAC 0.5f
-#define H5C__DEF_AR_INCREMENT 2.0f
-#define H5C__DEF_AR_MAX_INCREMENT ((size_t)( 2 * 1024 * 1024))
+#define H5C__DEF_AR_UPPER_THRESHHOLD 0.9999f
+#define H5C__DEF_AR_LOWER_THRESHHOLD 0.9f
+#define H5C__DEF_AR_MAX_SIZE ((size_t)(16 * 1024 * 1024))
+#define H5C__DEF_AR_INIT_SIZE ((size_t)( 1 * 1024 * 1024))
+#define H5C__DEF_AR_MIN_SIZE ((size_t)( 1 * 1024 * 1024))
+#define H5C__DEF_AR_MIN_CLEAN_FRAC 0.5f
+#define H5C__DEF_AR_INCREMENT 2.0f
+#define H5C__DEF_AR_MAX_INCREMENT ((size_t)( 2 * 1024 * 1024))
#define H5C__DEF_AR_FLASH_MULTIPLE 1.0f
#define H5C__DEV_AR_FLASH_THRESHOLD 0.25f
-#define H5C__DEF_AR_DECREMENT 0.9f
-#define H5C__DEF_AR_MAX_DECREMENT ((size_t)( 1 * 1024 * 1024))
-#define H5C__DEF_AR_EPCHS_B4_EVICT 3
-#define H5C__DEF_AR_EMPTY_RESERVE 0.05f
-#define H5C__MIN_AR_EPOCH_LENGTH 100
-#define H5C__DEF_AR_EPOCH_LENGTH 50000
-#define H5C__MAX_AR_EPOCH_LENGTH 1000000
+#define H5C__DEF_AR_DECREMENT 0.9f
+#define H5C__DEF_AR_MAX_DECREMENT ((size_t)( 1 * 1024 * 1024))
+#define H5C__DEF_AR_EPCHS_B4_EVICT 3
+#define H5C__DEF_AR_EMPTY_RESERVE 0.05f
+#define H5C__MIN_AR_EPOCH_LENGTH 100
+#define H5C__DEF_AR_EPOCH_LENGTH 50000
+#define H5C__MAX_AR_EPOCH_LENGTH 1000000
/* #defines of flags used in the flags parameters in some of the
* following function calls. Note that not all flags are applicable
@@ -137,67 +139,67 @@
* function are ignored in that function.
*
* These flags apply to all function calls:
- * H5C__NO_FLAGS_SET (generic "no flags set" for all fcn calls)
+ * H5C__NO_FLAGS_SET (generic "no flags set" for all fcn calls)
*
*
* These flags apply to H5C_insert_entry():
- * H5C__SET_FLUSH_MARKER_FLAG
- * H5C__PIN_ENTRY_FLAG
- * H5C__FLUSH_LAST_FLAG ; super block only
- * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only
+ * H5C__SET_FLUSH_MARKER_FLAG
+ * H5C__PIN_ENTRY_FLAG
+ * H5C__FLUSH_LAST_FLAG ; super block only
+ * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only
*
* These flags apply to H5C_protect()
- * H5C__READ_ONLY_FLAG
- * H5C__FLUSH_LAST_FLAG ; super block only
- * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only
+ * H5C__READ_ONLY_FLAG
+ * H5C__FLUSH_LAST_FLAG ; super block only
+ * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only
*
* These flags apply to H5C_unprotect():
- * H5C__SET_FLUSH_MARKER_FLAG
- * H5C__DELETED_FLAG
- * H5C__DIRTIED_FLAG
- * H5C__PIN_ENTRY_FLAG
- * H5C__UNPIN_ENTRY_FLAG
- * H5C__FREE_FILE_SPACE_FLAG
+ * H5C__SET_FLUSH_MARKER_FLAG
+ * H5C__DELETED_FLAG
+ * H5C__DIRTIED_FLAG
+ * H5C__PIN_ENTRY_FLAG
+ * H5C__UNPIN_ENTRY_FLAG
+ * H5C__FREE_FILE_SPACE_FLAG
* H5C__TAKE_OWNERSHIP_FLAG
*
* These flags apply to H5C_expunge_entry():
- * H5C__FREE_FILE_SPACE_FLAG
+ * H5C__FREE_FILE_SPACE_FLAG
*
* These flags apply to H5C_evict():
- * H5C__EVICT_ALLOW_LAST_PINS_FLAG
+ * H5C__EVICT_ALLOW_LAST_PINS_FLAG
*
* These flags apply to H5C_flush_cache():
- * H5C__FLUSH_INVALIDATE_FLAG
- * H5C__FLUSH_CLEAR_ONLY_FLAG
- * H5C__FLUSH_MARKED_ENTRIES_FLAG
- * H5C__FLUSH_IGNORE_PROTECTED_FLAG (can't use this flag in combination
- * with H5C__FLUSH_INVALIDATE_FLAG)
- * H5C__DURING_FLUSH_FLAG
+ * H5C__FLUSH_INVALIDATE_FLAG
+ * H5C__FLUSH_CLEAR_ONLY_FLAG
+ * H5C__FLUSH_MARKED_ENTRIES_FLAG
+ * H5C__FLUSH_IGNORE_PROTECTED_FLAG (can't use this flag in combination
+ * with H5C__FLUSH_INVALIDATE_FLAG)
+ * H5C__DURING_FLUSH_FLAG
*
* These flags apply to H5C_flush_single_entry():
- * H5C__FLUSH_INVALIDATE_FLAG
- * H5C__FLUSH_CLEAR_ONLY_FLAG
- * H5C__FLUSH_MARKED_ENTRIES_FLAG
+ * H5C__FLUSH_INVALIDATE_FLAG
+ * H5C__FLUSH_CLEAR_ONLY_FLAG
+ * H5C__FLUSH_MARKED_ENTRIES_FLAG
* H5C__TAKE_OWNERSHIP_FLAG
* H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG
* H5C__GENERATE_IMAGE_FLAG
* H5C__UPDATE_PAGE_BUFFER_FLAG
*/
-#define H5C__NO_FLAGS_SET 0x00000
-#define H5C__SET_FLUSH_MARKER_FLAG 0x00001
-#define H5C__DELETED_FLAG 0x00002
-#define H5C__DIRTIED_FLAG 0x00004
-#define H5C__PIN_ENTRY_FLAG 0x00008
-#define H5C__UNPIN_ENTRY_FLAG 0x00010
-#define H5C__FLUSH_INVALIDATE_FLAG 0x00020
-#define H5C__FLUSH_CLEAR_ONLY_FLAG 0x00040
-#define H5C__FLUSH_MARKED_ENTRIES_FLAG 0x00080
-#define H5C__FLUSH_IGNORE_PROTECTED_FLAG 0x00100
-#define H5C__READ_ONLY_FLAG 0x00200
-#define H5C__FREE_FILE_SPACE_FLAG 0x00400
-#define H5C__TAKE_OWNERSHIP_FLAG 0x00800
-#define H5C__FLUSH_LAST_FLAG 0x01000
-#define H5C__FLUSH_COLLECTIVELY_FLAG 0x02000
+#define H5C__NO_FLAGS_SET 0x00000
+#define H5C__SET_FLUSH_MARKER_FLAG 0x00001
+#define H5C__DELETED_FLAG 0x00002
+#define H5C__DIRTIED_FLAG 0x00004
+#define H5C__PIN_ENTRY_FLAG 0x00008
+#define H5C__UNPIN_ENTRY_FLAG 0x00010
+#define H5C__FLUSH_INVALIDATE_FLAG 0x00020
+#define H5C__FLUSH_CLEAR_ONLY_FLAG 0x00040
+#define H5C__FLUSH_MARKED_ENTRIES_FLAG 0x00080
+#define H5C__FLUSH_IGNORE_PROTECTED_FLAG 0x00100
+#define H5C__READ_ONLY_FLAG 0x00200
+#define H5C__FREE_FILE_SPACE_FLAG 0x00400
+#define H5C__TAKE_OWNERSHIP_FLAG 0x00800
+#define H5C__FLUSH_LAST_FLAG 0x01000
+#define H5C__FLUSH_COLLECTIVELY_FLAG 0x02000
#define H5C__EVICT_ALLOW_LAST_PINS_FLAG 0x04000
#define H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG 0x08000
#define H5C__DURING_FLUSH_FLAG 0x10000 /* Set when the entire cache is being flushed */
@@ -206,18 +208,18 @@
/* Debugging/sanity checking/statistics settings */
#ifndef NDEBUG
-#define H5C_DO_SANITY_CHECKS 1
-#define H5C_DO_SLIST_SANITY_CHECKS 0
-#define H5C_DO_TAGGING_SANITY_CHECKS 1
-#define H5C_DO_EXTREME_SANITY_CHECKS 0
+#define H5C_DO_SANITY_CHECKS 1
+#define H5C_DO_SLIST_SANITY_CHECKS 0
+#define H5C_DO_TAGGING_SANITY_CHECKS 1
+#define H5C_DO_EXTREME_SANITY_CHECKS 0
#else /* NDEBUG */
/* With rare execptions, the following defines should be set
* to 0 if NDEBUG is defined
*/
-#define H5C_DO_SANITY_CHECKS 0
-#define H5C_DO_SLIST_SANITY_CHECKS 0
-#define H5C_DO_TAGGING_SANITY_CHECKS 0
-#define H5C_DO_EXTREME_SANITY_CHECKS 0
+#define H5C_DO_SANITY_CHECKS 0
+#define H5C_DO_SLIST_SANITY_CHECKS 0
+#define H5C_DO_TAGGING_SANITY_CHECKS 0
+#define H5C_DO_EXTREME_SANITY_CHECKS 0
#endif /* NDEBUG */
/* Cork actions: cork/uncork/get cork status of an object */
@@ -233,7 +235,7 @@
* routines that the fractal heap direct block (and global heap) serialize
* calls can use when resizing (and re-allocating) their image in the
* cache. -QAK */
-#define H5C_DO_MEMORY_SANITY_CHECKS 0
+#define H5C_DO_MEMORY_SANITY_CHECKS 0
/* H5C_COLLECT_CACHE_STATS controls overall collection of statistics
* on cache activity. In general, this #define should be set to 1 in
@@ -241,9 +243,9 @@
*/
#ifndef NDEBUG
-#define H5C_COLLECT_CACHE_STATS 1
+#define H5C_COLLECT_CACHE_STATS 1
#else /* NDEBUG */
-#define H5C_COLLECT_CACHE_STATS 0
+#define H5C_COLLECT_CACHE_STATS 0
#endif /* NDEBUG */
/* H5C_COLLECT_CACHE_ENTRY_STATS controls collection of statistics
@@ -253,9 +255,9 @@
* H5C_COLLECT_CACHE_STATS is also defined to true.
*/
#if H5C_COLLECT_CACHE_STATS
-#define H5C_COLLECT_CACHE_ENTRY_STATS 1
+#define H5C_COLLECT_CACHE_ENTRY_STATS 1
#else
-#define H5C_COLLECT_CACHE_ENTRY_STATS 0
+#define H5C_COLLECT_CACHE_ENTRY_STATS 0
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -274,204 +276,204 @@ typedef struct H5C_t H5C_t;
* used by the metadata cache for each class of metadata cache entry.
* The fields of the structure are discussed below:
*
- * id: Integer field containing the unique ID of the class of metadata
- * cache entries.
+ * id: Integer field containing the unique ID of the class of metadata
+ * cache entries.
*
* name: Pointer to a string containing the name of the class of metadata
- * cache entries.
+ * cache entries.
*
* mem_type: Instance of H5FD_mem_t, that is used to supply the
- * mem type passed into H5F_block_read().
+ * mem type passed into H5F_block_read().
*
* flags: Flags indicating class-specific behavior.
*
- * Possible flags are:
+ * Possible flags are:
*
- * H5C__CLASS_NO_FLAGS_SET: No special processing.
+ * H5C__CLASS_NO_FLAGS_SET: No special processing.
*
- * H5C__CLASS_SPECULATIVE_LOAD_FLAG: This flag is used only in
+ * H5C__CLASS_SPECULATIVE_LOAD_FLAG: This flag is used only in
* H5C_load_entry(). When it is set, entries are
- * permitted to change their sizes on the first attempt
- * to load.
- *
- * If the new size is larger than the old, the read buffer
- * is reallocated to the new size, loaded from file, and the
- * deserialize routine is called a second time on the
- * new buffer. The entry returned by the first call to
- * the deserialize routine is discarded (via the free_icr
- * call) after the new size is retrieved (via the image_len
- * call). Note that the new size is used as the size of the
- * entry in the cache.
- *
- * If the new size is smaller than the old, no new loads
- * or deserializes are performed, but the new size becomes
- * the size of the entry in the cache.
- *
- * When this flag is set, an attempt to read past the
- * end of file could occur. In this case, if the size
- * returned get_load_size callback would result in a
- * read past the end of file, the size is truncated to
- * avoid this, and processing proceeds as normal.
+ * permitted to change their sizes on the first attempt
+ * to load.
+ *
+ * If the new size is larger than the old, the read buffer
+ * is reallocated to the new size, loaded from file, and the
+ * deserialize routine is called a second time on the
+ * new buffer. The entry returned by the first call to
+ * the deserialize routine is discarded (via the free_icr
+ * call) after the new size is retrieved (via the image_len
+ * call). Note that the new size is used as the size of the
+ * entry in the cache.
+ *
+ * If the new size is smaller than the old, no new loads
+ * or deserializes are performed, but the new size becomes
+ * the size of the entry in the cache.
+ *
+ * When this flag is set, an attempt to read past the
+ * end of file could occur. In this case, if the size
+ * returned get_load_size callback would result in a
+ * read past the end of file, the size is truncated to
+ * avoid this, and processing proceeds as normal.
*
* The following flags may only appear in test code.
*
- * H5C__CLASS_SKIP_READS: This flags is intended only for use in test
- * code. When it is set, reads on load will be skipped,
- * and an uninitialize buffer will be passed to the
- * deserialize function.
+ * H5C__CLASS_SKIP_READS: This flags is intended only for use in test
+ * code. When it is set, reads on load will be skipped,
+ * and an uninitialize buffer will be passed to the
+ * deserialize function.
*
- * H5C__CLASS_SKIP_WRITES: This flags is intended only for use in test
- * code. When it is set, writes of buffers prepared by the
- * serialize callback will be skipped.
+ * H5C__CLASS_SKIP_WRITES: This flags is intended only for use in test
+ * code. When it is set, writes of buffers prepared by the
+ * serialize callback will be skipped.
*
* GET_INITIAL_LOAD_SIZE: Pointer to the 'get initial load size' function.
*
- * This function determines the size based on the information in the
- * parameter "udata" or an initial speculative guess. The size is
- * returned in the parameter "image_len_ptr".
+ * This function determines the size based on the information in the
+ * parameter "udata" or an initial speculative guess. The size is
+ * returned in the parameter "image_len_ptr".
*
- * For an entry with H5C__CLASS_NO_FLAGS_SET:
- * This function returns in "image_len_ptr" the on disk size of the
+ * For an entry with H5C__CLASS_NO_FLAGS_SET:
+ * This function returns in "image_len_ptr" the on disk size of the
* entry.
*
- * For an entry with H5C__CLASS_SPECULATIVE_LOAD_FLAG:
- * This function returns in "image_len_ptr" an initial guess of the
+ * For an entry with H5C__CLASS_SPECULATIVE_LOAD_FLAG:
+ * This function returns in "image_len_ptr" an initial guess of the
* entry's on disk size. This many bytes will be loaded from
* the file and then passed to 'get_final_load_size' callback
* for the actual (final) image length to be determined.
*
- * The typedef for the get_initial_load_size callback is as follows:
+ * The typedef for the get_initial_load_size callback is as follows:
*
- * typedef herr_t (*H5C_get_initial_load_size_func_t)(void *udata_ptr,
- * size_t *image_len_ptr);
+ * typedef herr_t (*H5C_get_initial_load_size_func_t)(void *udata_ptr,
+ * size_t *image_len_ptr);
*
- * The parameters of the get_initial_load_size callback are as follows:
+ * The parameters of the get_initial_load_size callback are as follows:
*
- * udata_ptr: Pointer to user data provided in the protect call, which
- * will also be passed through to the 'get_final_load_size',
+ * udata_ptr: Pointer to user data provided in the protect call, which
+ * will also be passed through to the 'get_final_load_size',
* 'verify_chksum', and 'deserialize' callbacks.
*
- * image_len_ptr: Pointer to the length in bytes of the in-file image to
+ * image_len_ptr: Pointer to the length in bytes of the in-file image to
* be deserialized is to be returned.
*
* This value is used by the cache to determine the size of
* the disk image for the metadata, in order to read the disk
* image from the file.
*
- * Processing in the get_load_size function should proceed as follows:
+ * Processing in the get_load_size function should proceed as follows:
*
- * If successful, the function will place the length in the *image_len_ptr
+ * If successful, the function will place the length in the *image_len_ptr
* associated with supplied user data and then return SUCCEED.
*
- * On failure, the function must return FAIL and push error information
- * onto the error stack with the error API routines, without modifying
+ * On failure, the function must return FAIL and push error information
+ * onto the error stack with the error API routines, without modifying
* the value pointed to by image_len_ptr.
*
*
* GET_FINAL_LOAD_SIZE: Pointer to the 'get final load size' function.
*
- * This function determines the final size of a speculatively loaded
+ * This function determines the final size of a speculatively loaded
* metadata cache entry based on the parameter "image" and the "udata"
* parameters. This callback _must_ be implemented for cache clients
* which set the H5C__CLASS_SPECULATIVE_LOAD_FLAG and must return the
* actual length of on-disk image after being called once.
*
- * This function might deserialize the needed metadata information to
- * determine the actual size. The size is returned in the parameter
+ * This function might deserialize the needed metadata information to
+ * determine the actual size. The size is returned in the parameter
* "actual_len_ptr".
*
- * The typedef for the get_load_size callback is as follows:
+ * The typedef for the get_load_size callback is as follows:
*
- * typedef herr_t (*H5C_get_final_load_size_func_t)(const void *image_ptr,
- * size_t image_len,
- * void *udata_ptr,
- * size_t *actual_len_ptr);
+ * typedef herr_t (*H5C_get_final_load_size_func_t)(const void *image_ptr,
+ * size_t image_len,
+ * void *udata_ptr,
+ * size_t *actual_len_ptr);
*
- * The parameters of the get_load_size callback are as follows:
+ * The parameters of the get_load_size callback are as follows:
*
- * image_ptr: Pointer to a buffer containing the (possibly partial)
+ * image_ptr: Pointer to a buffer containing the (possibly partial)
* metadata read in.
*
- * image_len: The length in bytes of the (possibly partial) in-file image
+ * image_len: The length in bytes of the (possibly partial) in-file image
* to be queried for an actual length.
*
- * udata_ptr: Pointer to user data provided in the protect call, which
- * will also be passed through to the 'verify_chksum' and
+ * udata_ptr: Pointer to user data provided in the protect call, which
+ * will also be passed through to the 'verify_chksum' and
* 'deserialize' callbacks.
*
- * actual_len_ptr: Pointer to the location containing the actual length
- * of the metadata entry on disk.
+ * actual_len_ptr: Pointer to the location containing the actual length
+ * of the metadata entry on disk.
*
- * Processing in the get_final_load_size function should proceed as follows:
+ * Processing in the get_final_load_size function should proceed as follows:
*
- * If successful, the function will place the length in the *actual_len_ptr
+ * If successful, the function will place the length in the *actual_len_ptr
* associated with supplied image and/or user data and then return SUCCEED.
*
- * On failure, the function must return FAIL and push error information
- * onto the error stack with the error API routines, without modifying
+ * On failure, the function must return FAIL and push error information
+ * onto the error stack with the error API routines, without modifying
* the value pointed to by actual_len_ptr.
*
*
* VERIFY_CHKSUM: Pointer to the verify_chksum function.
*
- * This function verifies the checksum computed for the metadata is
- * the same as the checksum stored in the metadata.
+ * This function verifies the checksum computed for the metadata is
+ * the same as the checksum stored in the metadata.
*
- * It computes the checksum based on the metadata stored in the
- * parameter "image_ptr" and the actual length of the metadata in the
- * parameter "len" which is obtained from the "get_load_size" callback.
+ * It computes the checksum based on the metadata stored in the
+ * parameter "image_ptr" and the actual length of the metadata in the
+ * parameter "len" which is obtained from the "get_load_size" callback.
*
- * The typedef for the verify_chksum callback is as follows:
+ * The typedef for the verify_chksum callback is as follows:
*
- * typedef htri_t (*H5C_verify_chksum_func_t)(const void *image_ptr,
- * size_t len,
- * void *udata_ptr);
+ * typedef htri_t (*H5C_verify_chksum_func_t)(const void *image_ptr,
+ * size_t len,
+ * void *udata_ptr);
*
- * The parameters of the verify_chksum callback are as follows:
+ * The parameters of the verify_chksum callback are as follows:
*
- * image_ptr: Pointer to a buffer containing the metadata read in.
+ * image_ptr: Pointer to a buffer containing the metadata read in.
*
- * len: The actual length of the metadata.
+ * len: The actual length of the metadata.
*
- * udata_ptr: Pointer to user data.
+ * udata_ptr: Pointer to user data.
*
*
* DESERIALIZE: Pointer to the deserialize function.
*
- * This function must be able to deserialize a buffer containing the
+ * This function must be able to deserialize a buffer containing the
* on-disk image of a metadata cache entry, allocate and initialize the
* equivalent in core representation, and return a pointer to that
* representation.
*
- * The typedef for the deserialize callback is as follows:
+ * The typedef for the deserialize callback is as follows:
*
- * typedef void *(*H5C_deserialize_func_t)(const void * image_ptr,
- * size_t len,
+ * typedef void *(*H5C_deserialize_func_t)(const void * image_ptr,
+ * size_t len,
* void * udata_ptr,
* boolean * dirty_ptr);
*
- * The parameters of the deserialize callback are as follows:
+ * The parameters of the deserialize callback are as follows:
*
- * image_ptr: Pointer to a buffer of length len containing the
- * contents of the file starting at addr and continuing
- * for len bytes.
+ * image_ptr: Pointer to a buffer of length len containing the
+ * contents of the file starting at addr and continuing
+ * for len bytes.
*
- * len: Length in bytes of the in file image to be deserialized.
+ * len: Length in bytes of the in file image to be deserialized.
*
* This parameter is supplied mainly for sanity checking.
* Sanity checks should be performed when compiled in debug
* mode, but the parameter may be unused when compiled in
* production mode.
*
- * udata_ptr: Pointer to user data provided in the protect call, which
- * must be passed through to the deserialize callback.
+ * udata_ptr: Pointer to user data provided in the protect call, which
+ * must be passed through to the deserialize callback.
*
* dirty_ptr: Pointer to boolean which the deserialize function
- * must use to mark the entry dirty if it has to modify
- * the entry to clean up file corruption left over from
- * an old bug in the HDF5 library.
+ * must use to mark the entry dirty if it has to modify
+ * the entry to clean up file corruption left over from
+ * an old bug in the HDF5 library.
*
- * Processing in the deserialize function should proceed as follows:
+ * Processing in the deserialize function should proceed as follows:
*
* If the image contains valid data, and is of the correct length,
* the deserialize function must allocate space for an in-core
@@ -499,7 +501,7 @@ typedef struct H5C_t H5C_t;
*
* IMAGE_LEN: Pointer to the image length callback.
*
- * The image_len callback is used to obtain the size of newly inserted
+ * The image_len callback is used to obtain the size of newly inserted
* entries and assert verification.
*
* The typedef for the image_len callback is as follows:
@@ -507,29 +509,29 @@ typedef struct H5C_t H5C_t;
* typedef herr_t (*H5C_image_len_func_t)(void *thing,
* size_t *image_len_ptr);
*
- * The parameters of the image_len callback are as follows:
+ * The parameters of the image_len callback are as follows:
*
- * thing: Pointer to the in core representation of the entry.
+ * thing: Pointer to the in core representation of the entry.
*
- * image_len_ptr: Pointer to size_t in which the callback will return
- * the length (in bytes) of the cache entry.
+ * image_len_ptr: Pointer to size_t in which the callback will return
+ * the length (in bytes) of the cache entry.
*
- * Processing in the image_len function should proceed as follows:
+ * Processing in the image_len function should proceed as follows:
*
- * If successful, the function will place the length of the on disk
- * image associated with the in core representation provided in the
- * thing parameter in *image_len_ptr, and then return SUCCEED.
+ * If successful, the function will place the length of the on disk
+ * image associated with the in core representation provided in the
+ * thing parameter in *image_len_ptr, and then return SUCCEED.
*
- * If the function fails, it must return FAIL and push error information
+ * If the function fails, it must return FAIL and push error information
* onto the error stack with the error API routines, and return without
* modifying the values pointed to by the image_len_ptr parameter.
*
*
* PRE_SERIALIZE: Pointer to the pre-serialize callback.
*
- * The pre-serialize callback is invoked by the metadata cache before
- * it needs a current on-disk image of the metadata entry for purposes
- * either constructing a journal or flushing the entry to disk.
+ * The pre-serialize callback is invoked by the metadata cache before
+ * it needs a current on-disk image of the metadata entry for purposes
+ * either constructing a journal or flushing the entry to disk.
*
* If the client needs to change the address or length of the entry prior
* to flush, the pre-serialize callback is responsible for these actions,
@@ -537,28 +539,28 @@ typedef struct H5C_t H5C_t;
* responsible for serializing the data structure, not moving it on disk
* or resizing it.
*
- * In addition, the client may use the pre-serialize callback to
- * ensure that the entry is ready to be flushed -- in particular,
- * if the entry contains references to other entries that are in
- * temporary file space, the pre-serialize callback must move those
- * entries into real file space so that the serialzed entry will
- * contain no invalid data.
+ * In addition, the client may use the pre-serialize callback to
+ * ensure that the entry is ready to be flushed -- in particular,
+ * if the entry contains references to other entries that are in
+ * temporary file space, the pre-serialize callback must move those
+ * entries into real file space so that the serialzed entry will
+ * contain no invalid data.
*
- * One would think that the base address and length of
- * the length of the entry's image on disk would be well known.
- * However, that need not be the case as free space section info
- * entries will change size (and possibly location) depending on the
- * number of blocks of free space being manages, and fractal heap
- * direct blocks can change compressed size (and possibly location)
- * on serialization if compression is enabled. Similarly, it may
- * be necessary to move entries from temporary to real file space.
+ * One would think that the base address and length of
+ * the length of the entry's image on disk would be well known.
+ * However, that need not be the case as free space section info
+ * entries will change size (and possibly location) depending on the
+ * number of blocks of free space being manages, and fractal heap
+ * direct blocks can change compressed size (and possibly location)
+ * on serialization if compression is enabled. Similarly, it may
+ * be necessary to move entries from temporary to real file space.
*
- * The pre-serialize callback must report any such changes to the
- * cache, which must then update its internal structures as needed.
+ * The pre-serialize callback must report any such changes to the
+ * cache, which must then update its internal structures as needed.
*
- * The typedef for the pre-serialize callback is as follows:
+ * The typedef for the pre-serialize callback is as follows:
*
- * typedef herr_t (*H5C_pre_serialize_func_t)(H5F_t *f,
+ * typedef herr_t (*H5C_pre_serialize_func_t)(H5F_t *f,
* void * thing,
* haddr_t addr,
* size_t len,
@@ -566,154 +568,154 @@ typedef struct H5C_t H5C_t;
* size_t * new_len_ptr,
* unsigned * flags_ptr);
*
- * The parameters of the pre-serialize callback are as follows:
+ * The parameters of the pre-serialize callback are as follows:
*
- * f: File pointer -- needed if other metadata cache entries
- * must be modified in the process of serializing the
- * target entry.
+ * f: File pointer -- needed if other metadata cache entries
+ * must be modified in the process of serializing the
+ * target entry.
*
- * thing: Pointer to void containing the address of the in core
- * representation of the target metadata cache entry.
- * This is the same pointer returned by a protect of the
- * addr and len given above.
+ * thing: Pointer to void containing the address of the in core
+ * representation of the target metadata cache entry.
+ * This is the same pointer returned by a protect of the
+ * addr and len given above.
*
- * addr: Base address in file of the entry to be serialized.
+ * addr: Base address in file of the entry to be serialized.
*
- * This parameter is supplied mainly for sanity checking.
- * Sanity checks should be performed when compiled in debug
- * mode, but the parameter may be unused when compiled in
- * production mode.
+ * This parameter is supplied mainly for sanity checking.
+ * Sanity checks should be performed when compiled in debug
+ * mode, but the parameter may be unused when compiled in
+ * production mode.
*
- * len: Length in bytes of the in file image of the entry to be
- * serialized. Also the size the image passed to the
- * serialize callback (discussed below) unless that
- * value is altered by this function.
+ * len: Length in bytes of the in file image of the entry to be
+ * serialized. Also the size the image passed to the
+ * serialize callback (discussed below) unless that
+ * value is altered by this function.
*
- * This parameter is supplied mainly for sanity checking.
- * Sanity checks should be performed when compiled in debug
- * mode, but the parameter may be unused when compiled in
- * production mode.
+ * This parameter is supplied mainly for sanity checking.
+ * Sanity checks should be performed when compiled in debug
+ * mode, but the parameter may be unused when compiled in
+ * production mode.
*
- * new_addr_ptr: Pointer to haddr_t. If the entry is moved by
- * the serialize function, the new on disk base address must
- * be stored in *new_addr_ptr, and the appropriate flag set
- * in *flags_ptr.
+ * new_addr_ptr: Pointer to haddr_t. If the entry is moved by
+ * the serialize function, the new on disk base address must
+ * be stored in *new_addr_ptr, and the appropriate flag set
+ * in *flags_ptr.
*
- * If the entry is not moved by the serialize function,
- * *new_addr_ptr is undefined on pre-serialize callback
- * return.
+ * If the entry is not moved by the serialize function,
+ * *new_addr_ptr is undefined on pre-serialize callback
+ * return.
*
- * new_len_ptr: Pointer to size_t. If the entry is resized by the
- * serialize function, the new length of the on disk image
- * must be stored in *new_len_ptr, and the appropriate flag set
+ * new_len_ptr: Pointer to size_t. If the entry is resized by the
+ * serialize function, the new length of the on disk image
+ * must be stored in *new_len_ptr, and the appropriate flag set
* in *flags_ptr.
*
- * If the entry is not resized by the pre-serialize function,
- * *new_len_ptr is undefined on pre-serialize callback
- * return.
+ * If the entry is not resized by the pre-serialize function,
+ * *new_len_ptr is undefined on pre-serialize callback
+ * return.
*
- * flags_ptr: Pointer to an unsigned integer used to return flags
- * indicating whether the preserialize function resized or moved
- * the entry. If the entry was neither resized or moved, the
+ * flags_ptr: Pointer to an unsigned integer used to return flags
+ * indicating whether the preserialize function resized or moved
+ * the entry. If the entry was neither resized or moved, the
* serialize function must set *flags_ptr to zero. The
* H5C__SERIALIZE_RESIZED_FLAG or H5C__SERIALIZE_MOVED_FLAG must
* be set to indicate a resize or move respectively.
*
- * If the H5C__SERIALIZE_RESIZED_FLAG is set, the new length
- * must be stored in *new_len_ptr.
+ * If the H5C__SERIALIZE_RESIZED_FLAG is set, the new length
+ * must be stored in *new_len_ptr.
*
- * If the H5C__SERIALIZE_MOVED_FLAG flag is set, the
- * new image base address must be stored in *new_addr_ptr.
+ * If the H5C__SERIALIZE_MOVED_FLAG flag is set, the
+ * new image base address must be stored in *new_addr_ptr.
*
- * Processing in the pre-serialize function should proceed as follows:
+ * Processing in the pre-serialize function should proceed as follows:
*
- * The pre-serialize function must examine the in core representation
- * indicated by the thing parameter, if the pre-serialize function does
+ * The pre-serialize function must examine the in core representation
+ * indicated by the thing parameter, if the pre-serialize function does
* not need to change the size or location of the on-disk image, it must
* set *flags_ptr to zero.
*
- * If the size of the on-disk image must be changed, the pre-serialize
+ * If the size of the on-disk image must be changed, the pre-serialize
* function must load the length of the new image into *new_len_ptr, and
* set the H5C__SERIALIZE_RESIZED_FLAG in *flags_ptr.
*
- * If the base address of the on disk image must be changed, the
+ * If the base address of the on disk image must be changed, the
* pre-serialize function must set *new_addr_ptr to the new base address,
* and set the H5C__SERIALIZE_MOVED_FLAG in *flags_ptr.
*
- * In addition, the pre-serialize callback may perform any other
- * processing required before the entry is written to disk
+ * In addition, the pre-serialize callback may perform any other
+ * processing required before the entry is written to disk
*
- * If it is successful, the function must return SUCCEED.
+ * If it is successful, the function must return SUCCEED.
*
- * If it fails for any reason, the function must return FAIL and
- * push error information on the error stack with the error API
- * routines.
+ * If it fails for any reason, the function must return FAIL and
+ * push error information on the error stack with the error API
+ * routines.
*
*
* SERIALIZE: Pointer to the serialize callback.
*
- * The serialize callback is invoked by the metadata cache whenever
- * it needs a current on disk image of the metadata entry for purposes
- * either constructing a journal entry or flushing the entry to disk.
+ * The serialize callback is invoked by the metadata cache whenever
+ * it needs a current on disk image of the metadata entry for purposes
+ * either constructing a journal entry or flushing the entry to disk.
*
- * At this point, the base address and length of the entry's image on
+ * At this point, the base address and length of the entry's image on
* disk must be well known and not change during the serialization
* process.
*
- * While any size and/or location changes must have been handled
- * by a pre-serialize call, the client may elect to handle any other
- * changes to the entry required to place it in correct form for
- * writing to disk in this call.
+ * While any size and/or location changes must have been handled
+ * by a pre-serialize call, the client may elect to handle any other
+ * changes to the entry required to place it in correct form for
+ * writing to disk in this call.
*
- * The typedef for the serialize callback is as follows:
+ * The typedef for the serialize callback is as follows:
*
- * typedef herr_t (*H5C_serialize_func_t)(const H5F_t *f,
+ * typedef herr_t (*H5C_serialize_func_t)(const H5F_t *f,
* void * image_ptr,
* size_t len,
* void * thing);
*
- * The parameters of the serialize callback are as follows:
+ * The parameters of the serialize callback are as follows:
*
- * f: File pointer -- needed if other metadata cache entries
- * must be modified in the process of serializing the
- * target entry.
+ * f: File pointer -- needed if other metadata cache entries
+ * must be modified in the process of serializing the
+ * target entry.
*
- * image_ptr: Pointer to a buffer of length len bytes into which a
- * serialized image of the target metadata cache entry is
- * to be written.
+ * image_ptr: Pointer to a buffer of length len bytes into which a
+ * serialized image of the target metadata cache entry is
+ * to be written.
*
- * Note that this buffer will not in general be initialized
- * to any particular value. Thus the serialize function may
- * not assume any initial value and must set each byte in
- * the buffer.
+ * Note that this buffer will not in general be initialized
+ * to any particular value. Thus the serialize function may
+ * not assume any initial value and must set each byte in
+ * the buffer.
*
- * len: Length in bytes of the in file image of the entry to be
- * serialized. Also the size of *image_ptr (below).
+ * len: Length in bytes of the in file image of the entry to be
+ * serialized. Also the size of *image_ptr (below).
*
- * This parameter is supplied mainly for sanity checking.
- * Sanity checks should be performed when compiled in debug
- * mode, but the parameter may be unused when compiled in
- * production mode.
+ * This parameter is supplied mainly for sanity checking.
+ * Sanity checks should be performed when compiled in debug
+ * mode, but the parameter may be unused when compiled in
+ * production mode.
*
- * thing: Pointer to void containing the address of the in core
- * representation of the target metadata cache entry.
- * This is the same pointer returned by a protect of the
- * addr and len given above.
+ * thing: Pointer to void containing the address of the in core
+ * representation of the target metadata cache entry.
+ * This is the same pointer returned by a protect of the
+ * addr and len given above.
*
- * Processing in the serialize function should proceed as follows:
+ * Processing in the serialize function should proceed as follows:
*
- * If there are any remaining changes to the entry required before
- * write to disk, they must be dealt with first.
+ * If there are any remaining changes to the entry required before
+ * write to disk, they must be dealt with first.
*
- * The serialize function must then examine the in core
- * representation indicated by the thing parameter, and write a
- * serialized image of its contents into the provided buffer.
+ * The serialize function must then examine the in core
+ * representation indicated by the thing parameter, and write a
+ * serialized image of its contents into the provided buffer.
*
- * If it is successful, the function must return SUCCEED.
+ * If it is successful, the function must return SUCCEED.
*
- * If it fails for any reason, the function must return FAIL and
- * push error information on the error stack with the error API
- * routines.
+ * If it fails for any reason, the function must return FAIL and
+ * push error information on the error stack with the error API
+ * routines.
*
*
* NOTIFY: Pointer to the notify callback.
@@ -722,98 +724,98 @@ typedef struct H5C_t H5C_t;
* action on an entry has taken/will take place and the client indicates
* it wishes to be notified about the action.
*
- * The typedef for the notify callback is as follows:
+ * The typedef for the notify callback is as follows:
*
- * typedef herr_t (*H5C_notify_func_t)(H5C_notify_action_t action,
+ * typedef herr_t (*H5C_notify_func_t)(H5C_notify_action_t action,
* void *thing);
*
- * The parameters of the notify callback are as follows:
+ * The parameters of the notify callback are as follows:
*
- * action: An enum indicating the metadata cache action that has taken/
+ * action: An enum indicating the metadata cache action that has taken/
* will take place.
*
- * thing: Pointer to void containing the address of the in core
- * representation of the target metadata cache entry. This
- * is the same pointer that would be returned by a protect
- * of the addr and len of the entry.
+ * thing: Pointer to void containing the address of the in core
+ * representation of the target metadata cache entry. This
+ * is the same pointer that would be returned by a protect
+ * of the addr and len of the entry.
*
- * Processing in the notify function should proceed as follows:
+ * Processing in the notify function should proceed as follows:
*
- * The notify function may perform any action it would like, including
+ * The notify function may perform any action it would like, including
* metadata cache calls.
*
- * If the function is successful, it must return SUCCEED.
+ * If the function is successful, it must return SUCCEED.
*
- * If it fails for any reason, the function must return FAIL and
- * push error information on the error stack with the error API
- * routines.
+ * If it fails for any reason, the function must return FAIL and
+ * push error information on the error stack with the error API
+ * routines.
*
*
* FREE_ICR: Pointer to the free ICR callback.
*
- * The free ICR callback is invoked by the metadata cache when it
- * wishes to evict an entry, and needs the client to free the memory
- * allocated for the in core representation.
+ * The free ICR callback is invoked by the metadata cache when it
+ * wishes to evict an entry, and needs the client to free the memory
+ * allocated for the in core representation.
*
- * The typedef for the free ICR callback is as follows:
+ * The typedef for the free ICR callback is as follows:
*
- * typedef herr_t (*H5C_free_icr_func_t)(void * thing));
+ * typedef herr_t (*H5C_free_icr_func_t)(void * thing));
*
- * The parameters of the free ICR callback are as follows:
+ * The parameters of the free ICR callback are as follows:
*
- * thing: Pointer to void containing the address of the in core
- * representation of the target metadata cache entry. This
- * is the same pointer that would be returned by a protect
- * of the addr and len of the entry.
+ * thing: Pointer to void containing the address of the in core
+ * representation of the target metadata cache entry. This
+ * is the same pointer that would be returned by a protect
+ * of the addr and len of the entry.
*
- * Processing in the free ICR function should proceed as follows:
+ * Processing in the free ICR function should proceed as follows:
*
- * The free ICR function must free all memory allocated to the
- * in core representation.
+ * The free ICR function must free all memory allocated to the
+ * in core representation.
*
- * If the function is successful, it must return SUCCEED.
+ * If the function is successful, it must return SUCCEED.
*
- * If it fails for any reason, the function must return FAIL and
- * push error information on the error stack with the error API
- * routines.
+ * If it fails for any reason, the function must return FAIL and
+ * push error information on the error stack with the error API
+ * routines.
*
- * At least when compiled with debug, it would be useful if the
- * free ICR call would fail if the in core representation has been
- * modified since the last serialize callback.
+ * At least when compiled with debug, it would be useful if the
+ * free ICR call would fail if the in core representation has been
+ * modified since the last serialize callback.
*
* GET_FSF_SIZE: Pointer to the get file space free size callback.
*
- * In principle, there is no need for the get file space free size
- * callback. However, as an optimization, it is sometimes convenient
- * to allocate and free file space for a number of cache entries
- * simultaneously in a single contiguous block of file space.
+ * In principle, there is no need for the get file space free size
+ * callback. However, as an optimization, it is sometimes convenient
+ * to allocate and free file space for a number of cache entries
+ * simultaneously in a single contiguous block of file space.
*
- * File space allocation is done by the client, so the metadata cache
- * need not be involved. However, since the metadata cache typically
+ * File space allocation is done by the client, so the metadata cache
+ * need not be involved. However, since the metadata cache typically
* handles file space release when an entry is destroyed, some
- * adjustment on the part of the metadata cache is required for this
- * operation.
+ * adjustment on the part of the metadata cache is required for this
+ * operation.
*
* The get file space free size callback exists to support this
- * operation.
+ * operation.
*
- * If a group of cache entries that were allocated as a group are to
- * be discarded and their file space released, the type of the first
- * (i.e. lowest address) entry in the group must implement the
- * get free file space size callback.
+ * If a group of cache entries that were allocated as a group are to
+ * be discarded and their file space released, the type of the first
+ * (i.e. lowest address) entry in the group must implement the
+ * get free file space size callback.
*
- * To free the file space of all entries in the group in a single
- * operation, first expunge all entries other than the first without
- * the free file space flag.
+ * To free the file space of all entries in the group in a single
+ * operation, first expunge all entries other than the first without
+ * the free file space flag.
*
- * Then, to complete the operation, unprotect or expunge the first
- * entry in the block with the free file space flag set. Since
- * the get free file space callback is implemented, the metadata
- * cache will use this callback to get the size of the block to be
- * freed, instead of using the size of the entry as is done otherwise.
+ * Then, to complete the operation, unprotect or expunge the first
+ * entry in the block with the free file space flag set. Since
+ * the get free file space callback is implemented, the metadata
+ * cache will use this callback to get the size of the block to be
+ * freed, instead of using the size of the entry as is done otherwise.
*
- * At present this callback is used only by the H5FA and H5EA dblock
- * and dblock page client classes.
+ * At present this callback is used only by the H5FA and H5EA dblock
+ * and dblock page client classes.
*
* The typedef for the get_fsf_size callback is as follows:
*
@@ -827,15 +829,15 @@ typedef struct H5C_t H5C_t;
* is the same pointer that would be returned by a protect()
* call of the associated addr and len.
*
- * fs_size_ptr: Pointer to hsize_t in which the callback will return
+ * fs_size_ptr: Pointer to hsize_t in which the callback will return
* the size of the piece of file space to be freed. Note
- * that the space to be freed is presumed to have the same
- * base address as the cache entry.
+ * that the space to be freed is presumed to have the same
+ * base address as the cache entry.
*
* The function simply returns the size of the block of file space
- * to be freed in *fsf_size_ptr.
+ * to be freed in *fsf_size_ptr.
*
- * If the function is successful, it must return SUCCEED.
+ * If the function is successful, it must return SUCCEED.
*
* If it fails for any reason, the function must return FAIL and
* push error information on the error stack with the error API
@@ -848,11 +850,11 @@ typedef enum H5C_notify_action_t {
H5C_NOTIFY_ACTION_AFTER_INSERT, /* Entry has been added to the cache
* via the insert call
*/
- H5C_NOTIFY_ACTION_AFTER_LOAD, /* Entry has been loaded into the
+ H5C_NOTIFY_ACTION_AFTER_LOAD, /* Entry has been loaded into the
* from file via the protect call
*/
- H5C_NOTIFY_ACTION_AFTER_FLUSH, /* Entry has just been flushed to
- * file.
+ H5C_NOTIFY_ACTION_AFTER_FLUSH, /* Entry has just been flushed to
+ * file.
*/
H5C_NOTIFY_ACTION_BEFORE_EVICT, /* Entry is about to be evicted
* from cache.
@@ -883,20 +885,20 @@ typedef herr_t (*H5C_get_fsf_size_t)(const void * thing, hsize_t *fsf_size_ptr);
/* Metadata cache client class definition */
typedef struct H5C_class_t {
- int id;
- const char * name;
- H5FD_mem_t mem_type;
- unsigned flags;
- H5C_get_initial_load_size_func_t get_initial_load_size;
- H5C_get_final_load_size_func_t get_final_load_size;
- H5C_verify_chksum_func_t verify_chksum;
- H5C_deserialize_func_t deserialize;
- H5C_image_len_func_t image_len;
- H5C_pre_serialize_func_t pre_serialize;
- H5C_serialize_func_t serialize;
- H5C_notify_func_t notify;
- H5C_free_icr_func_t free_icr;
- H5C_get_fsf_size_t fsf_size;
+ int id;
+ const char * name;
+ H5FD_mem_t mem_type;
+ unsigned flags;
+ H5C_get_initial_load_size_func_t get_initial_load_size;
+ H5C_get_final_load_size_func_t get_final_load_size;
+ H5C_verify_chksum_func_t verify_chksum;
+ H5C_deserialize_func_t deserialize;
+ H5C_image_len_func_t image_len;
+ H5C_pre_serialize_func_t pre_serialize;
+ H5C_serialize_func_t serialize;
+ H5C_notify_func_t notify;
+ H5C_free_icr_func_t free_icr;
+ H5C_get_fsf_size_t fsf_size;
} H5C_class_t;
/* Type definitions of callback functions used by the cache as a whole */
@@ -978,9 +980,9 @@ typedef int H5C_ring_t;
*
* The fields of this structure are discussed individually below:
*
- * JRM - 4/26/04
+ * JRM - 4/26/04
*
- * magic: Unsigned 32 bit integer that must always be set to
+ * magic: Unsigned 32 bit integer that must always be set to
* H5C__H5C_CACHE_ENTRY_T_MAGIC when the entry is valid.
* The field must be set to H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC
* just before the entry is freed.
@@ -999,129 +1001,129 @@ typedef int H5C_ring_t;
* detect this case, and re-start its scan from the bottom
* of the LRU when this situation occurs.
*
- * cache_ptr: Pointer to the cache that this entry is contained within.
+ * cache_ptr: Pointer to the cache that this entry is contained within.
*
- * addr: Base address of the cache entry on disk.
+ * addr: Base address of the cache entry on disk.
*
- * size: Length of the cache entry on disk in bytes Note that unlike
+ * size: Length of the cache entry on disk in bytes Note that unlike
* normal caches, the entries in this cache are of arbitrary size.
*
- * The file space allocations for cache entries implied by the
+ * The file space allocations for cache entries implied by the
* addr and size fields must be disjoint.
*
- * image_ptr: Pointer to void. When not NULL, this field points to a
- * dynamically allocated block of size bytes in which the
- * on disk image of the metadata cache entry is stored.
+ * image_ptr: Pointer to void. When not NULL, this field points to a
+ * dynamically allocated block of size bytes in which the
+ * on disk image of the metadata cache entry is stored.
*
- * If the entry is dirty, the pre-serialize and serialize
- * callbacks must be used to update this image before it is
- * written to disk
+ * If the entry is dirty, the pre-serialize and serialize
+ * callbacks must be used to update this image before it is
+ * written to disk
*
* image_up_to_date: Boolean flag that is set to TRUE when *image_ptr
- * is up to date, and set to false when the entry is dirtied.
+ * is up to date, and set to false when the entry is dirtied.
*
- * type: Pointer to the instance of H5C_class_t containing pointers
- * to the methods for cache entries of the current type. This
- * field should be NULL when the instance of H5C_cache_entry_t
- * is not in use.
+ * type: Pointer to the instance of H5C_class_t containing pointers
+ * to the methods for cache entries of the current type. This
+ * field should be NULL when the instance of H5C_cache_entry_t
+ * is not in use.
*
- * The name is not particularly descriptive, but is retained
- * to avoid changes in existing code.
+ * The name is not particularly descriptive, but is retained
+ * to avoid changes in existing code.
*
- * is_dirty: Boolean flag indicating whether the contents of the cache
- * entry has been modified since the last time it was written
- * to disk.
+ * is_dirty: Boolean flag indicating whether the contents of the cache
+ * entry has been modified since the last time it was written
+ * to disk.
*
- * dirtied: Boolean flag used to indicate that the entry has been
- * dirtied while protected.
+ * dirtied: Boolean flag used to indicate that the entry has been
+ * dirtied while protected.
*
- * This field is set to FALSE in the protect call, and may
- * be set to TRUE by the H5C_mark_entry_dirty() call at any
- * time prior to the unprotect call.
+ * This field is set to FALSE in the protect call, and may
+ * be set to TRUE by the H5C_mark_entry_dirty() call at any
+ * time prior to the unprotect call.
*
- * The H5C_mark_entry_dirty() call exists as a convenience
- * function for the fractal heap code which may not know if
- * an entry is protected or pinned, but knows that is either
- * protected or pinned. The dirtied field was added as in
- * the parallel case, it is necessary to know whether a
- * protected entry is dirty prior to the protect call.
+ * The H5C_mark_entry_dirty() call exists as a convenience
+ * function for the fractal heap code which may not know if
+ * an entry is protected or pinned, but knows that is either
+ * protected or pinned. The dirtied field was added as in
+ * the parallel case, it is necessary to know whether a
+ * protected entry is dirty prior to the protect call.
*
* is_protected: Boolean flag indicating whether this entry is protected
- * (or locked, to use more conventional terms). When it is
- * protected, the entry cannot be flushed or accessed until
- * it is unprotected (or unlocked -- again to use more
- * conventional terms).
+ * (or locked, to use more conventional terms). When it is
+ * protected, the entry cannot be flushed or accessed until
+ * it is unprotected (or unlocked -- again to use more
+ * conventional terms).
*
- * Note that protected entries are removed from the LRU lists
- * and inserted on the protected list.
+ * Note that protected entries are removed from the LRU lists
+ * and inserted on the protected list.
*
* is_read_only: Boolean flag that is only meaningful if is_protected is
- * TRUE. In this circumstance, it indicates whether the
- * entry has been protected read-only, or read/write.
+ * TRUE. In this circumstance, it indicates whether the
+ * entry has been protected read-only, or read/write.
*
- * If the entry has been protected read-only (i.e. is_protected
- * and is_read_only are both TRUE), we allow the entry to be
- * protected more than once.
+ * If the entry has been protected read-only (i.e. is_protected
+ * and is_read_only are both TRUE), we allow the entry to be
+ * protected more than once.
*
- * In this case, the number of readers is maintained in the
- * ro_ref_count field (see below), and unprotect calls simply
- * decrement that field until it drops to zero, at which point
- * the entry is actually unprotected.
+ * In this case, the number of readers is maintained in the
+ * ro_ref_count field (see below), and unprotect calls simply
+ * decrement that field until it drops to zero, at which point
+ * the entry is actually unprotected.
*
* ro_ref_count: Integer field used to maintain a count of the number of
- * outstanding read-only protects on this entry. This field
- * must be zero whenever either is_protected or is_read_only
- * are TRUE.
+ * outstanding read-only protects on this entry. This field
+ * must be zero whenever either is_protected or is_read_only
+ * are TRUE.
*
- * is_pinned: Boolean flag indicating whether the entry has been pinned
- * in the cache.
+ * is_pinned: Boolean flag indicating whether the entry has been pinned
+ * in the cache.
*
- * For very hot entries, the protect / unprotect overhead
- * can become excessive. Thus the cache has been extended
- * to allow an entry to be "pinned" in the cache.
+ * For very hot entries, the protect / unprotect overhead
+ * can become excessive. Thus the cache has been extended
+ * to allow an entry to be "pinned" in the cache.
*
- * Pinning an entry in the cache has several implications:
+ * Pinning an entry in the cache has several implications:
*
- * 1) A pinned entry cannot be evicted. Thus unprotected
- * pinned entries must be stored in the pinned entry
- * list, instead of being managed by the replacement
- * policy code (LRU at present).
+ * 1) A pinned entry cannot be evicted. Thus unprotected
+ * pinned entries must be stored in the pinned entry
+ * list, instead of being managed by the replacement
+ * policy code (LRU at present).
*
- * 2) A pinned entry can be accessed or modified at any time.
- * This places an extra burden on the pre-serialize and
- * serialize callbacks, which must ensure that a pinned
- * entry is consistent and ready to write to disk before
- * generating an image.
+ * 2) A pinned entry can be accessed or modified at any time.
+ * This places an extra burden on the pre-serialize and
+ * serialize callbacks, which must ensure that a pinned
+ * entry is consistent and ready to write to disk before
+ * generating an image.
*
- * 3) A pinned entry can be marked as dirty (and possibly
- * change size) while it is unprotected.
+ * 3) A pinned entry can be marked as dirty (and possibly
+ * change size) while it is unprotected.
*
- * 4) The flush-destroy code must allow pinned entries to
- * be unpinned (and possibly unprotected) during the
- * flush.
+ * 4) The flush-destroy code must allow pinned entries to
+ * be unpinned (and possibly unprotected) during the
+ * flush.
*
- * JRM -- 3/16/06
+ * JRM -- 3/16/06
*
- * in_slist: Boolean flag indicating whether the entry is in the skip list
- * As a general rule, entries are placed in the list when they
+ * in_slist: Boolean flag indicating whether the entry is in the skip list
+ * As a general rule, entries are placed in the list when they
* are marked dirty. However they may remain in the list after
* being flushed.
*
* Update: Dirty entries are now removed from the skip list
- * when they are flushed.
+ * when they are flushed.
*
* flush_marker: Boolean flag indicating that the entry is to be flushed
- * the next time H5C_flush_cache() is called with the
- * H5C__FLUSH_MARKED_ENTRIES_FLAG. The flag is reset when
- * the entry is flushed for whatever reason.
+ * the next time H5C_flush_cache() is called with the
+ * H5C__FLUSH_MARKED_ENTRIES_FLAG. The flag is reset when
+ * the entry is flushed for whatever reason.
*
* flush_me_last: Boolean flag indicating that this entry should not be
- * flushed from the cache until all other entries without
+ * flushed from the cache until all other entries without
* the flush_me_last flag set have been flushed.
*
- * Note:
+ * Note:
*
- * At this time, the flush_me_last
+ * At this time, the flush_me_last
* flag will only be applied to one entry, the superblock,
* and the code utilizing these flags is protected with HDasserts
* to enforce this. This restraint can certainly be relaxed in
@@ -1130,37 +1132,37 @@ typedef int H5C_ring_t;
* will need to be expanded and tested appropriately if that
* functionality is desired.
*
- * Update: There are now two possible last entries
- * (superblock and file driver info message). This
- * number will probably increase as we add superblock
- * messages. JRM -- 11/18/14
+ * Update: There are now two possible last entries
+ * (superblock and file driver info message). This
+ * number will probably increase as we add superblock
+ * messages. JRM -- 11/18/14
*
* clear_on_unprotect: Boolean flag used only in PHDF5. When H5C is used
- * to implement the metadata cache In the parallel case, only
- * the cache with mpi rank 0 is allowed to actually write to
- * file -- all other caches must retain dirty entries until they
- * are advised that the entry is clean.
+ * to implement the metadata cache In the parallel case, only
+ * the cache with mpi rank 0 is allowed to actually write to
+ * file -- all other caches must retain dirty entries until they
+ * are advised that the entry is clean.
*
- * This flag is used in the case that such an advisory is
- * received when the entry is protected. If it is set when an
- * entry is unprotected, and the dirtied flag is not set in
- * the unprotect, the entry's is_dirty flag is reset by flushing
- * it with the H5C__FLUSH_CLEAR_ONLY_FLAG.
+ * This flag is used in the case that such an advisory is
+ * received when the entry is protected. If it is set when an
+ * entry is unprotected, and the dirtied flag is not set in
+ * the unprotect, the entry's is_dirty flag is reset by flushing
+ * it with the H5C__FLUSH_CLEAR_ONLY_FLAG.
*
* flush_immediately: Boolean flag used only in Phdf5 -- and then only
- * for H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED.
+ * for H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED.
*
- * When a distributed metadata write is triggered at a
- * sync point, this field is used to mark entries that
- * must be flushed before leaving the sync point. At all
- * other times, this field should be set to FALSE.
+ * When a distributed metadata write is triggered at a
+ * sync point, this field is used to mark entries that
+ * must be flushed before leaving the sync point. At all
+ * other times, this field should be set to FALSE.
*
* flush_in_progress: Boolean flag that is set to true iff the entry
- * is in the process of being flushed. This allows the cache
- * to detect when a call is the result of a flush callback.
+ * is in the process of being flushed. This allows the cache
+ * to detect when a call is the result of a flush callback.
*
* destroy_in_progress: Boolean flag that is set to true iff the entry
- * is in the process of being flushed and destroyed.
+ * is in the process of being flushed and destroyed.
*
*
* Fields supporting rings for flush ordering:
@@ -1178,8 +1180,8 @@ typedef int H5C_ring_t;
* within rings. Unlike rings, flush dependencies are applied to ALL
* writes, not just those triggered by flush or serialize calls.
*
- * ring: Instance of H5C_ring_t indicating the ring to which this
- * entry is assigned.
+ * ring: Instance of H5C_ring_t indicating the ring to which this
+ * entry is assigned.
*
*
* Fields supporting the 'flush dependency' feature:
@@ -1209,18 +1211,18 @@ typedef int H5C_ring_t;
* this field is nonzero, then this entry cannot be flushed.
*
* flush_dep_nunser_children: Number of flush dependency children
- * that are either unserialized, or have a non-zero number of
- * positive number of unserialized children.
+ * that are either unserialized, or have a non-zero number of
+ * positive number of unserialized children.
*
- * Note that since there is no requirement that a clean entry
- * be serialized, it is possible that flush_dep_nunser_children
- * to be greater than flush_dep_ndirty_children.
+ * Note that since there is no requirement that a clean entry
+ * be serialized, it is possible that flush_dep_nunser_children
+ * to be greater than flush_dep_ndirty_children.
*
- * This field exist to facilitate correct ordering of entry
- * serializations when it is necessary to serialize all the
- * entries in the metadata cache. Thus in the cache
- * serialization, no entry can be serialized unless this
- * field contains 0.
+ * This field exist to facilitate correct ordering of entry
+ * serializations when it is necessary to serialize all the
+ * entries in the metadata cache. Thus in the cache
+ * serialization, no entry can be serialized unless this
+ * field contains 0.
*
* Fields supporting the hash table:
*
@@ -1237,25 +1239,25 @@ typedef int H5C_ring_t;
* The il_next and il_prev fields discussed below were added to support
* the index list.
*
- * ht_next: Next pointer used by the hash table to store multiple
- * entries in a single hash bin. This field points to the
- * next entry in the doubly linked list of entries in the
- * hash bin, or NULL if there is no next entry.
+ * ht_next: Next pointer used by the hash table to store multiple
+ * entries in a single hash bin. This field points to the
+ * next entry in the doubly linked list of entries in the
+ * hash bin, or NULL if there is no next entry.
*
* ht_prev: Prev pointer used by the hash table to store multiple
* entries in a single hash bin. This field points to the
* previous entry in the doubly linked list of entries in
- * the hash bin, or NULL if there is no previuos entry.
+ * the hash bin, or NULL if there is no previuos entry.
*
- * il_next: Next pointer used by the index to maintain a doubly linked
- * list of all entries in the index (and thus in the cache).
- * This field contains a pointer to the next entry in the
- * index list, or NULL if there is no next entry.
+ * il_next: Next pointer used by the index to maintain a doubly linked
+ * list of all entries in the index (and thus in the cache).
+ * This field contains a pointer to the next entry in the
+ * index list, or NULL if there is no next entry.
*
- * il_prev: Prev pointer used by the index to maintain a doubly linked
- * list of all entries in the index (and thus in the cache).
- * This field contains a pointer to the previous entry in the
- * index list, or NULL if there is no previous entry.
+ * il_prev: Prev pointer used by the index to maintain a doubly linked
+ * list of all entries in the index (and thus in the cache).
+ * This field contains a pointer to the previous entry in the
+ * index list, or NULL if there is no previous entry.
*
*
* Fields supporting replacement policies:
@@ -1292,43 +1294,43 @@ typedef int H5C_ring_t;
* The use of the replacement policy fields under the Modified LRU policy
* is discussed below:
*
- * next: Next pointer in either the LRU, the protected list, or
- * the pinned list depending on the current values of
- * is_protected and is_pinned. If there is no next entry
- * on the list, this field should be set to NULL.
+ * next: Next pointer in either the LRU, the protected list, or
+ * the pinned list depending on the current values of
+ * is_protected and is_pinned. If there is no next entry
+ * on the list, this field should be set to NULL.
*
- * prev: Prev pointer in either the LRU, the protected list,
- * or the pinned list depending on the current values of
- * is_protected and is_pinned. If there is no previous
- * entry on the list, this field should be set to NULL.
+ * prev: Prev pointer in either the LRU, the protected list,
+ * or the pinned list depending on the current values of
+ * is_protected and is_pinned. If there is no previous
+ * entry on the list, this field should be set to NULL.
*
- * aux_next: Next pointer on either the clean or dirty LRU lists.
- * This entry should be NULL when either is_protected or
- * is_pinned is true.
+ * aux_next: Next pointer on either the clean or dirty LRU lists.
+ * This entry should be NULL when either is_protected or
+ * is_pinned is true.
*
- * When is_protected and is_pinned are false, and is_dirty is
- * true, it should point to the next item on the dirty LRU
- * list.
+ * When is_protected and is_pinned are false, and is_dirty is
+ * true, it should point to the next item on the dirty LRU
+ * list.
*
- * When is_protected and is_pinned are false, and is_dirty is
- * false, it should point to the next item on the clean LRU
- * list. In either case, when there is no next item, it
- * should be NULL.
+ * When is_protected and is_pinned are false, and is_dirty is
+ * false, it should point to the next item on the clean LRU
+ * list. In either case, when there is no next item, it
+ * should be NULL.
*
- * aux_prev: Previous pointer on either the clean or dirty LRU lists.
- * This entry should be NULL when either is_protected or
- * is_pinned is true.
+ * aux_prev: Previous pointer on either the clean or dirty LRU lists.
+ * This entry should be NULL when either is_protected or
+ * is_pinned is true.
*
- * When is_protected and is_pinned are false, and is_dirty is
- * true, it should point to the previous item on the dirty
- * LRU list.
+ * When is_protected and is_pinned are false, and is_dirty is
+ * true, it should point to the previous item on the dirty
+ * LRU list.
*
- * When is_protected and is_pinned are false, and is_dirty
- * is false, it should point to the previous item on the
- * clean LRU list.
+ * When is_protected and is_pinned are false, and is_dirty
+ * is false, it should point to the previous item on the
+ * clean LRU list.
*
- * In either case, when there is no previous item, it should
- * be NULL.
+ * In either case, when there is no previous item, it should
+ * be NULL.
*
* Fields supporting the cache image feature:
*
@@ -1344,170 +1346,170 @@ typedef int H5C_ring_t;
* further details.
*
* include_in_image: Boolean flag indicating whether this entry should
- * be included in the metadata cache image. This field should
- * always be false prior to the H5C_prep_for_file_close() call.
- * During that call, it should be set to TRUE for all entries
- * that are to be included in the metadata cache image. At
- * present, only the superblock, the superblock extension
- * object header and its chunks (if any) are omitted from
- * the image.
+ * be included in the metadata cache image. This field should
+ * always be false prior to the H5C_prep_for_file_close() call.
+ * During that call, it should be set to TRUE for all entries
+ * that are to be included in the metadata cache image. At
+ * present, only the superblock, the superblock extension
+ * object header and its chunks (if any) are omitted from
+ * the image.
*
- * lru_rank: Rank of the entry in the LRU just prior to file close.
+ * lru_rank: Rank of the entry in the LRU just prior to file close.
*
- * Note that the first entry on the LRU has lru_rank 1,
- * and that entries not on the LRU at that time will have
- * either lru_rank -1 (if pinned) or 0 (if loaded during
- * the process of flushing the cache.
+ * Note that the first entry on the LRU has lru_rank 1,
+ * and that entries not on the LRU at that time will have
+ * either lru_rank -1 (if pinned) or 0 (if loaded during
+ * the process of flushing the cache.
*
* image_dirty: Boolean flag indicating whether the entry should be marked
- * as dirty in the metadata cache image. The flag is set to
- * TRUE iff the entry is dirty when H5C_prep_for_file_close()
- * is called.
+ * as dirty in the metadata cache image. The flag is set to
+ * TRUE iff the entry is dirty when H5C_prep_for_file_close()
+ * is called.
*
* fd_parent_count: If the entry is a child in one or more flush dependency
- * relationships, this field contains the number of flush
- * dependency parents.
+ * relationships, this field contains the number of flush
+ * dependency parents.
*
- * In all other cases, the field is set to zero.
+ * In all other cases, the field is set to zero.
*
- * Note that while this count is initially taken from the
- * flush dependency fields above, if the entry is in the
- * cache image (i.e. include_in_image is TRUE), any parents
- * that are not in the image are removed from this count and
- * from the fd_parent_addrs array below.
+ * Note that while this count is initially taken from the
+ * flush dependency fields above, if the entry is in the
+ * cache image (i.e. include_in_image is TRUE), any parents
+ * that are not in the image are removed from this count and
+ * from the fd_parent_addrs array below.
*
- * Finally observe that if the entry is dirty and in the
- * cache image, and its parent is dirty and not in the cache
- * image, then the entry must be removed from the cache image
- * to avoid violating the flush dependency flush ordering.
+ * Finally observe that if the entry is dirty and in the
+ * cache image, and its parent is dirty and not in the cache
+ * image, then the entry must be removed from the cache image
+ * to avoid violating the flush dependency flush ordering.
*
* fd_parent_addrs: If the entry is a child in one or more flush dependency
- * relationship when H5C_prep_for_file_close() is called, this
- * field must contain a pointer to an array of size
- * fd_parent_count containing the on disk addresses of the
- * parent.
+ * relationship when H5C_prep_for_file_close() is called, this
+ * field must contain a pointer to an array of size
+ * fd_parent_count containing the on disk addresses of the
+ * parent.
*
- * In all other cases, the field is set to NULL.
+ * In all other cases, the field is set to NULL.
*
- * Note that while this list of addresses is initially taken
- * from the flush dependency fields above, if the entry is in the
- * cache image (i.e. include_in_image is TRUE), any parents
- * that are not in the image are removed from this list, and
- * and from the fd_parent_count above.
+ * Note that while this list of addresses is initially taken
+ * from the flush dependency fields above, if the entry is in the
+ * cache image (i.e. include_in_image is TRUE), any parents
+ * that are not in the image are removed from this list, and
+ * and from the fd_parent_count above.
*
- * Finally observe that if the entry is dirty and in the
- * cache image, and its parent is dirty and not in the cache
- * image, then the entry must be removed from the cache image
- * to avoid violating the flush dependency flush ordering.
+ * Finally observe that if the entry is dirty and in the
+ * cache image, and its parent is dirty and not in the cache
+ * image, then the entry must be removed from the cache image
+ * to avoid violating the flush dependency flush ordering.
*
* fd_child_count: If the entry is a parent in a flush dependency
- * relationship, this field contains the number of flush
- * dependency children.
+ * relationship, this field contains the number of flush
+ * dependency children.
*
- * In all other cases, the field is set to zero.
+ * In all other cases, the field is set to zero.
*
- * Note that while this count is initially taken from the
- * flush dependency fields above, if the entry is in the
- * cache image (i.e. include_in_image is TRUE), any children
- * that are not in the image are removed from this count.
+ * Note that while this count is initially taken from the
+ * flush dependency fields above, if the entry is in the
+ * cache image (i.e. include_in_image is TRUE), any children
+ * that are not in the image are removed from this count.
*
* fd_dirty_child_count: If the entry is a parent in a flush dependency
- * relationship, this field contains the number of dirty flush
- * dependency children.
+ * relationship, this field contains the number of dirty flush
+ * dependency children.
*
- * In all other cases, the field is set to zero.
+ * In all other cases, the field is set to zero.
*
- * Note that while this count is initially taken from the
- * flush dependency fields above, if the entry is in the
- * cache image (i.e. include_in_image is TRUE), any dirty
- * children that are not in the image are removed from this
- * count.
+ * Note that while this count is initially taken from the
+ * flush dependency fields above, if the entry is in the
+ * cache image (i.e. include_in_image is TRUE), any dirty
+ * children that are not in the image are removed from this
+ * count.
*
* image_fd_height: Flush dependency height of the entry in the cache image.
*
- * The flush dependency height of any entry involved in a
- * flush dependency relationship is defined to be the
- * longest flush dependency path from that entry to an entry
- * with no flush dependency children.
- *
- * Since the image_fd_height is used to order entries in the
- * cache image so that fd parents preceed fd children, for
- * purposes of this field, and entry is at flush dependency
- * level 0 if it either has no children, or if all of its
- * children are not in the cache image.
- *
- * Note that if a child in a flush dependency relationship is
- * dirty and in the cache image, and its parent is dirty and
- * not in the cache image, then the child must be excluded
- * from the cache image to maintain flush ordering.
- *
- * prefetched: Boolean flag indicating that the on disk image of the entry
- * has been loaded into the cache prior any request for the
- * entry by the rest of the library.
- *
- * As of this writing (8/10/15), this can only happen through
- * the load of a cache image block, although other scenarios
- * are contemplated for the use of this feature. Note that
- * unlike the usual prefetch situation, this means that a
- * prefetched entry can be dirty, and/or can be a party to
- * flush dependency relationship(s). This complicates matters
- * somewhat.
- *
- * The essential feature of a prefetched entry is that it
- * consists only of a buffer containing the on disk image of
- * the entry. Thus it must be deserialized before it can
- * be passed back to the library on a protect call. This
- * task is handled by H5C_deserialized_prefetched_entry().
- * In essence, this routine calls the deserialize callback
- * provided in the protect call with the on disk image,
- * deletes the prefetched entry from the cache, and replaces
- * it with the deserialized entry returned by the deserialize
- * callback.
- *
- * Further, if the prefetched entry is a flush dependency parent,
- * all its flush dependency children (which must also be
- * prefetched entries), must be transferred to the new cache
- * entry returned by the deserialization callback.
- *
- * Finally, if the prefetched entry is a flush dependency child,
- * this flush dependency must be destroyed prior to the
- * deserialize call.
- *
- * In addition to the above special processing on the first
- * protect call on a prefetched entry (after which is no longer
- * a prefetched entry), prefetched entries also require special
- * tretment on flush and evict.
- *
- * On flush, a dirty prefetched entry must simply be written
- * to disk and marked clean without any call to any client
- * callback.
- *
- * On eviction, if a prefetched entry is a flush dependency
- * child, that flush dependency relationship must be destroyed
- * just prior to the eviction. If the flush dependency code
- * is working properly, it should be impossible for any entry
- * that is a flush dependency parent to be evicted.
+ * The flush dependency height of any entry involved in a
+ * flush dependency relationship is defined to be the
+ * longest flush dependency path from that entry to an entry
+ * with no flush dependency children.
+ *
+ * Since the image_fd_height is used to order entries in the
+ * cache image so that fd parents preceed fd children, for
+ * purposes of this field, and entry is at flush dependency
+ * level 0 if it either has no children, or if all of its
+ * children are not in the cache image.
+ *
+ * Note that if a child in a flush dependency relationship is
+ * dirty and in the cache image, and its parent is dirty and
+ * not in the cache image, then the child must be excluded
+ * from the cache image to maintain flush ordering.
+ *
+ * prefetched: Boolean flag indicating that the on disk image of the entry
+ * has been loaded into the cache prior any request for the
+ * entry by the rest of the library.
+ *
+ * As of this writing (8/10/15), this can only happen through
+ * the load of a cache image block, although other scenarios
+ * are contemplated for the use of this feature. Note that
+ * unlike the usual prefetch situation, this means that a
+ * prefetched entry can be dirty, and/or can be a party to
+ * flush dependency relationship(s). This complicates matters
+ * somewhat.
+ *
+ * The essential feature of a prefetched entry is that it
+ * consists only of a buffer containing the on disk image of
+ * the entry. Thus it must be deserialized before it can
+ * be passed back to the library on a protect call. This
+ * task is handled by H5C_deserialized_prefetched_entry().
+ * In essence, this routine calls the deserialize callback
+ * provided in the protect call with the on disk image,
+ * deletes the prefetched entry from the cache, and replaces
+ * it with the deserialized entry returned by the deserialize
+ * callback.
+ *
+ * Further, if the prefetched entry is a flush dependency parent,
+ * all its flush dependency children (which must also be
+ * prefetched entries), must be transferred to the new cache
+ * entry returned by the deserialization callback.
+ *
+ * Finally, if the prefetched entry is a flush dependency child,
+ * this flush dependency must be destroyed prior to the
+ * deserialize call.
+ *
+ * In addition to the above special processing on the first
+ * protect call on a prefetched entry (after which is no longer
+ * a prefetched entry), prefetched entries also require special
+ * tretment on flush and evict.
+ *
+ * On flush, a dirty prefetched entry must simply be written
+ * to disk and marked clean without any call to any client
+ * callback.
+ *
+ * On eviction, if a prefetched entry is a flush dependency
+ * child, that flush dependency relationship must be destroyed
+ * just prior to the eviction. If the flush dependency code
+ * is working properly, it should be impossible for any entry
+ * that is a flush dependency parent to be evicted.
*
* prefetch_type_id: Integer field containing the type ID of the prefetched
- * entry. This ID must match the ID of the type provided in any
- * protect call on the prefetched entry.
+ * entry. This ID must match the ID of the type provided in any
+ * protect call on the prefetched entry.
*
- * The value of this field is undefined in prefetched is FALSE.
+ * The value of this field is undefined in prefetched is FALSE.
*
- * age: Number of times a prefetched entry has appeared in
- * subsequent cache images. The field exists to allow
- * imposition of a limit on how many times a prefetched
- * entry can appear in subsequent cache images without being
- * converted to a regular entry.
+ * age: Number of times a prefetched entry has appeared in
+ * subsequent cache images. The field exists to allow
+ * imposition of a limit on how many times a prefetched
+ * entry can appear in subsequent cache images without being
+ * converted to a regular entry.
*
- * This field must be zero if prefetched is FALSE.
+ * This field must be zero if prefetched is FALSE.
*
* prefetched_dirty: Boolean field that must be set to FALSE unless the
- * following conditions hold:
+ * following conditions hold:
*
- * 1) The file has been opened R/O.
+ * 1) The file has been opened R/O.
*
- * 2) The entry is either a prefetched entry, or was
+ * 2) The entry is either a prefetched entry, or was
* re-constructed from a prefetched entry.
*
* 3) The base prefetched entry was marked dirty.
@@ -1543,14 +1545,14 @@ typedef int H5C_ring_t;
* we deal with this by disabling EOC in the R/O case.
*
* serialization_count: Integer field used to maintain a count of the
- * number of times each entry is serialized during cache
- * serialization. While no entry should be serialized more than
- * once in any serialization call, throw an assertion if any
- * flush depencency parent is serialized more than once during
- * a single cache serialization.
+ * number of times each entry is serialized during cache
+ * serialization. While no entry should be serialized more than
+ * once in any serialization call, throw an assertion if any
+ * flush depencency parent is serialized more than once during
+ * a single cache serialization.
*
- * This is a debugging field, and thus is maintained only if
- * NDEBUG is undefined.
+ * This is a debugging field, and thus is maintained only if
+ * NDEBUG is undefined.
*
* Fields supporting tagged entries:
*
@@ -1561,15 +1563,15 @@ typedef int H5C_ring_t;
* not tagged. Tagged entries have a pointer to the tag info for the object,
* which is shared state for all the entries for that object.
*
- * tl_next: Pointer to the next entry in the tag list for an object.
- * NULL for the tail entry in the list, as well as untagged
- * entries.
+ * tl_next: Pointer to the next entry in the tag list for an object.
+ * NULL for the tail entry in the list, as well as untagged
+ * entries.
*
- * tl_prev: Pointer to the previous entry in the tag list for an object.
- * NULL for the head entry in the list, as well as untagged
- * entries.
+ * tl_prev: Pointer to the previous entry in the tag list for an object.
+ * NULL for the head entry in the list, as well as untagged
+ * entries.
*
- * tag_info: Pointer to the common tag state for all entries belonging to
+ * tag_info: Pointer to the common tag state for all entries belonging to
* an object. NULL for untagged entries.
*
*
@@ -1579,43 +1581,43 @@ typedef int H5C_ring_t;
* and H5C_COLLECT_CACHE_ENTRY_STATS are true. When present, they allow
* collection of statistics on individual cache entries.
*
- * accesses: int32_t containing the number of times this cache entry has
- * been referenced in its lifetime.
+ * accesses: int32_t containing the number of times this cache entry has
+ * been referenced in its lifetime.
*
- * clears: int32_t containing the number of times this cache entry has
+ * clears: int32_t containing the number of times this cache entry has
* been cleared in its life time.
*
- * flushes: int32_t containing the number of times this cache entry has
+ * flushes: int32_t containing the number of times this cache entry has
* been flushed to file in its life time.
*
- * pins: int32_t containing the number of times this cache entry has
- * been pinned in cache in its life time.
+ * pins: int32_t containing the number of times this cache entry has
+ * been pinned in cache in its life time.
*
****************************************************************************/
typedef struct H5C_cache_entry_t {
- uint32_t magic;
+ uint32_t magic;
H5C_t *cache_ptr;
- haddr_t addr;
- size_t size;
- void *image_ptr;
- hbool_t image_up_to_date;
- const H5C_class_t *type;
- hbool_t is_dirty;
- hbool_t dirtied;
- hbool_t is_protected;
- hbool_t is_read_only;
- int ro_ref_count;
- hbool_t is_pinned;
- hbool_t in_slist;
- hbool_t flush_marker;
+ haddr_t addr;
+ size_t size;
+ void *image_ptr;
+ hbool_t image_up_to_date;
+ const H5C_class_t *type;
+ hbool_t is_dirty;
+ hbool_t dirtied;
+ hbool_t is_protected;
+ hbool_t is_read_only;
+ int ro_ref_count;
+ hbool_t is_pinned;
+ hbool_t in_slist;
+ hbool_t flush_marker;
hbool_t flush_me_last;
#ifdef H5_HAVE_PARALLEL
- hbool_t clear_on_unprotect;
- hbool_t flush_immediately;
- hbool_t coll_access;
+ hbool_t clear_on_unprotect;
+ hbool_t flush_immediately;
+ hbool_t coll_access;
#endif /* H5_HAVE_PARALLEL */
- hbool_t flush_in_progress;
- hbool_t destroy_in_progress;
+ hbool_t flush_in_progress;
+ hbool_t destroy_in_progress;
/* fields supporting rings for purposes of flush ordering */
H5C_ring_t ring;
@@ -1627,8 +1629,8 @@ typedef struct H5C_cache_entry_t {
unsigned flush_dep_nchildren;
unsigned flush_dep_ndirty_children;
unsigned flush_dep_nunser_children;
- hbool_t pinned_from_client;
- hbool_t pinned_from_cache;
+ hbool_t pinned_from_client;
+ hbool_t pinned_from_cache;
/* fields supporting the hash table: */
struct H5C_cache_entry_t *ht_next;
@@ -1660,9 +1662,9 @@ typedef struct H5C_cache_entry_t {
hbool_t prefetched;
int prefetch_type_id;
int32_t age;
- hbool_t prefetched_dirty;
+ hbool_t prefetched_dirty;
-#ifndef NDEBUG /* debugging field */
+#ifndef NDEBUG /* debugging field */
int serialization_count;
#endif /* NDEBUG */
@@ -1673,10 +1675,10 @@ typedef struct H5C_cache_entry_t {
#if H5C_COLLECT_CACHE_ENTRY_STATS
/* cache entry stats fields */
- int32_t accesses;
- int32_t clears;
- int32_t flushes;
- int32_t pins;
+ int32_t accesses;
+ int32_t clears;
+ int32_t flushes;
+ int32_t pins;
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
} H5C_cache_entry_t;
@@ -1692,43 +1694,43 @@ typedef struct H5C_cache_entry_t {
*
* The fields of this structure are discussed individually below:
*
- * JRM - 8/5/15
+ * JRM - 8/5/15
*
- * magic: Unsigned 32 bit integer that must always be set to
+ * magic: Unsigned 32 bit integer that must always be set to
* H5C_IMAGE_ENTRY_T_MAGIC when the entry is valid.
* The field must be set to H5C_IMAGE_ENTRY_T_BAD_MAGIC
* just before the entry is freed.
*
- * addr: Base address of the cache entry on disk.
+ * addr: Base address of the cache entry on disk.
*
- * size: Length of the cache entry on disk in bytes.
+ * size: Length of the cache entry on disk in bytes.
*
- * ring: Instance of H5C_ring_t indicating the flush ordering ring
- * to which this entry is assigned.
+ * ring: Instance of H5C_ring_t indicating the flush ordering ring
+ * to which this entry is assigned.
*
- * age: Number of times this prefetech entry has appeared in
- * the current sequence of cache images. This field is
- * initialized to 0 if the instance of H5C_image_entry_t
- * is constructed from a regular entry.
+ * age: Number of times this prefetech entry has appeared in
+ * the current sequence of cache images. This field is
+ * initialized to 0 if the instance of H5C_image_entry_t
+ * is constructed from a regular entry.
*
- * If the instance is constructed from a prefetched entry
- * currently residing in the metadata cache, the field is
- * set to 1 + the age of the prefetched entry, or to
- * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX if that sum exceeds
- * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX.
+ * If the instance is constructed from a prefetched entry
+ * currently residing in the metadata cache, the field is
+ * set to 1 + the age of the prefetched entry, or to
+ * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX if that sum exceeds
+ * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX.
*
- * type_id: Integer field containing the type ID of the entry.
+ * type_id: Integer field containing the type ID of the entry.
*
- * lru_rank: Rank of the entry in the LRU just prior to file close.
+ * lru_rank: Rank of the entry in the LRU just prior to file close.
*
- * Note that the first entry on the LRU has lru_rank 1,
- * and that entries not on the LRU at that time will have
- * either lru_rank -1 (if pinned) or 0 (if loaded during
- * the process of flushing the cache.
+ * Note that the first entry on the LRU has lru_rank 1,
+ * and that entries not on the LRU at that time will have
+ * either lru_rank -1 (if pinned) or 0 (if loaded during
+ * the process of flushing the cache.
*
- * is_dirty: Boolean flag indicating whether the contents of the cache
- * entry has been modified since the last time it was written
- * to disk as a regular piece of metadata.
+ * is_dirty: Boolean flag indicating whether the contents of the cache
+ * entry has been modified since the last time it was written
+ * to disk as a regular piece of metadata.
*
* image_fd_height: Flush dependency height of the entry in the cache image.
*
@@ -1756,17 +1758,17 @@ typedef struct H5C_cache_entry_t {
*
* Note that while this count is initially taken from the
* flush dependency fields in the associated instance of
- * H5C_cache_entry_t, if the entry is in the cache image
- * (i.e. include_in_image is TRUE), any parents that are
- * not in the image are removed from this count and
+ * H5C_cache_entry_t, if the entry is in the cache image
+ * (i.e. include_in_image is TRUE), any parents that are
+ * not in the image are removed from this count and
* from the fd_parent_addrs array below.
*
* Finally observe that if the entry is dirty and in the
* cache image, and its parent is dirty and not in the cache
* image, then the entry must be removed from the cache image
* to avoid violating the flush dependency flush ordering.
- * This should have happened before the construction of
- * the instance of H5C_image_entry_t.
+ * This should have happened before the construction of
+ * the instance of H5C_image_entry_t.
*
* fd_parent_addrs: If the entry is a child in one or more flush dependency
* relationship when H5C_prep_for_file_close() is called, this
@@ -1779,27 +1781,27 @@ typedef struct H5C_cache_entry_t {
* Note that while this list of addresses is initially taken
* from the flush dependency fields in the associated instance of
* H5C_cache_entry_t, if the entry is in the cache image
- * (i.e. include_in_image is TRUE), any parents that are not
- * in the image are removed from this list, and from the
- * fd_parent_count above.
+ * (i.e. include_in_image is TRUE), any parents that are not
+ * in the image are removed from this list, and from the
+ * fd_parent_count above.
*
* Finally observe that if the entry is dirty and in the
* cache image, and its parent is dirty and not in the cache
* image, then the entry must be removed from the cache image
* to avoid violating the flush dependency flush ordering.
- * This should have happened before the construction of
- * the instance of H5C_image_entry_t.
+ * This should have happened before the construction of
+ * the instance of H5C_image_entry_t.
*
* fd_child_count: If the entry is a parent in a flush dependency
- * relationship, this field contains the number of flush
- * dependency children.
+ * relationship, this field contains the number of flush
+ * dependency children.
*
- * In all other cases, the field is set to zero.
+ * In all other cases, the field is set to zero.
*
* Note that while this count is initially taken from the
* flush dependency fields in the associated instance of
* H5C_cache_entry_t, if the entry is in the cache image
- * (i.e. include_in_image is TRUE), any children
+ * (i.e. include_in_image is TRUE), any children
* that are not in the image are removed from this count.
*
* fd_dirty_child_count: If the entry is a parent in a flush dependency
@@ -1811,16 +1813,16 @@ typedef struct H5C_cache_entry_t {
* Note that while this count is initially taken from the
* flush dependency fields in the associated instance of
* H5C_cache_entry_t, if the entry is in the cache image
- * (i.e. include_in_image is TRUE), any dirty children
- * that are not in the image are removed from this count.
+ * (i.e. include_in_image is TRUE), any dirty children
+ * that are not in the image are removed from this count.
*
- * image_ptr: Pointer to void. When not NULL, this field points to a
- * dynamically allocated block of size bytes in which the
- * on disk image of the metadata cache entry is stored.
+ * image_ptr: Pointer to void. When not NULL, this field points to a
+ * dynamically allocated block of size bytes in which the
+ * on disk image of the metadata cache entry is stored.
*
- * If the entry is dirty, the pre-serialize and serialize
- * callbacks must be used to update this image before it is
- * written to disk
+ * If the entry is dirty, the pre-serialize and serialize
+ * callbacks must be used to update this image before it is
+ * written to disk
*
*
****************************************************************************/
@@ -1852,95 +1854,95 @@ typedef struct H5C_image_entry_t {
* The fields of the structure are discussed individually below:
*
* version: Integer field containing the version number of this version
- * of the H5C_auto_size_ctl_t structure. Any instance of
- * H5C_auto_size_ctl_t passed to the cache must have a known
- * version number, or an error will be flagged.
+ * of the H5C_auto_size_ctl_t structure. Any instance of
+ * H5C_auto_size_ctl_t passed to the cache must have a known
+ * version number, or an error will be flagged.
*
* report_fcn: Pointer to the function that is to be called to report
* activities each time the auto cache resize code is executed. If the
- * field is NULL, no call is made.
+ * field is NULL, no call is made.
*
- * If the field is not NULL, it must contain the address of a function
- * of type H5C_auto_resize_report_fcn.
+ * If the field is not NULL, it must contain the address of a function
+ * of type H5C_auto_resize_report_fcn.
*
* set_initial_size: Boolean flag indicating whether the size of the
- * initial size of the cache is to be set to the value given in
- * the initial_size field. If set_initial_size is FALSE, the
- * initial_size field is ignored.
+ * initial size of the cache is to be set to the value given in
+ * the initial_size field. If set_initial_size is FALSE, the
+ * initial_size field is ignored.
*
* initial_size: If enabled, this field contain the size the cache is
- * to be set to upon receipt of this structure. Needless to say,
- * initial_size must lie in the closed interval [min_size, max_size].
+ * to be set to upon receipt of this structure. Needless to say,
+ * initial_size must lie in the closed interval [min_size, max_size].
*
* min_clean_fraction: double in the range 0 to 1 indicating the fraction
- * of the cache that is to be kept clean. This field is only used
- * in parallel mode. Typical values are 0.1 to 0.5.
+ * of the cache that is to be kept clean. This field is only used
+ * in parallel mode. Typical values are 0.1 to 0.5.
*
* max_size: Maximum size to which the cache can be adjusted. The
- * supplied value must fall in the closed interval
- * [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, max_size must
- * be greater than or equal to min_size.
+ * supplied value must fall in the closed interval
+ * [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, max_size must
+ * be greater than or equal to min_size.
*
* min_size: Minimum size to which the cache can be adjusted. The
* supplied value must fall in the closed interval
* [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, min_size must
- * be less than or equal to max_size.
+ * be less than or equal to max_size.
*
* epoch_length: Number of accesses on the cache over which to collect
- * hit rate stats before running the automatic cache resize code,
+ * hit rate stats before running the automatic cache resize code,
* if it is enabled.
*
- * At the end of an epoch, we discard prior hit rate data and start
- * collecting afresh. The epoch_length must lie in the closed
- * interval [H5C__MIN_AR_EPOCH_LENGTH, H5C__MAX_AR_EPOCH_LENGTH].
+ * At the end of an epoch, we discard prior hit rate data and start
+ * collecting afresh. The epoch_length must lie in the closed
+ * interval [H5C__MIN_AR_EPOCH_LENGTH, H5C__MAX_AR_EPOCH_LENGTH].
*
*
* Cache size increase control fields:
*
* incr_mode: Instance of the H5C_cache_incr_mode enumerated type whose
- * value indicates how we determine whether the cache size should be
- * increased. At present there are two possible values:
+ * value indicates how we determine whether the cache size should be
+ * increased. At present there are two possible values:
*
- * H5C_incr__off: Don't attempt to increase the size of the cache
- * automatically.
+ * H5C_incr__off: Don't attempt to increase the size of the cache
+ * automatically.
*
- * When this increment mode is selected, the remaining fields
- * in the cache size increase section ar ignored.
+ * When this increment mode is selected, the remaining fields
+ * in the cache size increase section ar ignored.
*
- * H5C_incr__threshold: Attempt to increase the size of the cache
- * whenever the average hit rate over the last epoch drops
- * below the value supplied in the lower_hr_threshold
- * field.
+ * H5C_incr__threshold: Attempt to increase the size of the cache
+ * whenever the average hit rate over the last epoch drops
+ * below the value supplied in the lower_hr_threshold
+ * field.
*
- * Note that this attempt will fail if the cache is already
- * at its maximum size, or if the cache is not already using
- * all available space.
+ * Note that this attempt will fail if the cache is already
+ * at its maximum size, or if the cache is not already using
+ * all available space.
*
* lower_hr_threshold: Lower hit rate threshold. If the increment mode
- * (incr_mode) is H5C_incr__threshold and the hit rate drops below the
- * value supplied in this field in an epoch, increment the cache size by
- * size_increment. Note that cache size may not be incremented above
- * max_size, and that the increment may be further restricted by the
- * max_increment field if it is enabled.
+ * (incr_mode) is H5C_incr__threshold and the hit rate drops below the
+ * value supplied in this field in an epoch, increment the cache size by
+ * size_increment. Note that cache size may not be incremented above
+ * max_size, and that the increment may be further restricted by the
+ * max_increment field if it is enabled.
*
- * When enabled, this field must contain a value in the range [0.0, 1.0].
- * Depending on the incr_mode selected, it may also have to be less than
- * upper_hr_threshold.
+ * When enabled, this field must contain a value in the range [0.0, 1.0].
+ * Depending on the incr_mode selected, it may also have to be less than
+ * upper_hr_threshold.
*
* increment: Double containing the multiplier used to derive the new
- * cache size from the old if a cache size increment is triggered.
+ * cache size from the old if a cache size increment is triggered.
* The increment must be greater than 1.0, and should not exceed 2.0.
*
- * The new cache size is obtained by multiplying the current max cache
- * size by the increment, and then clamping to max_size and to stay
- * within the max_increment as necessary.
+ * The new cache size is obtained by multiplying the current max cache
+ * size by the increment, and then clamping to max_size and to stay
+ * within the max_increment as necessary.
*
* apply_max_increment: Boolean flag indicating whether the max_increment
- * field should be used to limit the maximum cache size increment.
+ * field should be used to limit the maximum cache size increment.
*
* max_increment: If enabled by the apply_max_increment field described
- * above, this field contains the maximum number of bytes by which the
- * cache size can be increased in a single re-size.
+ * above, this field contains the maximum number of bytes by which the
+ * cache size can be increased in a single re-size.
*
* flash_incr_mode: Instance of the H5C_cache_flash_incr_mode enumerated
* type whose value indicates whether and by what algorithm we should
@@ -1989,96 +1991,96 @@ typedef struct H5C_image_entry_t {
* is H5C_flash_incr__add_space.
*
* flash_threshold: Double containing the factor by which current max cache
- * size is multiplied to obtain the size threshold for the add_space
- * flash increment algorithm. The field is ignored unless
- * flash_incr_mode is H5C_flash_incr__add_space.
+ * size is multiplied to obtain the size threshold for the add_space
+ * flash increment algorithm. The field is ignored unless
+ * flash_incr_mode is H5C_flash_incr__add_space.
*
*
* Cache size decrease control fields:
*
* decr_mode: Instance of the H5C_cache_decr_mode enumerated type whose
- * value indicates how we determine whether the cache size should be
- * decreased. At present there are four possibilities.
+ * value indicates how we determine whether the cache size should be
+ * decreased. At present there are four possibilities.
*
- * H5C_decr__off: Don't attempt to decrease the size of the cache
- * automatically.
+ * H5C_decr__off: Don't attempt to decrease the size of the cache
+ * automatically.
*
- * When this increment mode is selected, the remaining fields
- * in the cache size decrease section are ignored.
+ * When this increment mode is selected, the remaining fields
+ * in the cache size decrease section are ignored.
*
- * H5C_decr__threshold: Attempt to decrease the size of the cache
- * whenever the average hit rate over the last epoch rises
- * above the value supplied in the upper_hr_threshold
- * field.
+ * H5C_decr__threshold: Attempt to decrease the size of the cache
+ * whenever the average hit rate over the last epoch rises
+ * above the value supplied in the upper_hr_threshold
+ * field.
*
- * H5C_decr__age_out: At the end of each epoch, search the cache for
- * entries that have not been accessed for at least the number
- * of epochs specified in the epochs_before_eviction field, and
- * evict these entries. Conceptually, the maximum cache size
- * is then decreased to match the new actual cache size. However,
- * this reduction may be modified by the min_size, the
- * max_decrement, and/or the empty_reserve.
+ * H5C_decr__age_out: At the end of each epoch, search the cache for
+ * entries that have not been accessed for at least the number
+ * of epochs specified in the epochs_before_eviction field, and
+ * evict these entries. Conceptually, the maximum cache size
+ * is then decreased to match the new actual cache size. However,
+ * this reduction may be modified by the min_size, the
+ * max_decrement, and/or the empty_reserve.
*
- * H5C_decr__age_out_with_threshold: Same as age_out, but we only
- * attempt to reduce the cache size when the hit rate observed
- * over the last epoch exceeds the value provided in the
- * upper_hr_threshold field.
+ * H5C_decr__age_out_with_threshold: Same as age_out, but we only
+ * attempt to reduce the cache size when the hit rate observed
+ * over the last epoch exceeds the value provided in the
+ * upper_hr_threshold field.
*
* upper_hr_threshold: Upper hit rate threshold. The use of this field
- * varies according to the current decr_mode:
+ * varies according to the current decr_mode:
*
- * H5C_decr__off or H5C_decr__age_out: The value of this field is
- * ignored.
+ * H5C_decr__off or H5C_decr__age_out: The value of this field is
+ * ignored.
*
- * H5C_decr__threshold: If the hit rate exceeds this threshold in any
- * epoch, attempt to decrement the cache size by size_decrement.
+ * H5C_decr__threshold: If the hit rate exceeds this threshold in any
+ * epoch, attempt to decrement the cache size by size_decrement.
*
- * Note that cache size may not be decremented below min_size.
+ * Note that cache size may not be decremented below min_size.
*
- * Note also that if the upper_threshold is 1.0, the cache size
- * will never be reduced.
+ * Note also that if the upper_threshold is 1.0, the cache size
+ * will never be reduced.
*
- * H5C_decr__age_out_with_threshold: If the hit rate exceeds this
- * threshold in any epoch, attempt to reduce the cache size
- * by evicting entries that have not been accessed for more
- * than the specified number of epochs.
+ * H5C_decr__age_out_with_threshold: If the hit rate exceeds this
+ * threshold in any epoch, attempt to reduce the cache size
+ * by evicting entries that have not been accessed for more
+ * than the specified number of epochs.
*
* decrement: This field is only used when the decr_mode is
- * H5C_decr__threshold.
+ * H5C_decr__threshold.
*
- * The field is a double containing the multiplier used to derive the
- * new cache size from the old if a cache size decrement is triggered.
- * The decrement must be in the range 0.0 (in which case the cache will
+ * The field is a double containing the multiplier used to derive the
+ * new cache size from the old if a cache size decrement is triggered.
+ * The decrement must be in the range 0.0 (in which case the cache will
* try to contract to its minimum size) to 1.0 (in which case the
* cache will never shrink).
*
* apply_max_decrement: Boolean flag used to determine whether decrements
- * in cache size are to be limited by the max_decrement field.
+ * in cache size are to be limited by the max_decrement field.
*
* max_decrement: Maximum number of bytes by which the cache size can be
- * decreased in a single re-size. Note that decrements may also be
- * restricted by the min_size of the cache, and (in age out modes) by
- * the empty_reserve field.
+ * decreased in a single re-size. Note that decrements may also be
+ * restricted by the min_size of the cache, and (in age out modes) by
+ * the empty_reserve field.
*
* epochs_before_eviction: Integer field used in H5C_decr__age_out and
- * H5C_decr__age_out_with_threshold decrement modes.
+ * H5C_decr__age_out_with_threshold decrement modes.
*
- * This field contains the number of epochs an entry must remain
- * unaccessed before it is evicted in an attempt to reduce the
- * cache size. If applicable, this field must lie in the range
- * [1, H5C__MAX_EPOCH_MARKERS].
+ * This field contains the number of epochs an entry must remain
+ * unaccessed before it is evicted in an attempt to reduce the
+ * cache size. If applicable, this field must lie in the range
+ * [1, H5C__MAX_EPOCH_MARKERS].
*
* apply_empty_reserve: Boolean field controlling whether the empty_reserve
- * field is to be used in computing the new cache size when the
- * decr_mode is H5C_decr__age_out or H5C_decr__age_out_with_threshold.
+ * field is to be used in computing the new cache size when the
+ * decr_mode is H5C_decr__age_out or H5C_decr__age_out_with_threshold.
*
* empty_reserve: To avoid a constant racheting down of cache size by small
- * amounts in the H5C_decr__age_out and H5C_decr__age_out_with_threshold
- * modes, this field allows one to require that any cache size
- * reductions leave the specified fraction of unused space in the cache.
+ * amounts in the H5C_decr__age_out and H5C_decr__age_out_with_threshold
+ * modes, this field allows one to require that any cache size
+ * reductions leave the specified fraction of unused space in the cache.
*
- * The value of this field must be in the range [0.0, 1.0]. I would
- * expect typical values to be in the range of 0.01 to 0.1.
+ * The value of this field must be in the range [0.0, 1.0]. I would
+ * expect typical values to be in the range of 0.01 to 0.1.
*
****************************************************************************/
@@ -2101,34 +2103,34 @@ typedef void (*H5C_auto_resize_rpt_fcn)(H5C_t * cache_ptr, int32_t version,
typedef struct H5C_auto_size_ctl_t {
/* general configuration fields: */
- int32_t version;
- H5C_auto_resize_rpt_fcn rpt_fcn;
- hbool_t set_initial_size;
- size_t initial_size;
- double min_clean_fraction;
- size_t max_size;
- size_t min_size;
- int64_t epoch_length;
+ int32_t version;
+ H5C_auto_resize_rpt_fcn rpt_fcn;
+ hbool_t set_initial_size;
+ size_t initial_size;
+ double min_clean_fraction;
+ size_t max_size;
+ size_t min_size;
+ int64_t epoch_length;
/* size increase control fields: */
- enum H5C_cache_incr_mode incr_mode;
- double lower_hr_threshold;
- double increment;
- hbool_t apply_max_increment;
- size_t max_increment;
+ enum H5C_cache_incr_mode incr_mode;
+ double lower_hr_threshold;
+ double increment;
+ hbool_t apply_max_increment;
+ size_t max_increment;
enum H5C_cache_flash_incr_mode flash_incr_mode;
double flash_multiple;
double flash_threshold;
/* size decrease control fields: */
- enum H5C_cache_decr_mode decr_mode;
- double upper_hr_threshold;
- double decrement;
- hbool_t apply_max_decrement;
- size_t max_decrement;
- int32_t epochs_before_eviction;
- hbool_t apply_empty_reserve;
- double empty_reserve;
+ enum H5C_cache_decr_mode decr_mode;
+ double upper_hr_threshold;
+ double decrement;
+ hbool_t apply_max_decrement;
+ size_t max_decrement;
+ int32_t epochs_before_eviction;
+ hbool_t apply_empty_reserve;
+ double empty_reserve;
} H5C_auto_size_ctl_t;
/****************************************************************************
@@ -2144,12 +2146,12 @@ typedef struct H5C_auto_size_ctl_t {
* The fields of the structure are discussed individually below:
*
* version: Integer field containing the version number of this version
- * of the H5C_image_ctl_t structure. Any instance of
- * H5C_image_ctl_t passed to the cache must have a known
- * version number, or an error will be flagged.
+ * of the H5C_image_ctl_t structure. Any instance of
+ * H5C_image_ctl_t passed to the cache must have a known
+ * version number, or an error will be flagged.
*
* generate_image: Boolean flag indicating whether a cache image should
- * be created on file close.
+ * be created on file close.
*
* save_resize_status: Boolean flag indicating whether the cache image
* should include the adaptive cache resize configuration and status.
@@ -2181,40 +2183,40 @@ typedef struct H5C_auto_size_ctl_t {
* equivalent of H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE.
*
* flags: Unsigned integer containing flags controlling which aspects of the
- * cache image functinality is actually executed. The primary impetus
- * behind this field is to allow development of tests for partial
- * implementations that will require little if any modification to run
- * with the full implementation. In normal operation, all flags should
- * be set.
+ * cache image functinality is actually executed. The primary impetus
+ * behind this field is to allow development of tests for partial
+ * implementations that will require little if any modification to run
+ * with the full implementation. In normal operation, all flags should
+ * be set.
*
****************************************************************************/
-#define H5C_CI__GEN_MDCI_SBE_MESG ((unsigned)0x0001)
-#define H5C_CI__GEN_MDC_IMAGE_BLK ((unsigned)0x0002)
-#define H5C_CI__SUPRESS_ENTRY_WRITES ((unsigned)0x0004)
-#define H5C_CI__WRITE_CACHE_IMAGE ((unsigned)0x0008)
+#define H5C_CI__GEN_MDCI_SBE_MESG ((unsigned)0x0001)
+#define H5C_CI__GEN_MDC_IMAGE_BLK ((unsigned)0x0002)
+#define H5C_CI__SUPRESS_ENTRY_WRITES ((unsigned)0x0004)
+#define H5C_CI__WRITE_CACHE_IMAGE ((unsigned)0x0008)
/* This #define must set all defined H5C_CI flags. It is
* used in the default value for instances of H5C_cache_image_ctl_t.
* This value will only be modified in test code.
*/
-#define H5C_CI__ALL_FLAGS ((unsigned)0x000F)
+#define H5C_CI__ALL_FLAGS ((unsigned)0x000F)
#define H5C__DEFAULT_CACHE_IMAGE_CTL \
{ \
- /* version = */ H5C__CURR_CACHE_IMAGE_CTL_VER, \
- /* generate_image = */ FALSE, \
- /* save_resize_status = */ FALSE, \
- /* entry_ageout = */ H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE, \
- /* flags = */ H5C_CI__ALL_FLAGS \
+ H5C__CURR_CACHE_IMAGE_CTL_VER, /* = version */ \
+ FALSE, /* = generate_image */ \
+ FALSE, /* = save_resize_status */ \
+ H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE, /* = entry_ageout */ \
+ H5C_CI__ALL_FLAGS /* = flags */ \
}
typedef struct H5C_cache_image_ctl_t {
- int32_t version;
- hbool_t generate_image;
+ int32_t version;
+ hbool_t generate_image;
hbool_t save_resize_status;
int32_t entry_ageout;
- unsigned flags;
+ unsigned flags;
} H5C_cache_image_ctl_t;
/* The cache logging output style */
@@ -2285,7 +2287,7 @@ H5_DLL herr_t H5C_resize_entry(void *thing, size_t new_size);
H5_DLL herr_t H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_ptr);
H5_DLL herr_t H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr,
H5C_cache_image_ctl_t *config_ptr);
-H5_DLL herr_t H5C_set_evictions_enabled(H5C_t *cache_ptr,
+H5_DLL herr_t H5C_set_evictions_enabled(H5C_t *cache_ptr,
hbool_t evictions_enabled);
H5_DLL herr_t H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled,
hbool_t clear_slist);
@@ -2330,7 +2332,7 @@ H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len,
haddr_t *ce_array_ptr);
#endif /* H5_HAVE_PARALLEL */
-#ifndef NDEBUG /* debugging functions */
+#ifndef NDEBUG /* debugging functions */
H5_DLL herr_t H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name);
H5_DLL herr_t H5C_dump_cache_LRU(H5C_t *cache_ptr, const char *cache_name);
H5_DLL hbool_t H5C_get_serialization_in_progress(const H5C_t *cache_ptr);
@@ -2338,7 +2340,7 @@ H5_DLL hbool_t H5C_cache_is_clean(const H5C_t *cache_ptr, H5C_ring_t inner_ring)
H5_DLL herr_t H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn);
H5_DLL herr_t H5C_get_entry_ptr_from_addr(H5C_t *cache_ptr, haddr_t addr,
void **entry_ptr_ptr);
-H5_DLL herr_t H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr,
+H5_DLL herr_t H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr,
haddr_t child_addr, hbool_t *fd_exists_ptr);
H5_DLL herr_t H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr,
const H5C_class_t *expected_type, hbool_t *in_cache_ptr,
diff --git a/src/H5Dint.c b/src/H5Dint.c
index f99aabb..6e247fc 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -134,10 +134,10 @@ H5FL_EXTERN(H5D_chunk_info_t);
H5FL_BLK_EXTERN(type_conv);
/* Disable warning for intentional identical branches here -QAK */
-H5_GCC_DIAG_OFF(larger-than=)
+H5_GCC_DIAG_OFF("larger-than=")
/* Define a static "default" dataset structure to use to initialize new datasets */
static H5D_shared_t H5D_def_dset;
-H5_GCC_DIAG_ON(larger-than=)
+H5_GCC_DIAG_ON("larger-than=")
/* Dataset ID class */
static const H5I_class_t H5I_DATASET_CLS[1] = {{
@@ -155,7 +155,7 @@ static hbool_t H5D_top_package_initialize_s = FALSE;
static const char *H5D_prefix_ext_env = NULL;
static const char *H5D_prefix_vds_env = NULL;
-
+
/*-------------------------------------------------------------------------
* Function: H5D_init
*
@@ -178,7 +178,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_init() */
-
+
/*--------------------------------------------------------------------------
NAME
H5D__init_package -- Initialize interface-specific information
@@ -241,7 +241,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__init_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D_top_term_package
*
@@ -295,7 +295,7 @@ H5D_top_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5D_top_term_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D_term_package
*
@@ -332,7 +332,7 @@ H5D_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5D_term_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__close_cb
*
@@ -369,7 +369,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__close_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__create_named
*
@@ -422,7 +422,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__create_named() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_space_status
*
@@ -495,7 +495,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__get_space_status() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__new
*
@@ -566,7 +566,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__new() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__init_type
*
@@ -641,7 +641,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__init_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__cache_dataspace_info
*
@@ -681,7 +681,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__cache_dataspace_info() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__init_space
*
@@ -724,7 +724,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__init_space() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__use_minimized_dset_headers
*
@@ -762,7 +762,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5D__use_minimized_dset_headers */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__calculate_minimium_header_size
*
@@ -882,7 +882,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5D__calculate_minimum_header_size */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__prepare_minimized_oh
*
@@ -925,7 +925,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5D__prepare_minimized_oh */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__update_oh_info
*
@@ -1131,7 +1131,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__update_oh_info() */
-
+
/*--------------------------------------------------------------------------
* Function: H5D__build_file_prefix
@@ -1213,7 +1213,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__build_file_prefix() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__create
*
@@ -1471,7 +1471,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__create() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__open_name
*
@@ -1529,7 +1529,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__open_name() */
-
+
/*
*-------------------------------------------------------------------------
* Function: H5D_open
@@ -1664,7 +1664,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_open() */
-
+
/*
*-------------------------------------------------------------------------
* Function: H5D__flush_append_setup
@@ -1739,7 +1739,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__append_flush_setup() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__open_oid
*
@@ -1909,7 +1909,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__open_oid() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D_close
*
@@ -2114,7 +2114,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D_mult_refresh_close
*
@@ -2194,7 +2194,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_mult_refresh_close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D_mult_refresh_reopen
*
@@ -2241,7 +2241,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D_mult_refresh_reopen() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D_oloc
*
@@ -2260,7 +2260,7 @@ H5D_oloc(H5D_t *dataset)
FUNC_LEAVE_NOAPI(dataset ? &(dataset->oloc) : (H5O_loc_t *)NULL)
} /* end H5D_oloc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D_nameof
*
@@ -2279,7 +2279,7 @@ H5D_nameof(const H5D_t *dataset)
FUNC_LEAVE_NOAPI(dataset ? &(dataset->path) : NULL)
} /* end H5D_nameof() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__alloc_storage
*
@@ -2445,7 +2445,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__alloc_storage() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__init_storage
*
@@ -2517,7 +2517,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__init_storage() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_storage_size
*
@@ -2572,7 +2572,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__get_storage_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_offset
*
@@ -2619,7 +2619,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__get_offset() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__vlen_get_buf_size_alloc
*
@@ -2657,7 +2657,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__vlen_get_buf_size_alloc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__vlen_get_buf_size_cb
*
@@ -2693,7 +2693,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__vlen_get_buf_size_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__vlen_get_buf_size
*
@@ -2792,7 +2792,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__vlen_get_buf_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__vlen_get_buf_size_gen_cb
*
@@ -2848,7 +2848,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__vlen_get_buf_size_gen_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__vlen_get_buf_size_gen
*
@@ -2961,7 +2961,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__vlen_get_buf_size_gen() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__check_filters
*
@@ -3011,7 +3011,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__check_filters() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__set_extent
*
@@ -3195,7 +3195,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__set_extent() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__flush_sieve_buf
*
@@ -3232,7 +3232,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__flush_sieve_buf() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__flush_real
*
@@ -3263,7 +3263,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__flush_real() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__flush
*
@@ -3296,7 +3296,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__flush() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__format_convert
*
@@ -3447,7 +3447,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__format_convert() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__mark
*
@@ -3508,7 +3508,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__mark() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__flush_all_cb
*
@@ -3541,7 +3541,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__flush_all_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D_flush_all
*
@@ -3569,7 +3569,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_flush_all() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D_get_create_plist
*
@@ -3746,7 +3746,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_get_create_plist() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D_get_access_plist
*
@@ -3843,7 +3843,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_get_access_plist() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_space
*
@@ -3883,7 +3883,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__get_space() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_type
*
@@ -3939,7 +3939,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__get_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__refresh
*
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 97437de..fe5baac 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -189,7 +189,7 @@ static const H5FD_class_t H5FD_core_g = {
/* Define a free list to manage the region type */
H5FL_DEFINE(H5FD_core_region_t);
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_add_dirty_region
*
@@ -295,7 +295,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__core_add_dirty_region() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_destroy_dirty_list
*
@@ -330,7 +330,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__core_destroy_dirty_list() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_write_to_bstore
*
@@ -403,7 +403,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__core_write_to_bstore() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__init_package
*
@@ -437,7 +437,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD__init_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_core_init
*
@@ -469,7 +469,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_core_init() */
-
+
/*---------------------------------------------------------------------------
* Function: H5FD__core_term
*
@@ -493,7 +493,7 @@ H5FD__core_term(void)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD__core_term() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Pset_core_write_tracking
*
@@ -545,7 +545,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_core_write_tracking() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Pget_core_write_tracking
*
@@ -587,7 +587,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pget_core_write_tracking() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Pset_fapl_core
*
@@ -631,7 +631,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_fapl_core() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Pget_fapl_core
*
@@ -670,7 +670,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pget_fapl_core() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_fapl_get
*
@@ -708,7 +708,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__core_fapl_get() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD___core_open
*
@@ -964,7 +964,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__core_open() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_close
*
@@ -1015,7 +1015,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__core_close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_cmp
*
@@ -1093,7 +1093,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__core_cmp() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_query
*
@@ -1114,6 +1114,7 @@ H5FD__core_query(const H5FD_t * _file, unsigned long *flags /* out */)
FUNC_ENTER_STATIC_NOERR
+ /* clang-format off */
/* Set the VFL feature flags that this driver supports */
if(flags) {
*flags = 0;
@@ -1130,11 +1131,12 @@ H5FD__core_query(const H5FD_t * _file, unsigned long *flags /* out */)
*flags |= H5FD_FEAT_DEFAULT_VFD_COMPATIBLE; /* VFD creates a file which can be opened with the default VFD */
}
} /* end if */
+ /* clang-format on */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD__core_query() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_get_eoa
*
@@ -1159,7 +1161,7 @@ H5FD__core_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_LEAVE_NOAPI(file->eoa)
} /* end H5FD__core_get_eoa() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_set_eoa
*
@@ -1191,7 +1193,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__core_set_eoa() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_get_eof
*
@@ -1218,7 +1220,7 @@ H5FD__core_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_LEAVE_NOAPI(file->eof)
} /* end H5FD__core_get_eof() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_get_handle
*
@@ -1278,7 +1280,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__core_get_handle() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_read
*
@@ -1299,7 +1301,7 @@ static herr_t
H5FD__core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
size_t size, void *buf/*out*/)
{
- H5FD_core_t *file = (H5FD_core_t*)_file;
+ H5FD_core_t *file = (H5FD_core_t*)_file;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1340,7 +1342,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__core_read() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_write
*
@@ -1421,7 +1423,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__core_write() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_flush
*
@@ -1483,7 +1485,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__core_flush() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_truncate
*
@@ -1508,7 +1510,7 @@ done:
* If we are not closing, we realloc the buffer to size equal
* to the smallest multiple of the allocation increment that
* equals or exceeds the eoa and set the eof accordingly.
- * Note that we no longer truncate the backing store to the
+ * Note that we no longer truncate the backing store to the
* new eof if applicable.
* -- JRM
*
@@ -1603,14 +1605,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__core_truncate() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_lock
*
* Purpose: To place an advisory lock on a file.
- * The lock type to apply depends on the parameter "rw":
- * TRUE--opens for write: an exclusive lock
- * FALSE--opens for read: a shared lock
+ * The lock type to apply depends on the parameter "rw":
+ * TRUE--opens for write: an exclusive lock
+ * FALSE--opens for read: a shared lock
*
* Return: SUCCEED/FAIL
*
@@ -1653,7 +1655,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__core_lock() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__core_unlock
*
@@ -1668,7 +1670,7 @@ done:
static herr_t
H5FD__core_unlock(H5FD_t *_file)
{
- H5FD_core_t *file = (H5FD_core_t*)_file; /* VFD file struct */
+ H5FD_core_t *file = (H5FD_core_t*)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index 290d743..01f87a2 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -12,38 +12,38 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke
- * Monday, November 10, 1997
- *
- * Purpose: Implements a family of files that acts as a single hdf5
- * file. The purpose is to be able to split a huge file on a
- * 64-bit platform, transfer all the <2GB members to a 32-bit
- * platform, and then access the entire huge file on the 32-bit
- * platform.
- *
- * All family members are logically the same size although their
- * physical sizes may vary. The logical member size is
- * determined by looking at the physical size of the first member
- * when the file is opened. When creating a file family, the
- * first member is created with a predefined physical size
- * (actually, this happens when the file family is flushed, and
- * can be quite time consuming on file systems that don't
- * implement holes, like nfs).
+ * Programmer: Robb Matzke
+ * Monday, November 10, 1997
+ *
+ * Purpose: Implements a family of files that acts as a single hdf5
+ * file. The purpose is to be able to split a huge file on a
+ * 64-bit platform, transfer all the <2GB members to a 32-bit
+ * platform, and then access the entire huge file on the 32-bit
+ * platform.
+ *
+ * All family members are logically the same size although their
+ * physical sizes may vary. The logical member size is
+ * determined by looking at the physical size of the first member
+ * when the file is opened. When creating a file family, the
+ * first member is created with a predefined physical size
+ * (actually, this happens when the file family is flushed, and
+ * can be quite time consuming on file systems that don't
+ * implement holes, like nfs).
*
*/
#include "H5FDdrvr_module.h" /* This source code file is part of the H5FD driver module */
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDfamily.h" /* Family file driver */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDfamily.h" /* Family file driver */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
/* The size of the member name buffers */
#define H5FD_FAM_MEMB_NAME_BUF_SIZE 4096
@@ -53,19 +53,19 @@ static hid_t H5FD_FAMILY_g = 0;
/* The description of a file belonging to this driver. */
typedef struct H5FD_family_t {
- H5FD_t pub; /*public stuff, must be first */
- hid_t memb_fapl_id; /*file access property list for members */
- hsize_t memb_size; /*actual size of each member file */
- hsize_t pmem_size; /*member size passed in from property */
- unsigned nmembs; /*number of family members */
- unsigned amembs; /*number of member slots allocated */
- H5FD_t **memb; /*dynamic array of member pointers */
- haddr_t eoa; /*end of allocated addresses */
- char *name; /*name generator printf format */
- unsigned flags; /*flags for opening additional members */
+ H5FD_t pub; /*public stuff, must be first */
+ hid_t memb_fapl_id; /*file access property list for members */
+ hsize_t memb_size; /*actual size of each member file */
+ hsize_t pmem_size; /*member size passed in from property */
+ unsigned nmembs; /*number of family members */
+ unsigned amembs; /*number of member slots allocated */
+ H5FD_t **memb; /*dynamic array of member pointers */
+ haddr_t eoa; /*end of allocated addresses */
+ char *name; /*name generator printf format */
+ unsigned flags; /*flags for opening additional members */
/* Information from properties set by 'h5repart' tool */
- hsize_t mem_newsize; /*new member size passed in as private
+ hsize_t mem_newsize; /*new member size passed in as private
* property. It's used only by h5repart */
hbool_t repart_members; /* Whether to mark the superblock dirty
* when it is loaded, so that the family
@@ -74,8 +74,8 @@ typedef struct H5FD_family_t {
/* Driver-specific file access properties */
typedef struct H5FD_family_fapl_t {
- hsize_t memb_size; /*size of each member */
- hid_t memb_fapl_id; /*file access property list of each memb*/
+ hsize_t memb_size; /*size of each member */
+ hid_t memb_fapl_id; /*file access property list of each memb*/
} H5FD_family_fapl_t;
/* Callback prototypes */
@@ -85,11 +85,11 @@ static void *H5FD__family_fapl_copy(const void *_old_fa);
static herr_t H5FD__family_fapl_free(void *_fa);
static hsize_t H5FD__family_sb_size(H5FD_t *_file);
static herr_t H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/,
- unsigned char *buf/*out*/);
+ unsigned char *buf/*out*/);
static herr_t H5FD__family_sb_decode(H5FD_t *_file, const char *name,
const unsigned char *buf);
static H5FD_t *H5FD__family_open(const char *name, unsigned flags,
- hid_t fapl_id, haddr_t maxaddr);
+ hid_t fapl_id, haddr_t maxaddr);
static herr_t H5FD__family_close(H5FD_t *_file);
static int H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD__family_query(const H5FD_t *_f1, unsigned long *flags);
@@ -98,9 +98,9 @@ static herr_t H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa);
static haddr_t H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD__family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, void *_buf/*out*/);
+ size_t size, void *_buf/*out*/);
static herr_t H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, const void *_buf);
+ size_t size, const void *_buf);
static herr_t H5FD__family_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD__family_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD__family_lock(H5FD_t *_file, hbool_t rw);
@@ -108,41 +108,41 @@ static herr_t H5FD__family_unlock(H5FD_t *_file);
/* The class struct */
static const H5FD_class_t H5FD_family_g = {
- "family", /* name */
- HADDR_MAX, /* maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
+ "family", /* name */
+ HADDR_MAX, /* maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
H5FD__family_term, /* terminate */
- H5FD__family_sb_size, /* sb_size */
- H5FD__family_sb_encode, /* sb_encode */
- H5FD__family_sb_decode, /* sb_decode */
- sizeof(H5FD_family_fapl_t), /* fapl_size */
- H5FD__family_fapl_get, /* fapl_get */
- H5FD__family_fapl_copy, /* fapl_copy */
- H5FD__family_fapl_free, /* fapl_free */
- 0, /* dxpl_size */
- NULL, /* dxpl_copy */
- NULL, /* dxpl_free */
- H5FD__family_open, /* open */
- H5FD__family_close, /* close */
- H5FD__family_cmp, /* cmp */
- H5FD__family_query, /* query */
- NULL, /* get_type_map */
- NULL, /* alloc */
- NULL, /* free */
- H5FD__family_get_eoa, /* get_eoa */
- H5FD__family_set_eoa, /* set_eoa */
- H5FD__family_get_eof, /* get_eof */
+ H5FD__family_sb_size, /* sb_size */
+ H5FD__family_sb_encode, /* sb_encode */
+ H5FD__family_sb_decode, /* sb_decode */
+ sizeof(H5FD_family_fapl_t), /* fapl_size */
+ H5FD__family_fapl_get, /* fapl_get */
+ H5FD__family_fapl_copy, /* fapl_copy */
+ H5FD__family_fapl_free, /* fapl_free */
+ 0, /* dxpl_size */
+ NULL, /* dxpl_copy */
+ NULL, /* dxpl_free */
+ H5FD__family_open, /* open */
+ H5FD__family_close, /* close */
+ H5FD__family_cmp, /* cmp */
+ H5FD__family_query, /* query */
+ NULL, /* get_type_map */
+ NULL, /* alloc */
+ NULL, /* free */
+ H5FD__family_get_eoa, /* get_eoa */
+ H5FD__family_set_eoa, /* set_eoa */
+ H5FD__family_get_eof, /* get_eof */
H5FD__family_get_handle, /* get_handle */
- H5FD__family_read, /* read */
- H5FD__family_write, /* write */
- H5FD__family_flush, /* flush */
- H5FD__family_truncate, /* truncate */
+ H5FD__family_read, /* read */
+ H5FD__family_write, /* write */
+ H5FD__family_flush, /* flush */
+ H5FD__family_truncate, /* truncate */
H5FD__family_lock, /* lock */
H5FD__family_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
-
+
/*--------------------------------------------------------------------------
NAME
H5FD__init_package -- Initialize interface-specific information
@@ -169,7 +169,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD__init_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_family_init
*
@@ -201,11 +201,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD_family_init() */
-
+
/*---------------------------------------------------------------------------
- * Function: H5FD__family_term
+ * Function: H5FD__family_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
* Returns: Non-negative on success or negative on failure
*
@@ -225,21 +225,21 @@ H5FD__family_term(void)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD__family_term() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_family
+ * Function: H5Pset_fapl_family
*
- * Purpose: Sets the file access property list FAPL_ID to use the family
- * driver. The MEMB_SIZE is the size in bytes of each file
- * member (used only when creating a new file) and the
- * MEMB_FAPL_ID is a file access property list to be used for
- * each family member.
+ * Purpose: Sets the file access property list FAPL_ID to use the family
+ * driver. The MEMB_SIZE is the size in bytes of each file
+ * member (used only when creating a new file) and the
+ * MEMB_FAPL_ID is a file access property list to be used for
+ * each family member.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -248,7 +248,7 @@ herr_t
H5Pset_fapl_family(hid_t fapl_id, hsize_t msize, hid_t memb_fapl_id)
{
herr_t ret_value;
- H5FD_family_fapl_t fa={0, -1};
+ H5FD_family_fapl_t fa={0, -1};
H5P_genplist_t *plist; /* Property list pointer */
FUNC_ENTER_API(FAIL)
@@ -275,18 +275,18 @@ done:
FUNC_LEAVE_API(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pget_fapl_family
+ * Function: H5Pget_fapl_family
*
- * Purpose: Returns information about the family file access property
- * list though the function arguments.
+ * Purpose: Returns information about the family file access property
+ * list though the function arguments.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -295,7 +295,7 @@ herr_t
H5Pget_fapl_family(hid_t fapl_id, hsize_t *msize/*out*/, hid_t *memb_fapl_id/*out*/)
{
H5P_genplist_t *plist; /* Property list pointer */
- const H5FD_family_fapl_t *fa;
+ const H5FD_family_fapl_t *fa;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -319,18 +319,18 @@ done:
FUNC_LEAVE_API(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_fapl_get
+ * Function: H5FD__family_fapl_get
*
- * Purpose: Gets a file access property list which could be used to
- * create an identical file.
+ * Purpose: Gets a file access property list which could be used to
+ * create an identical file.
*
- * Return: Success: Ptr to new file access property list.
+ * Return: Success: Ptr to new file access property list.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 13, 1999
*
*-------------------------------------------------------------------------
@@ -338,8 +338,8 @@ done:
static void *
H5FD__family_fapl_get(H5FD_t *_file)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- H5FD_family_fapl_t *fa = NULL;
+ H5FD_family_t *file = (H5FD_family_t*)_file;
+ H5FD_family_fapl_t *fa = NULL;
H5P_genplist_t *plist; /* Property list pointer */
void *ret_value = NULL; /* Return value */
@@ -364,17 +364,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_fapl_copy
+ * Function: H5FD__family_fapl_copy
*
- * Purpose: Copies the family-specific file access properties.
+ * Purpose: Copies the family-specific file access properties.
*
- * Return: Success: Ptr to a new property list
+ * Return: Success: Ptr to a new property list
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -417,17 +417,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_fapl_free
+ * Function: H5FD__family_fapl_free
*
- * Purpose: Frees the family-specific file access properties.
+ * Purpose: Frees the family-specific file access properties.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -435,7 +435,7 @@ done:
static herr_t
H5FD__family_fapl_free(void *_fa)
{
- H5FD_family_fapl_t *fa = (H5FD_family_fapl_t*)_fa;
+ H5FD_family_fapl_t *fa = (H5FD_family_fapl_t*)_fa;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -448,18 +448,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_sb_size
+ * Function: H5FD__family_sb_size
*
- * Purpose: Returns the size of the private information to be stored in
- * the superblock.
+ * Purpose: Returns the size of the private information to be stored in
+ * the superblock.
*
- * Return: Success: The super block driver data size.
+ * Return: Success: The super block driver data size.
*
- * Failure: never fails
+ * Failure: never fails
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
*-------------------------------------------------------------------------
@@ -474,21 +474,21 @@ H5FD__family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
FUNC_LEAVE_NOAPI(8)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_sb_encode
+ * Function: H5FD__family_sb_encode
*
- * Purpose: Encode driver information for the superblock. The NAME
- * argument is a nine-byte buffer which will be initialized with
- * an eight-character name/version number and null termination.
+ * Purpose: Encode driver information for the superblock. The NAME
+ * argument is a nine-byte buffer which will be initialized with
+ * an eight-character name/version number and null termination.
*
- * The encoding is the member file size and name template.
+ * The encoding is the member file size and name template.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
*-------------------------------------------------------------------------
@@ -496,7 +496,7 @@ H5FD__family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
static herr_t
H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*/)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
+ H5FD_family_t *file = (H5FD_family_t*)_file;
FUNC_ENTER_STATIC_NOERR
@@ -517,21 +517,21 @@ H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD__family_sb_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_sb_decode
+ * Function: H5FD__family_sb_decode
*
- * Purpose: This function has 2 separate purpose. One is to decodes the
+ * Purpose: This function has 2 separate purpose. One is to decodes the
* superblock information for this driver. The NAME argument is
* the eight-character (plus null termination) name stored in i
* the file. The FILE argument is updated according to the
* information in the superblock.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
*-------------------------------------------------------------------------
@@ -539,7 +539,7 @@ H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out
static herr_t
H5FD__family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const unsigned char *buf)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
+ H5FD_family_t *file = (H5FD_family_t*)_file;
uint64_t msize;
herr_t ret_value = SUCCEED; /* Return value */
@@ -572,19 +572,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__family_sb_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_open
+ * Function: H5FD__family_open
*
- * Purpose: Creates and/or opens a family of files as an HDF5 file.
+ * Purpose: Creates and/or opens a family of files as an HDF5 file.
*
- * Return: Success: A pointer to a new file dat structure. The
- * public fields will be initialized by the
- * caller, which is always H5FD_open().
+ * Return: Success: A pointer to a new file dat structure. The
+ * public fields will be initialized by the
+ * caller, which is always H5FD_open().
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -595,16 +595,16 @@ done:
* memb_name & temp in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static H5FD_t *
H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr)
+ haddr_t maxaddr)
{
- H5FD_family_t *file = NULL;
- char *memb_name = NULL, *temp = NULL;
- hsize_t eof = HADDR_UNDEF;
- unsigned t_flags = flags & ~H5F_ACC_CREAT;
- H5FD_t *ret_value = NULL;
+ H5FD_family_t *file = NULL;
+ char *memb_name = NULL, *temp = NULL;
+ hsize_t eof = HADDR_UNDEF;
+ unsigned t_flags = flags & ~H5F_ACC_CREAT;
+ H5FD_t *ret_value = NULL;
FUNC_ENTER_STATIC
@@ -746,21 +746,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__family_open() */
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
+
-
/*-------------------------------------------------------------------------
- * Function: H5FD__family_close
+ * Function: H5FD__family_close
*
- * Purpose: Closes a family of files.
+ * Purpose: Closes a family of files.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative with as many members closed as
- * possible. The only subsequent operation
- * permitted on the file is a close operation.
+ * Failure: Negative with as many members closed as
+ * possible. The only subsequent operation
+ * permitted on the file is a close operation.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -769,8 +769,8 @@ static herr_t
H5FD__family_close(H5FD_t *_file)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
- unsigned nerrors = 0; /* Number of errors while closing member files */
- unsigned u; /* Local index variable */
+ unsigned nerrors = 0; /* Number of errors while closing member files */
+ unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -800,19 +800,19 @@ H5FD__family_close(H5FD_t *_file)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__family_close() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_cmp
+ * Function: H5FD__family_cmp
*
- * Purpose: Compares two file families to see if they are the same. It
- * does this by comparing the first member of the two families.
+ * Purpose: Compares two file families to see if they are the same. It
+ * does this by comparing the first member of the two families.
*
- * Return: Success: like strcmp()
+ * Return: Success: like strcmp()
*
- * Failure: never fails (arguments were checked by the
- * caller).
+ * Failure: never fails (arguments were checked by the
+ * caller).
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -820,8 +820,8 @@ H5FD__family_close(H5FD_t *_file)
static int
H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_family_t *f1 = (const H5FD_family_t*)_f1;
- const H5FD_family_t *f2 = (const H5FD_family_t*)_f2;
+ const H5FD_family_t *f1 = (const H5FD_family_t*)_f1;
+ const H5FD_family_t *f2 = (const H5FD_family_t*)_f2;
int ret_value = 0;
FUNC_ENTER_STATIC_NOERR
@@ -834,17 +834,17 @@ H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__family_cmp() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_query
+ * Function: H5FD__family_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 25, 2000
*
*-------------------------------------------------------------------------
@@ -852,7 +852,7 @@ H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
static herr_t
H5FD__family_query(const H5FD_t * _file, unsigned long *flags /* out */)
{
- const H5FD_family_t *file = (const H5FD_family_t*)_file; /* Family VFD info */
+ const H5FD_family_t *file = (const H5FD_family_t*)_file; /* Family VFD info */
FUNC_ENTER_STATIC_NOERR
@@ -872,19 +872,19 @@ H5FD__family_query(const H5FD_t * _file, unsigned long *flags /* out */)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD__family_query() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_get_eoa
+ * Function: H5FD__family_get_eoa
*
- * Purpose: Returns the end-of-address marker for the file. The EOA
- * marker is the first address past the last byte allocated in
- * the format address space.
+ * Purpose: Returns the end-of-address marker for the file. The EOA
+ * marker is the first address past the last byte allocated in
+ * the format address space.
*
- * Return: Success: The end-of-address-marker
+ * Return: Success: The end-of-address-marker
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -892,24 +892,24 @@ H5FD__family_query(const H5FD_t * _file, unsigned long *flags /* out */)
static haddr_t
H5FD__family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
- const H5FD_family_t *file = (const H5FD_family_t*)_file;
+ const H5FD_family_t *file = (const H5FD_family_t*)_file;
FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_set_eoa
+ * Function: H5FD__family_set_eoa
*
- * Purpose: Set the end-of-address marker for the file.
+ * Purpose: Set the end-of-address marker for the file.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -920,14 +920,14 @@ H5FD__family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
* memb_name in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static herr_t
H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- haddr_t addr = abs_eoa;
- char *memb_name = NULL;
- unsigned u; /* Local index variable */
+ H5FD_family_t *file = (H5FD_family_t*)_file;
+ haddr_t addr = abs_eoa;
+ char *memb_name = NULL;
+ unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -987,22 +987,22 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
+
-
/*-------------------------------------------------------------------------
- * Function: H5FD__family_get_eof
+ * Function: H5FD__family_get_eof
*
- * Purpose: Returns the end-of-file marker, which is the greater of
- * either the total family size or the current EOA marker.
+ * Purpose: Returns the end-of-file marker, which is the greater of
+ * either the total family size or the current EOA marker.
*
- * Return: Success: End of file address, the first address past
- * the end of the family of files or the current
- * EOA, whichever is larger.
+ * Return: Success: End of file address, the first address past
+ * the end of the family of files or the current
+ * EOA, whichever is larger.
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1010,9 +1010,9 @@ H5_GCC_DIAG_ON(format-nonliteral)
static haddr_t
H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
{
- const H5FD_family_t *file = (const H5FD_family_t*)_file;
- haddr_t eof=0;
- int i; /* Local index variable */
+ const H5FD_family_t *file = (const H5FD_family_t*)_file;
+ haddr_t eof=0;
+ int i; /* Local index variable */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -1045,7 +1045,7 @@ H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__family_get_handle
*
@@ -1085,34 +1085,34 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_read
+ * Function: H5FD__family_read
*
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero. Result is stored in caller-supplied
- * buffer BUF.
+ * Return: Success: Zero. Result is stored in caller-supplied
+ * buffer BUF.
*
- * Failure: -1, contents of buffer BUF are undefined.
+ * Failure: -1, contents of buffer BUF are undefined.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
- void *_buf/*out*/)
+ void *_buf/*out*/)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- unsigned char *buf = (unsigned char*)_buf;
- haddr_t sub;
- size_t req;
+ H5FD_family_t *file = (H5FD_family_t*)_file;
+ unsigned char *buf = (unsigned char*)_buf;
+ haddr_t sub;
+ size_t req;
hsize_t tempreq;
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
@@ -1131,12 +1131,12 @@ H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s
sub = addr % file->memb_size;
- /* This check is for mainly for IA32 architecture whose size_t's size
- * is 4 bytes, to prevent overflow when user application is trying to
- * write files bigger than 4GB. */
+ /* This check is for mainly for IA32 architecture whose size_t's size
+ * is 4 bytes, to prevent overflow when user application is trying to
+ * write files bigger than 4GB. */
tempreq = file->memb_size-sub;
- if(tempreq > SIZET_MAX)
- tempreq = SIZET_MAX;
+ if(tempreq > SIZET_MAX)
+ tempreq = SIZET_MAX;
req = MIN(size, (size_t)tempreq);
HDassert(u<file->nmembs);
@@ -1153,33 +1153,33 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_write
+ * Function: H5FD__family_write
*
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
+ * from buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero
+ * Return: Success: Zero
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
- const void *_buf)
+ const void *_buf)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- const unsigned char *buf = (const unsigned char*)_buf;
- haddr_t sub;
- size_t req;
+ H5FD_family_t *file = (H5FD_family_t*)_file;
+ const unsigned char *buf = (const unsigned char*)_buf;
+ haddr_t sub;
+ size_t req;
hsize_t tempreq;
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1202,8 +1202,8 @@ H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
* is 4 bytes, to prevent overflow when user application is trying to
* write files bigger than 4GB. */
tempreq = file->memb_size-sub;
- if(tempreq > SIZET_MAX)
- tempreq = SIZET_MAX;
+ if(tempreq > SIZET_MAX)
+ tempreq = SIZET_MAX;
req = MIN(size, (size_t)tempreq);
HDassert(u<file->nmembs);
@@ -1220,16 +1220,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_flush
+ * Function: H5FD__family_flush
*
- * Purpose: Flushes all family members.
+ * Purpose: Flushes all family members.
*
- * Return: Success: 0
- * Failure: -1, as many files flushed as possible.
+ * Return: Success: 0
+ * Failure: -1, as many files flushed as possible.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1237,8 +1237,8 @@ done:
static herr_t
H5FD__family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- unsigned u, nerrors = 0;
+ H5FD_family_t *file = (H5FD_family_t*)_file;
+ unsigned u, nerrors = 0;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1254,17 +1254,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__family_flush() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_truncate
+ * Function: H5FD__family_truncate
*
- * Purpose: Truncates all family members.
+ * Purpose: Truncates all family members.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1, as many files truncated as possible.
+ * Failure: -1, as many files truncated as possible.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, February 23, 2008
*
*-------------------------------------------------------------------------
@@ -1272,9 +1272,9 @@ done:
static herr_t
H5FD__family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- unsigned u, nerrors = 0;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_family_t *file = (H5FD_family_t*)_file;
+ unsigned u, nerrors = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1289,7 +1289,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__family_truncate() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__family_lock
*
@@ -1309,7 +1309,7 @@ H5FD__family_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */
unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1337,7 +1337,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__family_lock() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__family_unlock
*
@@ -1352,8 +1352,8 @@ done:
static herr_t
H5FD__family_unlock(H5FD_t *_file)
{
- H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */
- unsigned u; /* Local index variable */
+ H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */
+ unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index d183511..bb26451 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -12,15 +12,15 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke
- * Monday, November 10, 1997
- *
- * Purpose: Implements a file driver which dispatches I/O requests to
- * other file drivers depending on the purpose of the address
- * region being accessed. For instance, all meta-data could be
- * place in one file while all raw data goes to some other file.
- * This also serves as an example of coding a complex file driver,
- * therefore, it should not use any non-public definitions.
+ * Programmer: Robb Matzke
+ * Monday, November 10, 1997
+ *
+ * Purpose: Implements a file driver which dispatches I/O requests to
+ * other file drivers depending on the purpose of the address
+ * region being accessed. For instance, all meta-data could be
+ * place in one file while all raw data goes to some other file.
+ * This also serves as an example of coding a complex file driver,
+ * therefore, it should not use any non-public definitions.
*/
#include <assert.h>
#include <stdlib.h>
@@ -30,23 +30,23 @@
#ifndef FALSE
-#define FALSE 0
+#define FALSE 0
#endif
#ifndef TRUE
-#define TRUE 1
+#define TRUE 1
#endif
/* Loop through all mapped files */
-#define UNIQUE_MEMBERS_CORE(MAP, ITER, SEEN, LOOPVAR) { \
- H5FD_mem_t ITER, LOOPVAR; \
- unsigned SEEN[H5FD_MEM_NTYPES]; \
- \
- memset(SEEN, 0, sizeof SEEN); \
+#define UNIQUE_MEMBERS_CORE(MAP, ITER, SEEN, LOOPVAR) { \
+ H5FD_mem_t ITER, LOOPVAR; \
+ unsigned SEEN[H5FD_MEM_NTYPES]; \
+ \
+ memset(SEEN, 0, sizeof SEEN); \
for (ITER=H5FD_MEM_SUPER; ITER<H5FD_MEM_NTYPES; ITER=(H5FD_mem_t)(ITER+1)) { \
- LOOPVAR = MAP[ITER]; \
- if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=ITER; \
- assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \
- if (SEEN[LOOPVAR]++) continue; \
+ LOOPVAR = MAP[ITER]; \
+ if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=ITER; \
+ assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \
+ if (SEEN[LOOPVAR]++) continue; \
/* Need two front-ends, since they are nested sometimes */
#define UNIQUE_MEMBERS(MAP, LOOPVAR) \
@@ -54,12 +54,12 @@
#define UNIQUE_MEMBERS2(MAP, LOOPVAR) \
UNIQUE_MEMBERS_CORE(MAP, _unmapped2, _seen2, LOOPVAR)
-#define ALL_MEMBERS(LOOPVAR) { \
- H5FD_mem_t LOOPVAR; \
+#define ALL_MEMBERS(LOOPVAR) { \
+ H5FD_mem_t LOOPVAR; \
for (LOOPVAR=H5FD_MEM_DEFAULT; LOOPVAR<H5FD_MEM_NTYPES; LOOPVAR=(H5FD_mem_t)(LOOPVAR+1)) {
-#define END_MEMBERS }}
+#define END_MEMBERS }}
#define H5FD_MULT_MAX_FILE_NAME_LEN 1024
@@ -72,7 +72,7 @@ typedef struct H5FD_multi_fapl_t {
hid_t memb_fapl[H5FD_MEM_NTYPES]; /*member access properties */
char *memb_name[H5FD_MEM_NTYPES]; /*name generators */
haddr_t memb_addr[H5FD_MEM_NTYPES]; /*starting addr per member */
- hbool_t relax; /*less stringent error checking */
+ hbool_t relax; /*less stringent error checking */
} H5FD_multi_fapl_t;
/*
@@ -97,7 +97,7 @@ typedef struct H5FD_multi_t {
/* Driver specific data transfer properties */
typedef struct H5FD_multi_dxpl_t {
- hid_t memb_dxpl[H5FD_MEM_NTYPES];/*member data xfer properties*/
+ hid_t memb_dxpl[H5FD_MEM_NTYPES];/*member data xfer properties*/
} H5FD_multi_dxpl_t;
/* Private functions */
@@ -109,14 +109,14 @@ static int open_members(H5FD_multi_t *file);
static herr_t H5FD_multi_term(void);
static hsize_t H5FD_multi_sb_size(H5FD_t *file);
static herr_t H5FD_multi_sb_encode(H5FD_t *file, char *name/*out*/,
- unsigned char *buf/*out*/);
+ unsigned char *buf/*out*/);
static herr_t H5FD_multi_sb_decode(H5FD_t *file, const char *name,
- const unsigned char *buf);
+ const unsigned char *buf);
static void *H5FD_multi_fapl_get(H5FD_t *file);
static void *H5FD_multi_fapl_copy(const void *_old_fa);
static herr_t H5FD_multi_fapl_free(void *_fa);
static H5FD_t *H5FD_multi_open(const char *name, unsigned flags,
- hid_t fapl_id, haddr_t maxaddr);
+ hid_t fapl_id, haddr_t maxaddr);
static herr_t H5FD_multi_close(H5FD_t *_file);
static int H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_multi_query(const H5FD_t *_f1, unsigned long *flags);
@@ -127,11 +127,11 @@ static haddr_t H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static haddr_t H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
static herr_t H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- hsize_t size);
+ hsize_t size);
static herr_t H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, void *_buf/*out*/);
+ size_t size, void *_buf/*out*/);
static herr_t H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, const void *_buf);
+ size_t size, const void *_buf);
static herr_t H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD_multi_lock(H5FD_t *_file, hbool_t rw);
@@ -139,51 +139,51 @@ static herr_t H5FD_multi_unlock(H5FD_t *_file);
/* The class struct */
static const H5FD_class_t H5FD_multi_g = {
- "multi", /*name */
- HADDR_MAX, /*maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
+ "multi", /*name */
+ HADDR_MAX, /*maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
H5FD_multi_term, /*terminate */
- H5FD_multi_sb_size, /*sb_size */
- H5FD_multi_sb_encode, /*sb_encode */
- H5FD_multi_sb_decode, /*sb_decode */
- sizeof(H5FD_multi_fapl_t), /*fapl_size */
- H5FD_multi_fapl_get, /*fapl_get */
- H5FD_multi_fapl_copy, /*fapl_copy */
- H5FD_multi_fapl_free, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_multi_open, /*open */
- H5FD_multi_close, /*close */
- H5FD_multi_cmp, /*cmp */
- H5FD_multi_query, /*query */
- H5FD_multi_get_type_map, /*get_type_map */
- H5FD_multi_alloc, /*alloc */
- H5FD_multi_free, /*free */
- H5FD_multi_get_eoa, /*get_eoa */
- H5FD_multi_set_eoa, /*set_eoa */
- H5FD_multi_get_eof, /*get_eof */
+ H5FD_multi_sb_size, /*sb_size */
+ H5FD_multi_sb_encode, /*sb_encode */
+ H5FD_multi_sb_decode, /*sb_decode */
+ sizeof(H5FD_multi_fapl_t), /*fapl_size */
+ H5FD_multi_fapl_get, /*fapl_get */
+ H5FD_multi_fapl_copy, /*fapl_copy */
+ H5FD_multi_fapl_free, /*fapl_free */
+ 0, /*dxpl_size */
+ NULL, /*dxpl_copy */
+ NULL, /*dxpl_free */
+ H5FD_multi_open, /*open */
+ H5FD_multi_close, /*close */
+ H5FD_multi_cmp, /*cmp */
+ H5FD_multi_query, /*query */
+ H5FD_multi_get_type_map, /*get_type_map */
+ H5FD_multi_alloc, /*alloc */
+ H5FD_multi_free, /*free */
+ H5FD_multi_get_eoa, /*get_eoa */
+ H5FD_multi_set_eoa, /*set_eoa */
+ H5FD_multi_get_eof, /*get_eof */
H5FD_multi_get_handle, /*get_handle */
- H5FD_multi_read, /*read */
- H5FD_multi_write, /*write */
- H5FD_multi_flush, /*flush */
- H5FD_multi_truncate, /*truncate */
+ H5FD_multi_read, /*read */
+ H5FD_multi_write, /*write */
+ H5FD_multi_flush, /*flush */
+ H5FD_multi_truncate, /*truncate */
H5FD_multi_lock, /*lock */
H5FD_multi_unlock, /*unlock */
- H5FD_FLMAP_DEFAULT /*fl_map */
+ H5FD_FLMAP_DEFAULT /*fl_map */
};
-
+
/*-------------------------------------------------------------------------
- * Function: my_strdup
+ * Function: my_strdup
*
- * Purpose: Private version of strdup()
+ * Purpose: Private version of strdup()
*
- * Return: Success: Ptr to new copy of string
+ * Return: Success: Ptr to new copy of string
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 13, 1999
*
*-------------------------------------------------------------------------
@@ -204,7 +204,7 @@ my_strdup(const char *s)
return x;
}
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_multi_init
*
@@ -231,11 +231,11 @@ H5FD_multi_init(void)
return H5FD_MULTI_g;
} /* end H5FD_multi_init() */
-
+
/*---------------------------------------------------------------------------
- * Function: H5FD_multi_term
+ * Function: H5FD_multi_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
* Returns: Non-negative on success or negative on failure
*
@@ -253,33 +253,33 @@ H5FD_multi_term(void)
return 0;
} /* end H5FD_multi_term() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_split
+ * Function: H5Pset_fapl_split
*
- * Purpose: Compatibility function. Makes the multi driver act like the
- * old split driver which stored meta data in one file and raw
- * data in another file.
+ * Purpose: Compatibility function. Makes the multi driver act like the
+ * old split driver which stored meta data in one file and raw
+ * data in another file.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 11, 1999
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
- const char *raw_ext, hid_t raw_plist_id)
+ const char *raw_ext, hid_t raw_plist_id)
{
- H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
- hid_t memb_fapl[H5FD_MEM_NTYPES];
- const char *memb_name[H5FD_MEM_NTYPES];
- char meta_name[H5FD_MULT_MAX_FILE_NAME_LEN];
- char raw_name[H5FD_MULT_MAX_FILE_NAME_LEN];
- haddr_t memb_addr[H5FD_MEM_NTYPES];
+ H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
+ hid_t memb_fapl[H5FD_MEM_NTYPES];
+ const char *memb_name[H5FD_MEM_NTYPES];
+ char meta_name[H5FD_MULT_MAX_FILE_NAME_LEN];
+ char raw_name[H5FD_MULT_MAX_FILE_NAME_LEN];
+ haddr_t memb_addr[H5FD_MEM_NTYPES];
/*NO TRACE*/
@@ -288,11 +288,11 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
/* Initialize */
ALL_MEMBERS(mt) {
- /* Treat global heap as raw data, not metadata */
- memb_map[mt] = ((mt == H5FD_MEM_DRAW || mt == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : H5FD_MEM_SUPER);
- memb_fapl[mt] = -1;
- memb_name[mt] = NULL;
- memb_addr[mt] = HADDR_UNDEF;
+ /* Treat global heap as raw data, not metadata */
+ memb_map[mt] = ((mt == H5FD_MEM_DRAW || mt == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : H5FD_MEM_SUPER);
+ memb_fapl[mt] = -1;
+ memb_name[mt] = NULL;
+ memb_addr[mt] = HADDR_UNDEF;
} END_MEMBERS;
/* The file access properties */
@@ -302,36 +302,36 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
/* The names */
/* process meta filename */
if(meta_ext) {
- if(strstr(meta_ext, "%s")) {
+ if(strstr(meta_ext, "%s")) {
/* Note: this doesn't accommodate for when the '%s' in the user's
* string is at a position >sizeof(meta_name) - QK & JK - 2013/01/17
*/
- strncpy(meta_name, meta_ext, sizeof(meta_name));
+ strncpy(meta_name, meta_ext, sizeof(meta_name));
meta_name[sizeof(meta_name) - 1] = '\0';
}
- else
- sprintf(meta_name, "%%s%s", meta_ext);
+ else
+ sprintf(meta_name, "%%s%s", meta_ext);
}
else {
- strncpy(meta_name, "%s.meta", sizeof(meta_name));
+ strncpy(meta_name, "%s.meta", sizeof(meta_name));
meta_name[sizeof(meta_name) - 1] = '\0';
}
memb_name[H5FD_MEM_SUPER] = meta_name;
/* process raw filename */
if(raw_ext) {
- if(strstr(raw_ext, "%s")) {
+ if(strstr(raw_ext, "%s")) {
/* Note: this doesn't accommodate for when the '%s' in the user's
* string is at a position >sizeof(raw_name) - QK & JK - 2013/01/17
*/
- strncpy(raw_name, raw_ext, sizeof(raw_name));
+ strncpy(raw_name, raw_ext, sizeof(raw_name));
raw_name[sizeof(raw_name) - 1] = '\0';
}
- else
- sprintf(raw_name, "%%s%s", raw_ext);
+ else
+ sprintf(raw_name, "%%s%s", raw_ext);
}
else {
- strncpy(raw_name, "%s.raw", sizeof(raw_name));
+ strncpy(raw_name, "%s.raw", sizeof(raw_name));
raw_name[sizeof(raw_name) - 1] = '\0';
}
memb_name[H5FD_MEM_DRAW] = raw_name;
@@ -343,96 +343,96 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
return H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_multi
+ * Function: H5Pset_fapl_multi
*
- * Purpose: Sets the file access property list FAPL_ID to use the multi
- * driver. The MEMB_MAP array maps memory usage types to other
- * memory usage types and is the mechanism which allows the
- * caller to specify how many files are created. The array
- * contains H5FD_MEM_NTYPES entries which are either the value
- * H5FD_MEM_DEFAULT or a memory usage type and the number of
- * unique values determines the number of files which are
- * opened. For each memory usage type which will be associated
- * with a file the MEMB_FAPL array should have a property list
- * and the MEMB_NAME array should be a name generator (a
- * printf-style format with a %s which will be replaced with the
- * name passed to H5FDopen(), usually from H5Fcreate() or
- * H5Fopen()).
+ * Purpose: Sets the file access property list FAPL_ID to use the multi
+ * driver. The MEMB_MAP array maps memory usage types to other
+ * memory usage types and is the mechanism which allows the
+ * caller to specify how many files are created. The array
+ * contains H5FD_MEM_NTYPES entries which are either the value
+ * H5FD_MEM_DEFAULT or a memory usage type and the number of
+ * unique values determines the number of files which are
+ * opened. For each memory usage type which will be associated
+ * with a file the MEMB_FAPL array should have a property list
+ * and the MEMB_NAME array should be a name generator (a
+ * printf-style format with a %s which will be replaced with the
+ * name passed to H5FDopen(), usually from H5Fcreate() or
+ * H5Fopen()).
*
- * If RELAX is set then opening an existing file for read-only
- * access will not fail if some file members are missing. This
- * allows a file to be accessed in a limited sense if just the
- * meta data is available.
+ * If RELAX is set then opening an existing file for read-only
+ * access will not fail if some file members are missing. This
+ * allows a file to be accessed in a limited sense if just the
+ * meta data is available.
*
- * Defaults: Default values for each of the optional arguments are:
+ * Defaults: Default values for each of the optional arguments are:
*
- * memb_map: The default member map has the value
- * H5FD_MEM_DEFAULT for each element.
+ * memb_map: The default member map has the value
+ * H5FD_MEM_DEFAULT for each element.
*
- * memb_fapl: The value H5P_DEFAULT for each element.
+ * memb_fapl: The value H5P_DEFAULT for each element.
*
- * memb_name: The string `%s-X.h5' where `X' is one of the
- * letters `s' (H5FD_MEM_SUPER),
- * `b' (H5FD_MEM_BTREE), `r' (H5FD_MEM_DRAW),
- * `g' (H5FD_MEM_GHEAP), 'l' (H5FD_MEM_LHEAP),
- * `o' (H5FD_MEM_OHDR).
+ * memb_name: The string `%s-X.h5' where `X' is one of the
+ * letters `s' (H5FD_MEM_SUPER),
+ * `b' (H5FD_MEM_BTREE), `r' (H5FD_MEM_DRAW),
+ * `g' (H5FD_MEM_GHEAP), 'l' (H5FD_MEM_LHEAP),
+ * `o' (H5FD_MEM_OHDR).
*
- * memb_addr: The value HADDR_UNDEF for each element.
+ * memb_addr: The value HADDR_UNDEF for each element.
*
*
- * Example: To set up a multi file access property list which partitions
- * data into meta and raw files each being 1/2 of the address
- * space one would say:
+ * Example: To set up a multi file access property list which partitions
+ * data into meta and raw files each being 1/2 of the address
+ * space one would say:
*
- * H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES];
- * hid_t memb_fapl[H5FD_MEM_NTYPES];
- * const char *memb[H5FD_MEM_NTYPES];
- * haddr_t memb_addr[H5FD_MEM_NTYPES];
+ * H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES];
+ * hid_t memb_fapl[H5FD_MEM_NTYPES];
+ * const char *memb[H5FD_MEM_NTYPES];
+ * haddr_t memb_addr[H5FD_MEM_NTYPES];
*
- * // The mapping...
- * for (mt=0; mt<H5FD_MEM_NTYPES; mt++) {
- * memb_map[mt] = H5FD_MEM_SUPER;
- * }
- * memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW;
+ * // The mapping...
+ * for (mt=0; mt<H5FD_MEM_NTYPES; mt++) {
+ * memb_map[mt] = H5FD_MEM_SUPER;
+ * }
+ * memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW;
*
- * // Member information
- * memb_fapl[H5FD_MEM_SUPER] = H5P_DEFAULT;
- * memb_name[H5FD_MEM_SUPER] = "%s.meta";
- * memb_addr[H5FD_MEM_SUPER] = 0;
+ * // Member information
+ * memb_fapl[H5FD_MEM_SUPER] = H5P_DEFAULT;
+ * memb_name[H5FD_MEM_SUPER] = "%s.meta";
+ * memb_addr[H5FD_MEM_SUPER] = 0;
*
- * memb_fapl[H5FD_MEM_DRAW] = H5P_DEFAULT;
- * memb_name[H5FD_MEM_DRAW] = "%s.raw";
- * memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/2;
+ * memb_fapl[H5FD_MEM_DRAW] = H5P_DEFAULT;
+ * memb_name[H5FD_MEM_DRAW] = "%s.raw";
+ * memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/2;
*
- * hid_t fapl = H5Pcreate(H5P_FILE_ACCESS);
- * H5Pset_fapl_multi(fapl, memb_map, memb_fapl,
- * memb_name, memb_addr, TRUE);
+ * hid_t fapl = H5Pcreate(H5P_FILE_ACCESS);
+ * H5Pset_fapl_multi(fapl, memb_map, memb_fapl,
+ * memb_name, memb_addr, TRUE);
*
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
- const hid_t *memb_fapl, const char * const *memb_name,
- const haddr_t *memb_addr, hbool_t relax)
+ const hid_t *memb_fapl, const char * const *memb_name,
+ const haddr_t *memb_addr, hbool_t relax)
{
- H5FD_multi_fapl_t fa;
- H5FD_mem_t mt, mmt;
- H5FD_mem_t _memb_map[H5FD_MEM_NTYPES];
- hid_t _memb_fapl[H5FD_MEM_NTYPES];
- char _memb_name[H5FD_MEM_NTYPES][16];
- const char *_memb_name_ptrs[H5FD_MEM_NTYPES];
- haddr_t _memb_addr[H5FD_MEM_NTYPES];
- static const char *letters = "Xsbrglo";
+ H5FD_multi_fapl_t fa;
+ H5FD_mem_t mt, mmt;
+ H5FD_mem_t _memb_map[H5FD_MEM_NTYPES];
+ hid_t _memb_fapl[H5FD_MEM_NTYPES];
+ char _memb_name[H5FD_MEM_NTYPES][16];
+ const char *_memb_name_ptrs[H5FD_MEM_NTYPES];
+ haddr_t _memb_addr[H5FD_MEM_NTYPES];
+ static const char *letters = "Xsbrglo";
static const char *func="H5FDset_fapl_multi"; /* Function Name for error reporting */
/*NO TRACE*/
@@ -445,45 +445,45 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "not an access list", -1)
if (!memb_map) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
- _memb_map[mt] = H5FD_MEM_DEFAULT;
- memb_map = _memb_map;
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
+ _memb_map[mt] = H5FD_MEM_DEFAULT;
+ memb_map = _memb_map;
}
if (!memb_fapl) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
- _memb_fapl[mt] = H5Pcreate(H5P_FILE_ACCESS);
- memb_fapl = _memb_fapl;
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
+ _memb_fapl[mt] = H5Pcreate(H5P_FILE_ACCESS);
+ memb_fapl = _memb_fapl;
}
if (!memb_name) {
- assert(strlen(letters)==H5FD_MEM_NTYPES);
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- sprintf(_memb_name[mt], "%%s-%c.h5", letters[mt]);
- _memb_name_ptrs[mt] = _memb_name[mt];
- }
- memb_name = _memb_name_ptrs;
+ assert(strlen(letters)==H5FD_MEM_NTYPES);
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
+ sprintf(_memb_name[mt], "%%s-%c.h5", letters[mt]);
+ _memb_name_ptrs[mt] = _memb_name[mt];
+ }
+ memb_name = _memb_name_ptrs;
}
if (!memb_addr) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
- _memb_addr[mt] = (hsize_t)(mt ? (mt - 1) : 0) * (HADDR_MAX / (H5FD_MEM_NTYPES-1));
- memb_addr = _memb_addr;
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
+ _memb_addr[mt] = (hsize_t)(mt ? (mt - 1) : 0) * (HADDR_MAX / (H5FD_MEM_NTYPES-1));
+ memb_addr = _memb_addr;
}
for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- /* Map usage type */
- mmt = memb_map[mt];
- if (mmt<0 || mmt>=H5FD_MEM_NTYPES)
+ /* Map usage type */
+ mmt = memb_map[mt];
+ if (mmt<0 || mmt>=H5FD_MEM_NTYPES)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADRANGE, "file resource type out of range", -1)
- if (H5FD_MEM_DEFAULT==mmt) mmt = mt;
+ if (H5FD_MEM_DEFAULT==mmt) mmt = mt;
- /*
- * All members of MEMB_FAPL must be either defaults or actual file
- * access property lists.
- */
- if (H5P_DEFAULT!=memb_fapl[mmt] && TRUE!=H5Pisa_class(memb_fapl[mmt], H5P_FILE_ACCESS))
+ /*
+ * All members of MEMB_FAPL must be either defaults or actual file
+ * access property lists.
+ */
+ if (H5P_DEFAULT!=memb_fapl[mmt] && TRUE!=H5Pisa_class(memb_fapl[mmt], H5P_FILE_ACCESS))
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type incorrect", -1)
- /* All names must be defined */
- if (!memb_name[mmt] || !memb_name[mmt][0])
+ /* All names must be defined */
+ if (!memb_name[mmt] || !memb_name[mmt][0])
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type not set", -1)
}
@@ -506,30 +506,30 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
return H5Pset_driver(fapl_id, H5FD_MULTI, &fa);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pget_fapl_multi
+ * Function: H5Pget_fapl_multi
*
- * Purpose: Returns information about the multi file access property
- * list though the function arguments which are the same as for
- * H5Pset_fapl_multi() above.
+ * Purpose: Returns information about the multi file access property
+ * list though the function arguments which are the same as for
+ * H5Pset_fapl_multi() above.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
- hid_t *memb_fapl/*out*/, char **memb_name/*out*/,
- haddr_t *memb_addr/*out*/, hbool_t *relax)
+ hid_t *memb_fapl/*out*/, char **memb_name/*out*/,
+ haddr_t *memb_addr/*out*/, hbool_t *relax)
{
const H5FD_multi_fapl_t *fa;
- H5FD_mem_t mt;
+ H5FD_mem_t mt;
static const char *func="H5FDget_fapl_multi"; /* Function Name for error reporting */
/*NO TRACE*/
@@ -548,41 +548,41 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
if (memb_map)
memcpy(memb_map, fa->memb_map, H5FD_MEM_NTYPES*sizeof(H5FD_mem_t));
if (memb_fapl) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- if (fa->memb_fapl[mt]>=0)
- memb_fapl[mt] = H5Pcopy(fa->memb_fapl[mt]);
- else
- memb_fapl[mt] = fa->memb_fapl[mt]; /*default or bad ID*/
- }
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
+ if (fa->memb_fapl[mt]>=0)
+ memb_fapl[mt] = H5Pcopy(fa->memb_fapl[mt]);
+ else
+ memb_fapl[mt] = fa->memb_fapl[mt]; /*default or bad ID*/
+ }
}
if(memb_name) {
- for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- if(fa->memb_name[mt])
- memb_name[mt] = my_strdup(fa->memb_name[mt]);
- else
- memb_name[mt] = NULL;
- }
+ for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
+ if(fa->memb_name[mt])
+ memb_name[mt] = my_strdup(fa->memb_name[mt]);
+ else
+ memb_name[mt] = NULL;
+ }
}
if (memb_addr)
- memcpy(memb_addr, fa->memb_addr, H5FD_MEM_NTYPES*sizeof(haddr_t));
+ memcpy(memb_addr, fa->memb_addr, H5FD_MEM_NTYPES*sizeof(haddr_t));
if (relax)
- *relax = fa->relax;
+ *relax = fa->relax;
return 0;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_sb_size
+ * Function: H5FD_multi_sb_size
*
- * Purpose: Returns the size of the private information to be stored in
- * the superblock.
+ * Purpose: Returns the size of the private information to be stored in
+ * the superblock.
*
- * Return: Success: The super block driver data size.
+ * Return: Success: The super block driver data size.
*
- * Failure: never fails
+ * Failure: never fails
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 16, 1999
*
*-------------------------------------------------------------------------
@@ -590,16 +590,16 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
static hsize_t
H5FD_multi_sb_size(H5FD_t *_file)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- unsigned nseen = 0;
- hsize_t nbytes = 8; /*size of header*/
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ unsigned nseen = 0;
+ hsize_t nbytes = 8; /*size of header*/
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
/* How many unique files? */
UNIQUE_MEMBERS(file->fa.memb_map, mt) {
- nseen++;
+ nseen++;
} END_MEMBERS;
/* Addresses and EOA markers */
@@ -614,40 +614,40 @@ H5FD_multi_sb_size(H5FD_t *_file)
return nbytes;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_sb_encode
+ * Function: H5FD_multi_sb_encode
*
- * Purpose: Encode driver information for the superblock. The NAME
- * argument is a nine-byte buffer which will be initialized with
- * an eight-character name/version number and null termination.
+ * Purpose: Encode driver information for the superblock. The NAME
+ * argument is a nine-byte buffer which will be initialized with
+ * an eight-character name/version number and null termination.
*
- * The encoding is a six-byte member mapping followed two bytes
- * which are unused. For each unique file in usage-type order
- * encode all the starting addresses as unsigned 64-bit integers,
- * then all the EOA values as unsigned 64-bit integers, then all
- * the template names as null terminated strings which are
- * multiples of 8 characters.
+ * The encoding is a six-byte member mapping followed two bytes
+ * which are unused. For each unique file in usage-type order
+ * encode all the starting addresses as unsigned 64-bit integers,
+ * then all the EOA values as unsigned 64-bit integers, then all
+ * the template names as null terminated strings which are
+ * multiples of 8 characters.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 16, 1999
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/,
- unsigned char *buf/*out*/)
+ unsigned char *buf/*out*/)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- haddr_t memb_eoa;
- unsigned char *p;
- size_t nseen;
- size_t i;
- H5FD_mem_t m;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ haddr_t memb_eoa;
+ unsigned char *p;
+ size_t nseen;
+ size_t i;
+ H5FD_mem_t m;
static const char *func="H5FD_multi_sb_encode"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -698,23 +698,23 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/,
return 0;
} /* end H5FD_multi_sb_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_sb_decode
+ * Function: H5FD_multi_sb_decode
*
- * Purpose: Decodes the superblock information for this driver. The NAME
- * argument is the eight-character (plus null termination) name
- * stored in the file.
+ * Purpose: Decodes the superblock information for this driver. The NAME
+ * argument is the eight-character (plus null termination) name
+ * stored in the file.
*
- * The FILE argument is updated according to the information in
- * the superblock. This may mean that some member files are
- * closed and others are opened.
+ * The FILE argument is updated according to the information in
+ * the superblock. This may mean that some member files are
+ * closed and others are opened.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 16, 1999
*
*-------------------------------------------------------------------------
@@ -722,17 +722,17 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/,
static herr_t
H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- char x[2*H5FD_MEM_NTYPES*8];
- H5FD_mem_t map[H5FD_MEM_NTYPES];
- int i;
- size_t nseen=0;
- hbool_t map_changed=FALSE;
- hbool_t in_use[H5FD_MEM_NTYPES];
- const char *memb_name[H5FD_MEM_NTYPES];
- haddr_t memb_addr[H5FD_MEM_NTYPES];
- haddr_t memb_eoa[H5FD_MEM_NTYPES];
- haddr_t *ap;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ char x[2*H5FD_MEM_NTYPES*8];
+ H5FD_mem_t map[H5FD_MEM_NTYPES];
+ int i;
+ size_t nseen=0;
+ hbool_t map_changed=FALSE;
+ hbool_t in_use[H5FD_MEM_NTYPES];
+ const char *memb_name[H5FD_MEM_NTYPES];
+ haddr_t memb_addr[H5FD_MEM_NTYPES];
+ haddr_t memb_eoa[H5FD_MEM_NTYPES];
+ haddr_t *ap;
static const char *func="H5FD_multi_sb_decode"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -839,20 +839,20 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
return 0;
} /* end H5FD_multi_sb_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_fapl_get
+ * Function: H5FD_multi_fapl_get
*
- * Purpose: Returns a file access property list which indicates how the
- * specified file is being accessed. The return list could be
- * used to access another file the same way.
+ * Purpose: Returns a file access property list which indicates how the
+ * specified file is being accessed. The return list could be
+ * used to access another file the same way.
*
- * Return: Success: Ptr to new file access property list with all
- * members copied from the file struct.
+ * Return: Success: Ptr to new file access property list with all
+ * members copied from the file struct.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 13, 1999
*
*-------------------------------------------------------------------------
@@ -860,7 +860,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
static void *
H5FD_multi_fapl_get(H5FD_t *_file)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -868,17 +868,17 @@ H5FD_multi_fapl_get(H5FD_t *_file)
return H5FD_multi_fapl_copy(&(file->fa));
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_fapl_copy
+ * Function: H5FD_multi_fapl_copy
*
- * Purpose: Copies the multi-specific file access properties.
+ * Purpose: Copies the multi-specific file access properties.
*
- * Return: Success: Ptr to a new property list
+ * Return: Success: Ptr to a new property list
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -898,20 +898,20 @@ H5FD_multi_fapl_copy(const void *_old_fa)
memcpy(new_fa, old_fa, sizeof(H5FD_multi_fapl_t));
ALL_MEMBERS(mt) {
- if (old_fa->memb_fapl[mt]>=0) {
- if (H5Iinc_ref(old_fa->memb_fapl[mt]) < 0) {
+ if (old_fa->memb_fapl[mt]>=0) {
+ if (H5Iinc_ref(old_fa->memb_fapl[mt]) < 0) {
nerrors++;
break;
}
- new_fa->memb_fapl[mt] = old_fa->memb_fapl[mt];
- }
- if (old_fa->memb_name[mt]) {
- new_fa->memb_name[mt] = my_strdup(old_fa->memb_name[mt]);
+ new_fa->memb_fapl[mt] = old_fa->memb_fapl[mt];
+ }
+ if (old_fa->memb_name[mt]) {
+ new_fa->memb_name[mt] = my_strdup(old_fa->memb_name[mt]);
if (NULL == new_fa->memb_name[mt]) {
nerrors++;
break;
}
- }
+ }
} END_MEMBERS;
if (nerrors) {
@@ -927,17 +927,17 @@ H5FD_multi_fapl_copy(const void *_old_fa)
return new_fa;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_fapl_free
+ * Function: H5FD_multi_fapl_free
*
- * Purpose: Frees the multi-specific file access properties.
+ * Purpose: Frees the multi-specific file access properties.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -945,17 +945,17 @@ H5FD_multi_fapl_copy(const void *_old_fa)
static herr_t
H5FD_multi_fapl_free(void *_fa)
{
- H5FD_multi_fapl_t *fa = (H5FD_multi_fapl_t*)_fa;
+ H5FD_multi_fapl_t *fa = (H5FD_multi_fapl_t*)_fa;
static const char *func="H5FD_multi_fapl_free"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
ALL_MEMBERS(mt) {
- if (fa->memb_fapl[mt]>=0)
+ if (fa->memb_fapl[mt]>=0)
if(H5Idec_ref(fa->memb_fapl[mt])<0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTCLOSEOBJ, "can't close property list", -1)
- if (fa->memb_name[mt])
+ if (fa->memb_name[mt])
free(fa->memb_name[mt]);
} END_MEMBERS;
free(fa);
@@ -963,19 +963,19 @@ H5FD_multi_fapl_free(void *_fa)
return 0;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_open
+ * Function: H5FD_multi_open
*
- * Purpose: Creates and/or opens a multi HDF5 file.
+ * Purpose: Creates and/or opens a multi HDF5 file.
*
- * Return: Success: A pointer to a new file data structure. The
- * public fields will be initialized by the
- * caller, which is always H5FD_open().
+ * Return: Success: A pointer to a new file data structure. The
+ * public fields will be initialized by the
+ * caller, which is always H5FD_open().
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -983,10 +983,10 @@ H5FD_multi_fapl_free(void *_fa)
static H5FD_t *
H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- H5FD_multi_t *file=NULL;
- hid_t close_fapl=-1;
+ H5FD_multi_t *file=NULL;
+ hid_t close_fapl=-1;
const H5FD_multi_fapl_t *fa;
- H5FD_mem_t m;
+ H5FD_mem_t m;
static const char *func="H5FD_multi_open"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1060,19 +1060,19 @@ error:
return NULL;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_close
+ * Function: H5FD_multi_close
*
- * Purpose: Closes a multi file.
+ * Purpose: Closes a multi file.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative with as many members closed as
- * possible. The only subsequent operation
- * permitted on the file is a close operation.
+ * Failure: Negative with as many members closed as
+ * possible. The only subsequent operation
+ * permitted on the file is a close operation.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1080,8 +1080,8 @@ error:
static herr_t
H5FD_multi_close(H5FD_t *_file)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- int nerrors=0;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ int nerrors=0;
static const char *func="H5FD_multi_close"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1089,21 +1089,21 @@ H5FD_multi_close(H5FD_t *_file)
/* Close as many members as possible */
ALL_MEMBERS(mt) {
- if (file->memb[mt]) {
- if (H5FDclose(file->memb[mt])<0) {
+ if (file->memb[mt]) {
+ if (H5FDclose(file->memb[mt])<0) {
nerrors++;
- } else {
+ } else {
file->memb[mt] = NULL;
- }
- }
+ }
+ }
} END_MEMBERS;
if (nerrors)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error closing member files", -1)
/* Clean up other stuff */
ALL_MEMBERS(mt) {
- if (file->fa.memb_fapl[mt]>=0) (void)H5Idec_ref(file->fa.memb_fapl[mt]);
- if (file->fa.memb_name[mt]) free(file->fa.memb_name[mt]);
+ if (file->fa.memb_fapl[mt]>=0) (void)H5Idec_ref(file->fa.memb_fapl[mt]);
+ if (file->fa.memb_name[mt]) free(file->fa.memb_name[mt]);
} END_MEMBERS;
free(file->name);
@@ -1111,22 +1111,22 @@ H5FD_multi_close(H5FD_t *_file)
return 0;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_cmp
+ * Function: H5FD_multi_cmp
*
- * Purpose: Compares two file families to see if they are the same. It
- * does this by comparing the first common member of the two
- * families. If the families have no members in common then the
- * file with the earliest member is smaller than the other file.
- * We abort if neither file has any members.
+ * Purpose: Compares two file families to see if they are the same. It
+ * does this by comparing the first common member of the two
+ * families. If the families have no members in common then the
+ * file with the earliest member is smaller than the other file.
+ * We abort if neither file has any members.
*
- * Return: Success: like strcmp()
+ * Return: Success: like strcmp()
*
- * Failure: never fails (arguments were checked by the
- * caller).
+ * Failure: never fails (arguments were checked by the
+ * caller).
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1134,24 +1134,24 @@ H5FD_multi_close(H5FD_t *_file)
static int
H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_multi_t *f1 = (const H5FD_multi_t*)_f1;
- const H5FD_multi_t *f2 = (const H5FD_multi_t*)_f2;
- H5FD_mem_t out_mt = H5FD_MEM_DEFAULT;
- int cmp=0;
+ const H5FD_multi_t *f1 = (const H5FD_multi_t*)_f1;
+ const H5FD_multi_t *f2 = (const H5FD_multi_t*)_f2;
+ H5FD_mem_t out_mt = H5FD_MEM_DEFAULT;
+ int cmp=0;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
ALL_MEMBERS(mt) {
out_mt = mt;
- if(f1->memb[mt] && f2->memb[mt])
+ if(f1->memb[mt] && f2->memb[mt])
break;
- if(!cmp) {
- if(f1->memb[mt])
+ if(!cmp) {
+ if(f1->memb[mt])
cmp = -1;
- else if(f2->memb[mt])
+ else if(f2->memb[mt])
cmp = 1;
- }
+ }
} END_MEMBERS;
assert(cmp || out_mt<H5FD_MEM_NTYPES);
if(out_mt>=H5FD_MEM_NTYPES)
@@ -1160,18 +1160,18 @@ H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
return H5FDcmp(f1->memb[out_mt], f2->memb[out_mt]);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_query
+ * Function: H5FD_multi_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, September 26, 2000
*
*-------------------------------------------------------------------------
@@ -1194,16 +1194,16 @@ H5FD_multi_query(const H5FD_t *_f, unsigned long *flags /* out */)
return(0);
} /* end H5FD_multi_query() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_get_type_map
+ * Function: H5FD_multi_get_type_map
*
- * Purpose: Retrieve the memory type mapping for this file
+ * Purpose: Retrieve the memory type mapping for this file
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, October 9, 2008
*
*-------------------------------------------------------------------------
@@ -1211,7 +1211,7 @@ H5FD_multi_query(const H5FD_t *_f, unsigned long *flags /* out */)
static herr_t
H5FD_multi_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
{
- const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
+ const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
/* Copy file's free space type mapping */
memcpy(type_map, file->fa.memb_map, sizeof(file->fa.memb_map));
@@ -1219,19 +1219,19 @@ H5FD_multi_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
return(0);
} /* end H5FD_multi_get_type_map() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_get_eoa
+ * Function: H5FD_multi_get_eoa
*
- * Purpose: Returns the end-of-address marker for the file. The EOA
- * marker is the first address past the last byte allocated in
- * the format address space.
+ * Purpose: Returns the end-of-address marker for the file. The EOA
+ * marker is the first address past the last byte allocated in
+ * the format address space.
*
- * Return: Success: The end-of-address-marker
+ * Return: Success: The end-of-address-marker
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1239,7 +1239,7 @@ H5FD_multi_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
static haddr_t
H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
{
- const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
+ const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
haddr_t eoa = 0;
static const char *func="H5FD_multi_get_eoa"; /* Function Name for error reporting */
@@ -1256,26 +1256,26 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
UNIQUE_MEMBERS(file->fa.memb_map, mt) {
haddr_t memb_eoa;
- if (file->memb[mt]) {
+ if (file->memb[mt]) {
/* Retrieve EOA */
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY {
memb_eoa = H5FDget_eoa(file->memb[mt], mt);
- } H5E_END_TRY;
+ } H5E_END_TRY;
- if(HADDR_UNDEF == memb_eoa)
+ if(HADDR_UNDEF == memb_eoa)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", HADDR_UNDEF)
if(memb_eoa>0)
memb_eoa += file->fa.memb_addr[mt];
- } else if(file->fa.relax) {
- /*
- * The member is not open yet (maybe it doesn't exist). Make the
- * best guess about the end-of-file.
- */
- memb_eoa = file->memb_next[mt];
- assert(HADDR_UNDEF != memb_eoa);
- } else {
+ } else if(file->fa.relax) {
+ /*
+ * The member is not open yet (maybe it doesn't exist). Make the
+ * best guess about the end-of-file.
+ */
+ memb_eoa = file->memb_next[mt];
+ assert(HADDR_UNDEF != memb_eoa);
+ } else {
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF)
- }
+ }
if(memb_eoa > eoa)
eoa = memb_eoa;
@@ -1286,44 +1286,44 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
if(H5FD_MEM_DEFAULT == mmt)
mmt = type;
- if(file->memb[mmt]) {
+ if(file->memb[mmt]) {
H5E_BEGIN_TRY {
- eoa = H5FDget_eoa(file->memb[mmt], mmt);
+ eoa = H5FDget_eoa(file->memb[mmt], mmt);
} H5E_END_TRY;
- if(HADDR_UNDEF == eoa)
+ if(HADDR_UNDEF == eoa)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", HADDR_UNDEF)
- if(eoa > 0)
+ if(eoa > 0)
eoa += file->fa.memb_addr[mmt];
- } else if(file->fa.relax) {
- /*
- * The member is not open yet (maybe it doesn't exist). Make the
- * best guess about the end-of-file.
- */
- eoa = file->memb_next[mmt];
- assert(HADDR_UNDEF != eoa);
- } else {
+ } else if(file->fa.relax) {
+ /*
+ * The member is not open yet (maybe it doesn't exist). Make the
+ * best guess about the end-of-file.
+ */
+ eoa = file->memb_next[mmt];
+ assert(HADDR_UNDEF != eoa);
+ } else {
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF)
- }
+ }
}
return eoa;
} /* end H5FD_multi_get_eoa() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_set_eoa
+ * Function: H5FD_multi_set_eoa
*
- * Purpose: Set the end-of-address marker for the file by savig the new
- * EOA value in the file struct. Also set the EOA marker for the
- * subfile in which the new EOA value falls. We don't set the
- * EOA values of any other subfiles.
+ * Purpose: Set the end-of-address marker for the file by savig the new
+ * EOA value in the file struct. Also set the EOA marker for the
+ * subfile in which the new EOA value falls. We don't set the
+ * EOA values of any other subfiles.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1331,9 +1331,9 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
static herr_t
H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mmt;
- herr_t status;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_mem_t mmt;
+ herr_t status;
static const char *func="H5FD_multi_set_eoa"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1364,7 +1364,7 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa)
assert(eoa < file->memb_next[mmt]);
H5E_BEGIN_TRY {
- status = H5FDset_eoa(file->memb[mmt], mmt, (eoa - file->fa.memb_addr[mmt]));
+ status = H5FDset_eoa(file->memb[mmt], mmt, (eoa - file->fa.memb_addr[mmt]));
} H5E_END_TRY;
if(status < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "member H5FDset_eoa failed", -1)
@@ -1372,20 +1372,20 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa)
return 0;
} /* end H5FD_multi_set_eoa() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_get_eof
+ * Function: H5FD_multi_get_eof
*
- * Purpose: Returns the end-of-file marker, which is the greater of
- * either the total multi size or the current EOA marker.
+ * Purpose: Returns the end-of-file marker, which is the greater of
+ * either the total multi size or the current EOA marker.
*
- * Return: Success: End of file address, the first address past
- * the end of the multi of files or the current
- * EOA, whichever is larger.
+ * Return: Success: End of file address, the first address past
+ * the end of the multi of files or the current
+ * EOA, whichever is larger.
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1393,8 +1393,8 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa)
static haddr_t
H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type)
{
- const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
- haddr_t eof = 0;
+ const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
+ haddr_t eof = 0;
static const char *func="H5FD_multi_get_eof"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1433,31 +1433,31 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type)
if(H5FD_MEM_DEFAULT == mmt)
mmt = type;
- if(file->memb[mmt]) {
+ if(file->memb[mmt]) {
/* Retrieve EOF */
H5E_BEGIN_TRY {
- eof = H5FDget_eof(file->memb[mmt], mmt);
+ eof = H5FDget_eof(file->memb[mmt], mmt);
} H5E_END_TRY;
- if(HADDR_UNDEF == eof)
+ if(HADDR_UNDEF == eof)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof", HADDR_UNDEF)
- if(eof > 0)
+ if(eof > 0)
eof += file->fa.memb_addr[mmt];
- } else if(file->fa.relax) {
- /*
- * The member is not open yet (maybe it doesn't exist). Make the
- * best guess about the end-of-file.
- */
- eof = file->memb_next[mmt];
- assert(HADDR_UNDEF != eof);
- } else {
+ } else if(file->fa.relax) {
+ /*
+ * The member is not open yet (maybe it doesn't exist). Make the
+ * best guess about the end-of-file.
+ */
+ eof = file->memb_next[mmt];
+ assert(HADDR_UNDEF != eof);
+ } else {
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF)
- }
+ }
}
return eof;
}
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_multi_get_handle
*
@@ -1488,17 +1488,17 @@ H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
return (H5FDget_vfd_handle(file->memb[mmt], fapl, file_handle));
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_alloc
+ * Function: H5FD_multi_alloc
*
- * Purpose: Allocate file memory.
+ * Purpose: Allocate file memory.
*
- * Return: Success: Address of new memory
+ * Return: Success: Address of new memory
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, August 12, 1999
*
*-------------------------------------------------------------------------
@@ -1506,9 +1506,9 @@ H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
static haddr_t
H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mmt;
- haddr_t addr;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_mem_t mmt;
+ haddr_t addr;
static const char *func="H5FD_multi_alloc"; /* Function Name for error reporting */
mmt = file->fa.memb_map[type];
@@ -1529,31 +1529,31 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
/*#ifdef TMP
if ( addr + size > file->eoa ) {
- if ( H5FD_multi_set_eoa(_file, addr + size) < 0 ) {
+ if ( H5FD_multi_set_eoa(_file, addr + size) < 0 ) {
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, \
- "can't set eoa", HADDR_UNDEF)
- }
+ "can't set eoa", HADDR_UNDEF)
+ }
}
#else
if ( addr + size > file->eoa )
- file->eoa = addr + size;
+ file->eoa = addr + size;
#endif */
return addr;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_free
+ * Function: H5FD_multi_free
*
- * Purpose: Frees memory
+ * Purpose: Frees memory
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, August 12, 1999
*
*-------------------------------------------------------------------------
@@ -1561,8 +1561,8 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
static herr_t
H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mmt;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_mem_t mmt;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -1575,20 +1575,20 @@ H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsi
return H5FDfree(file->memb[mmt], mmt, dxpl_id, addr-file->fa.memb_addr[mmt], size);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_read
+ * Function: H5FD_multi_read
*
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero. Result is stored in caller-supplied
- * buffer BUF.
+ * Return: Success: Zero. Result is stored in caller-supplied
+ * buffer BUF.
*
- * Failure: -1, contents of buffer BUF are undefined.
+ * Failure: -1, contents of buffer BUF are undefined.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1597,26 +1597,26 @@ static herr_t
H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
size_t size, void *_buf/*out*/)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT;
- haddr_t start_addr = 0;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT;
+ haddr_t start_addr = 0;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
/* Find the file to which this address belongs */
for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- mmt = file->fa.memb_map[mt];
- if(H5FD_MEM_DEFAULT == mmt)
+ mmt = file->fa.memb_map[mt];
+ if(H5FD_MEM_DEFAULT == mmt)
mmt = mt;
- assert(mmt > 0 && mmt < H5FD_MEM_NTYPES);
+ assert(mmt > 0 && mmt < H5FD_MEM_NTYPES);
- if(file->fa.memb_addr[mmt] > addr)
+ if(file->fa.memb_addr[mmt] > addr)
continue;
- if(file->fa.memb_addr[mmt] >= start_addr) {
- start_addr = file->fa.memb_addr[mmt];
- hi = mmt;
- } /* end if */
+ if(file->fa.memb_addr[mmt] >= start_addr) {
+ start_addr = file->fa.memb_addr[mmt];
+ hi = mmt;
+ } /* end if */
} /* end for */
assert(hi > 0);
@@ -1624,19 +1624,19 @@ H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
return H5FDread(file->memb[hi], type, dxpl_id, addr - start_addr, size, _buf);
} /* end H5FD_multi_read() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_write
+ * Function: H5FD_multi_write
*
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
+ * from buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero
+ * Return: Success: Zero
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1645,26 +1645,26 @@ static herr_t
H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
size_t size, const void *_buf)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT;
- haddr_t start_addr = 0;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT;
+ haddr_t start_addr = 0;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
/* Find the file to which this address belongs */
for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- mmt = file->fa.memb_map[mt];
- if(H5FD_MEM_DEFAULT == mmt)
+ mmt = file->fa.memb_map[mt];
+ if(H5FD_MEM_DEFAULT == mmt)
mmt = mt;
- assert(mmt > 0 && mmt<H5FD_MEM_NTYPES);
+ assert(mmt > 0 && mmt<H5FD_MEM_NTYPES);
- if(file->fa.memb_addr[mmt] > addr)
+ if(file->fa.memb_addr[mmt] > addr)
continue;
- if(file->fa.memb_addr[mmt] >= start_addr) {
- start_addr = file->fa.memb_addr[mmt];
- hi = mmt;
- } /* end if */
+ if(file->fa.memb_addr[mmt] >= start_addr) {
+ start_addr = file->fa.memb_addr[mmt];
+ hi = mmt;
+ } /* end if */
} /* end for */
assert(hi > 0);
@@ -1672,17 +1672,17 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
return H5FDwrite(file->memb[hi], type, dxpl_id, addr - start_addr, size, _buf);
} /* end H5FD_multi_write() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_flush
+ * Function: H5FD_multi_flush
*
- * Purpose: Flushes all multi members.
+ * Purpose: Flushes all multi members.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1, as many files flushed as possible.
+ * Failure: -1, as many files flushed as possible.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1690,13 +1690,13 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
static herr_t
H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mt;
- int nerrors=0;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_mem_t mt;
+ int nerrors=0;
static const char *func="H5FD_multi_flush"; /* Function Name for error reporting */
#if 0
- H5FD_mem_t mmt;
+ H5FD_mem_t mmt;
/* Debugging stuff... */
fprintf(stderr, "multifile access information:\n");
@@ -1704,9 +1704,9 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
/* print the map */
fprintf(stderr, " map=");
for (mt=1; mt<H5FD_MEM_NTYPES; mt++) {
- mmt = file->memb_map[mt];
- if (H5FD_MEM_DEFAULT==mmt) mmt = mt;
- fprintf(stderr, "%s%d", 1==mt?"":",", (int)mmt);
+ mmt = file->memb_map[mt];
+ if (H5FD_MEM_DEFAULT==mmt) mmt = mt;
+ fprintf(stderr, "%s%d", 1==mt?"":",", (int)mmt);
}
fprintf(stderr, "\n");
@@ -1716,14 +1716,14 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
fprintf(stderr, " ------ -------------------- -------------------- -------------------- ------------------------------\n");
for (mt=1; mt<H5FD_MEM_NTYPES; mt++) {
- if (HADDR_UNDEF!=file->memb_addr[mt]) {
- haddr_t eoa = H5FDget_eoa(file->memb[mt], mt);
- fprintf(stderr, " %6d %20llu %20llu %20llu %s\n",
- (int)mt, (unsigned long long)(file->memb_addr[mt]),
- (unsigned long long)eoa,
- (unsigned long long)(file->memb_next[mt]),
- file->memb_name[mt]);
- }
+ if (HADDR_UNDEF!=file->memb_addr[mt]) {
+ haddr_t eoa = H5FDget_eoa(file->memb[mt], mt);
+ fprintf(stderr, " %6d %20llu %20llu %20llu %s\n",
+ (int)mt, (unsigned long long)(file->memb_addr[mt]),
+ (unsigned long long)eoa,
+ (unsigned long long)(file->memb_next[mt]),
+ file->memb_name[mt]);
+ }
}
#endif
@@ -1732,11 +1732,11 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
/* Flush each file */
for (mt=H5FD_MEM_SUPER; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- if (file->memb[mt]) {
- H5E_BEGIN_TRY {
- if (H5FDflush(file->memb[mt],dxpl_id,closing)<0) nerrors++;
- } H5E_END_TRY;
- }
+ if (file->memb[mt]) {
+ H5E_BEGIN_TRY {
+ if (H5FDflush(file->memb[mt],dxpl_id,closing)<0) nerrors++;
+ } H5E_END_TRY;
+ }
}
if (nerrors)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error flushing member files", -1)
@@ -1744,16 +1744,16 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
return 0;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_truncate
+ * Function: H5FD_multi_truncate
*
- * Purpose: Truncates all multi members.
+ * Purpose: Truncates all multi members.
*
- * Return: Success: 0
- * Failure: -1, as many files truncated as possible.
+ * Return: Success: 0
+ * Failure: -1, as many files truncated as possible.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 31, 2008
*
*-------------------------------------------------------------------------
@@ -1761,9 +1761,9 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
static herr_t
H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mt;
- int nerrors=0;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_mem_t mt;
+ int nerrors=0;
static const char *func="H5FD_multi_truncate"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1771,12 +1771,12 @@ H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
/* Truncate each file */
for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- if(file->memb[mt]) {
- H5E_BEGIN_TRY {
- if(H5FDtruncate(file->memb[mt], dxpl_id, closing) < 0)
+ if(file->memb[mt]) {
+ H5E_BEGIN_TRY {
+ if(H5FDtruncate(file->memb[mt], dxpl_id, closing) < 0)
nerrors++;
- } H5E_END_TRY;
- }
+ } H5E_END_TRY;
+ }
}
if(nerrors)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error truncating member files", -1)
@@ -1784,28 +1784,28 @@ H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
return 0;
} /* end H5FD_multi_truncate() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_lock
+ * Function: H5FD_multi_lock
*
- * Purpose: Place a lock on all multi members.
- * When there is error in locking a member file, it will not
- * proceed further and will try to remove the locks of those
- * member files that are locked before error is encountered.
+ * Purpose: Place a lock on all multi members.
+ * When there is error in locking a member file, it will not
+ * proceed further and will try to remove the locks of those
+ * member files that are locked before error is encountered.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Vailin Choi; March 2015
+ * Programmer: Vailin Choi; March 2015
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_multi_lock(H5FD_t *_file, hbool_t rw)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- int nerrors = 0;
- H5FD_mem_t out_mt;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ int nerrors = 0;
+ H5FD_mem_t out_mt;
static const char *func="H5FD_multi_unlock"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1842,26 +1842,26 @@ H5FD_multi_lock(H5FD_t *_file, hbool_t rw)
} /* H5FD_multi_lock() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_unlock
+ * Function: H5FD_multi_unlock
*
- * Purpose: Remove the lock on all multi members.
- * It will try to unlock all member files but will record error
- * encountered.
+ * Purpose: Remove the lock on all multi members.
+ * It will try to unlock all member files but will record error
+ * encountered.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Vailin Choi; March 2015
+ * Programmer: Vailin Choi; March 2015
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_multi_unlock(H5FD_t *_file)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- int nerrors=0;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ int nerrors=0;
static const char *func="H5FD_multi_unlock"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1870,7 +1870,7 @@ H5FD_multi_unlock(H5FD_t *_file)
ALL_MEMBERS(mt) {
if(file->memb[mt])
if(H5FDunlock(file->memb[mt]) < 0)
- nerrors++;
+ nerrors++;
} END_MEMBERS;
if(nerrors)
@@ -1879,18 +1879,18 @@ H5FD_multi_unlock(H5FD_t *_file)
return 0;
} /* H5FD_multi_unlock() */
-
+
/*-------------------------------------------------------------------------
- * Function: compute_next
+ * Function: compute_next
*
- * Purpose: Compute the memb_next[] values of the file based on the
- * file's member map and the member starting addresses.
+ * Purpose: Compute the memb_next[] values of the file based on the
+ * file's member map and the member starting addresses.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 23, 1999
*
*-------------------------------------------------------------------------
@@ -1902,36 +1902,36 @@ compute_next(H5FD_multi_t *file)
H5Eclear2(H5E_DEFAULT);
ALL_MEMBERS(mt) {
- file->memb_next[mt] = HADDR_UNDEF;
+ file->memb_next[mt] = HADDR_UNDEF;
} END_MEMBERS;
UNIQUE_MEMBERS(file->fa.memb_map, mt1) {
- UNIQUE_MEMBERS2(file->fa.memb_map, mt2) {
- if (file->fa.memb_addr[mt1]<file->fa.memb_addr[mt2] &&
- (HADDR_UNDEF==file->memb_next[mt1] ||
- file->memb_next[mt1]>file->fa.memb_addr[mt2])) {
- file->memb_next[mt1] = file->fa.memb_addr[mt2];
- }
- } END_MEMBERS;
- if (HADDR_UNDEF==file->memb_next[mt1]) {
- file->memb_next[mt1] = HADDR_MAX; /*last member*/
- }
+ UNIQUE_MEMBERS2(file->fa.memb_map, mt2) {
+ if (file->fa.memb_addr[mt1]<file->fa.memb_addr[mt2] &&
+ (HADDR_UNDEF==file->memb_next[mt1] ||
+ file->memb_next[mt1]>file->fa.memb_addr[mt2])) {
+ file->memb_next[mt1] = file->fa.memb_addr[mt2];
+ }
+ } END_MEMBERS;
+ if (HADDR_UNDEF==file->memb_next[mt1]) {
+ file->memb_next[mt1] = HADDR_MAX; /*last member*/
+ }
} END_MEMBERS;
return 0;
}
-
+
/*-------------------------------------------------------------------------
- * Function: open_members
+ * Function: open_members
*
- * Purpose: Opens all members which are not opened yet.
+ * Purpose: Opens all members which are not opened yet.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 23, 1999
*
*-------------------------------------------------------------------------
@@ -1942,7 +1942,7 @@ compute_next(H5FD_multi_t *file)
* tmp in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static int
open_members(H5FD_multi_t *file)
{
@@ -1976,9 +1976,9 @@ open_members(H5FD_multi_t *file)
return 0;
}
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
+
-
#ifdef _H5private_H
/*
* This is not related to the functionality of the driver code.
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index c5d1be1..dcca0f6 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -22,13 +22,13 @@
#include "H5FDpublic.h"
/* Private headers needed by this file */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5Pprivate.h" /* Property lists */
/*
* The MPI drivers are needed because there are
* places where we check for things that aren't handled by these drivers.
*/
-#include "H5FDmpi.h" /* MPI-based file drivers */
+#include "H5FDmpi.h" /* MPI-based file drivers */
/**************************/
@@ -75,16 +75,16 @@ typedef struct {
/* Define default file image info */
#define H5FD_DEFAULT_FILE_IMAGE_INFO { \
- /* file image buffer */ NULL, \
- /* buffer size */ 0, \
+ NULL, /* file image buffer */ \
+ 0, /* buffer size */ \
{ /* Callbacks */ \
- /* image_malloc */ NULL, \
- /* image_memcpy */ NULL, \
- /* image_realloc */ NULL, \
- /* image_free */ NULL, \
- /* udata_copy */ NULL, \
- /* udata_free */ NULL, \
- /* udata */ NULL, \
+ NULL, /* image_malloc */ \
+ NULL, /* image_memcpy */ \
+ NULL, /* image_realloc */ \
+ NULL, /* image_free */ \
+ NULL, /* udata_copy */ \
+ NULL, /* udata_free */ \
+ NULL, /* udata */ \
} \
}
@@ -117,7 +117,7 @@ H5_DLL void *H5FD_fapl_get(H5FD_t *file);
H5_DLL herr_t H5FD_free_driver_info(hid_t driver_id, const void *driver_info);
H5_DLL hid_t H5FD_register(const void *cls, size_t size, hbool_t app_ref);
H5_DLL H5FD_t *H5FD_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
+ haddr_t maxaddr);
H5_DLL herr_t H5FD_close(H5FD_t *file);
H5_DLL int H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2);
H5_DLL herr_t H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags/*out*/);
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 395f482..fdbafc2 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -246,6 +246,7 @@ typedef struct H5F_t H5F_t;
(p) += 8; \
}
+/* clang-format off */
/* Address-related macros */
#define H5F_addr_overflow(X,Z) (HADDR_UNDEF==(X) || \
HADDR_UNDEF==(X)+(haddr_t)(Z) || \
@@ -274,6 +275,7 @@ typedef struct H5F_t H5F_t;
#define H5F_addr_pow2(N) ((haddr_t)1<<(N))
#define H5F_addr_overlap(O1,L1,O2,L2) (((O1) < (O2) && ((O1) + (L1)) > (O2)) || \
((O1) >= (O2) && (O1) < ((O2) + (L2))))
+/* clang-format on */
/* If the module using this macro is allowed access to the private variables, access them directly */
#ifdef H5F_MODULE
@@ -469,9 +471,11 @@ typedef struct H5F_t H5F_t;
#define H5F_CRT_ADDR_BYTE_NUM_NAME "addr_byte_num" /* Byte number in an address */
#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */
#define H5F_CRT_SUPER_VERS_NAME "super_version" /* Version number of the superblock */
-#define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes" /* Number of shared object header message indexes */
+/* Number of shared object header message indexes */
+#define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes"
#define H5F_CRT_SHMSG_INDEX_TYPES_NAME "shmsg_message_types" /* Types of message in each index */
-#define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize" /* Minimum size of messages in each index */
+/* Minimum size of messages in each index */
+#define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize"
#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */
#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */
#define H5F_CRT_FILE_SPACE_STRATEGY_NAME "file_space_strategy" /* File space handling strategy */
diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h
index 9289ab5..4dd3c88 100644
--- a/src/H5Gpkg.h
+++ b/src/H5Gpkg.h
@@ -47,7 +47,7 @@
/* Size of a symbol table node on disk */
#define H5G_NODE_SIZE(f) ( \
/* General metadata fields */ \
- H5_SIZEOF_MAGIC \
+ H5_SIZEOF_MAGIC /*magic number */ \
+ 1 /* Version */ \
+ 1 /* Reserved */ \
+ 2 /* Number of symbols */ \
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index 96e695d..09b2dd3 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -61,6 +61,7 @@
/* Definitions for link info settings */
#define H5G_CRT_LINK_INFO_NAME "link info"
#define H5G_CRT_LINK_INFO_SIZE sizeof(H5O_linfo_t)
+/* clang-format off */
#define H5G_CRT_LINK_INFO_DEF {H5G_CRT_LINFO_TRACK_CORDER, \
H5G_CRT_LINFO_INDEX_CORDER, \
H5G_CRT_LINFO_MAX_CORDER, \
@@ -69,6 +70,7 @@
H5G_CRT_LINFO_LINK_FHEAP_ADDR, \
H5G_CRT_LINFO_NAME_BT2_ADDR \
}
+/* clang-format on */
/* Defaults for group info values */
#define H5G_CRT_GINFO_LHEAP_SIZE_HINT 0
@@ -82,6 +84,7 @@
/* Definitions for group info settings */
#define H5G_CRT_GROUP_INFO_NAME "group info"
#define H5G_CRT_GROUP_INFO_SIZE sizeof(H5O_ginfo_t)
+/* clang-format off */
#define H5G_CRT_GROUP_INFO_DEF {H5G_CRT_GINFO_LHEAP_SIZE_HINT, \
H5G_CRT_GINFO_STORE_LINK_PHASE_CHANGE, \
H5G_CRT_GINFO_MAX_COMPACT, \
@@ -90,6 +93,7 @@
H5G_CRT_GINFO_EST_NUM_ENTRIES, \
H5G_CRT_GINFO_EST_NAME_LEN \
}
+/* clang-format on */
/* If the module using this macro is allowed access to the private variables, access them directly */
#ifdef H5G_MODULE
diff --git a/src/H5Lprivate.h b/src/H5Lprivate.h
index df842f3..1e096ef 100644
--- a/src/H5Lprivate.h
+++ b/src/H5Lprivate.h
@@ -22,8 +22,8 @@
#include "H5Lpublic.h"
/* Private headers needed by this file */
-#include "H5Gprivate.h" /* Groups */
-#include "H5Oprivate.h" /* Object headers */
+#include "H5Gprivate.h" /* Groups */
+#include "H5Oprivate.h" /* Object headers */
/**************************/
@@ -37,11 +37,16 @@
#define H5L_CRT_INTERMEDIATE_GROUP_NAME "intermediate_group" /* Create intermediate groups flag */
/* ======== Link access property names ======== */
-#define H5L_ACS_NLINKS_NAME "max soft links" /* Number of soft links to traverse */
-#define H5L_ACS_ELINK_PREFIX_NAME "external link prefix" /* External link prefix */
-#define H5L_ACS_ELINK_FAPL_NAME "external link fapl" /* file access property list for external link access */
-#define H5L_ACS_ELINK_FLAGS_NAME "external link flags" /* file access flags for external link traversal */
-#define H5L_ACS_ELINK_CB_NAME "external link callback" /* callback function for external link traversal */
+/* Number of soft links to traverse */
+#define H5L_ACS_NLINKS_NAME "max soft links"
+/* External link prefix */
+#define H5L_ACS_ELINK_PREFIX_NAME "external link prefix"
+/* file access property list for external link access */
+#define H5L_ACS_ELINK_FAPL_NAME "external link fapl"
+/* file access flags for external link traversal */
+#define H5L_ACS_ELINK_FLAGS_NAME "external link flags"
+/* callback function for external link traversal */
+#define H5L_ACS_ELINK_CB_NAME "external link callback"
/****************************/
diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h
index 861fafc..62a0b3e 100644
--- a/src/H5Lpublic.h
+++ b/src/H5Lpublic.h
@@ -25,10 +25,10 @@
#define _H5Lpublic_H
/* Public headers needed by this file */
-#include "H5public.h" /* Generic Functions */
-#include "H5Ipublic.h" /* IDs */
-#include "H5Opublic.h" /* Object Headers */
-#include "H5Tpublic.h" /* Datatypes */
+#include "H5public.h" /* Generic Functions */
+#include "H5Ipublic.h" /* IDs */
+#include "H5Opublic.h" /* Object Headers */
+#include "H5Tpublic.h" /* Datatypes */
/*****************/
/* Public Macros */
@@ -65,10 +65,12 @@ typedef enum {
H5L_TYPE_HARD = 0, /* Hard link id */
H5L_TYPE_SOFT = 1, /* Soft link id */
H5L_TYPE_EXTERNAL = 64, /* External link id */
- H5L_TYPE_MAX = 255 /* Maximum link type id */
+ H5L_TYPE_MAX = 255 /* Maximum link type id */
} H5L_type_t;
-#define H5L_TYPE_BUILTIN_MAX H5L_TYPE_SOFT /* Maximum value link value for "built-in" link types */
-#define H5L_TYPE_UD_MIN H5L_TYPE_EXTERNAL /* Link ids at or above this value are "user-defined" link types. */
+/* Maximum value link value for "built-in" link types */
+#define H5L_TYPE_BUILTIN_MAX H5L_TYPE_SOFT
+/* Link ids at or above this value are "user-defined" link types. */
+#define H5L_TYPE_UD_MIN H5L_TYPE_EXTERNAL
/* Information struct for link (for H5Lget_info2/H5Lget_info_by_idx2)
* H5O_token_t version used in VOL layer and future public API calls
diff --git a/src/H5MFpkg.h b/src/H5MFpkg.h
index 7d72658..ef03f48 100644
--- a/src/H5MFpkg.h
+++ b/src/H5MFpkg.h
@@ -30,7 +30,7 @@
#include "H5MFprivate.h"
/* Other private headers needed by this file */
-#include "H5FSprivate.h" /* File free space */
+#include "H5FSprivate.h" /* File free space */
/**************************/
@@ -51,9 +51,12 @@
/* Free-space section types for file */
/* (values stored in free space data structures in file) */
-#define H5MF_FSPACE_SECT_SIMPLE 0 /* For non-paged aggregation: section is a range of actual bytes in file */
-#define H5MF_FSPACE_SECT_SMALL 1 /* For paged aggregation: "small" meta/raw data section which is < fsp_size) */
-#define H5MF_FSPACE_SECT_LARGE 2 /* For paged aggregation: "large" Section which is >= fsp_size) */
+/* For non-paged aggregation: section is a range of actual bytes in file */
+#define H5MF_FSPACE_SECT_SIMPLE 0
+/* For paged aggregation: "small" meta/raw data section which is < fsp_size) */
+#define H5MF_FSPACE_SECT_SMALL 1
+/* For paged aggregation: "large" Section which is >= fsp_size) */
+#define H5MF_FSPACE_SECT_LARGE 2
/* Get section class type based on size */
#define H5MF_SECT_CLASS_TYPE(F, S) \
@@ -155,7 +158,7 @@ typedef struct H5MF_fs_t {
H5F_fs_state_t *fs_state;
haddr_t *fs_addr;
H5FS_t **fs_man;
- hsize_t align_thres; /* Threshold for alignment */
+ hsize_t align_thres; /* Threshold for alignment */
hsize_t alignment; /* Alignment */
} H5MF_fs_t;
diff --git a/src/H5PLint.c b/src/H5PLint.c
index b69a788..7e8ad89 100644
--- a/src/H5PLint.c
+++ b/src/H5PLint.c
@@ -77,7 +77,7 @@ static unsigned int H5PL_plugin_control_mask_g = H5PL_ALL_PLUGIN;
static hbool_t H5PL_allow_plugins_g = TRUE;
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__get_plugin_control_mask
*
@@ -104,7 +104,7 @@ H5PL__get_plugin_control_mask(unsigned int *mask /*out*/)
} /* end H5PL__get_plugin_control_mask() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__set_plugin_control_mask
*
@@ -133,7 +133,7 @@ H5PL__set_plugin_control_mask(unsigned int mask)
} /* end H5PL__set_plugin_control_mask() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__init_package
*
@@ -174,7 +174,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__init_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL_term_package
*
@@ -219,7 +219,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL_term_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL_load
*
@@ -281,7 +281,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL_load() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__open
*
@@ -304,7 +304,7 @@ done:
* get_plugin_info function pointer, but early (4.4.7, at least) gcc
* only allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(pedantic)
+H5_GCC_DIAG_OFF("pedantic")
herr_t
H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key,
hbool_t *success, const void **plugin_info)
@@ -416,9 +416,9 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__open() */
-H5_GCC_DIAG_ON(pedantic)
+H5_GCC_DIAG_ON("pedantic")
+
-
/*-------------------------------------------------------------------------
* Function: H5PL__close
*
diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c
index c58828f..5a8b595 100644
--- a/src/H5PLplugin_cache.c
+++ b/src/H5PLplugin_cache.c
@@ -93,7 +93,7 @@ static unsigned int H5PL_num_plugins_g = 0;
static unsigned int H5PL_cache_capacity_g = 0;
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__create_plugin_cache
*
@@ -130,7 +130,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__create_plugin_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__close_plugin_cache
*
@@ -170,7 +170,7 @@ H5PL__close_plugin_cache(hbool_t *already_closed /*out*/)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__close_plugin_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__expand_cache
*
@@ -205,7 +205,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__expand_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__add_plugin
*
@@ -238,7 +238,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__add_plugin() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__find_plugin_in_cache
*
@@ -253,7 +253,7 @@ done:
/* See the other use of H5PL_GET_LIB_FUNC() for an explanation
* for why we disable -Wpedantic here.
*/
-H5_GCC_DIAG_OFF(pedantic)
+H5_GCC_DIAG_OFF("pedantic")
herr_t
H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *found, const void **plugin_info)
{
@@ -302,5 +302,5 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__find_plugin_in_cache() */
-H5_GCC_DIAG_ON(pedantic)
+H5_GCC_DIAG_ON("pedantic")
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index f644b21..fa2be10 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Module Info: Datatype conversions for the H5T interface.
+ * Module Info: Datatype conversions for the H5T interface.
*/
/****************/
@@ -25,15 +25,15 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5Tpkg.h" /* Datatypes */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5Tpkg.h" /* Datatypes */
/****************/
@@ -56,57 +56,57 @@
* source value has a magnitude that cannot be represented by the destination
* type.
*
- * Suffix Description
- * ------ -----------
- * sS: Signed integers to signed integers where the destination is
- * at least as wide as the source. This case cannot generate
- * overflows.
+ * Suffix Description
+ * ------ -----------
+ * sS: Signed integers to signed integers where the destination is
+ * at least as wide as the source. This case cannot generate
+ * overflows.
*
- * sU: Signed integers to unsigned integers where the destination is
- * at least as wide as the source. This case experiences
- * overflows when the source value is negative.
+ * sU: Signed integers to unsigned integers where the destination is
+ * at least as wide as the source. This case experiences
+ * overflows when the source value is negative.
*
- * uS: Unsigned integers to signed integers where the destination is
- * at least as wide as the source. This case can experience
- * overflows when the source and destination are the same size.
+ * uS: Unsigned integers to signed integers where the destination is
+ * at least as wide as the source. This case can experience
+ * overflows when the source and destination are the same size.
*
- * uU: Unsigned integers to unsigned integers where the destination
- * is at least as wide as the source. Overflows are not
- * possible in this case.
+ * uU: Unsigned integers to unsigned integers where the destination
+ * is at least as wide as the source. Overflows are not
+ * possible in this case.
*
- * Ss: Signed integers to signed integers where the source is at
- * least as large as the destination. Overflows can occur when
- * the destination is narrower than the source.
+ * Ss: Signed integers to signed integers where the source is at
+ * least as large as the destination. Overflows can occur when
+ * the destination is narrower than the source.
*
- * Su: Signed integers to unsigned integers where the source is at
- * least as large as the destination. Overflows occur when the
- * source value is negative and can also occur if the
- * destination is narrower than the source.
+ * Su: Signed integers to unsigned integers where the source is at
+ * least as large as the destination. Overflows occur when the
+ * source value is negative and can also occur if the
+ * destination is narrower than the source.
*
- * Us: Unsigned integers to signed integers where the source is at
- * least as large as the destination. Overflows can occur for
- * all sizes.
+ * Us: Unsigned integers to signed integers where the source is at
+ * least as large as the destination. Overflows can occur for
+ * all sizes.
*
- * Uu: Unsigned integers to unsigned integers where the source is at
- * least as large as the destination. Overflows can occur if the
- * destination is narrower than the source.
+ * Uu: Unsigned integers to unsigned integers where the source is at
+ * least as large as the destination. Overflows can occur if the
+ * destination is narrower than the source.
*
- * su: Conversion from signed integers to unsigned integers where
- * the source and destination are the same size. Overflow occurs
- * when the source value is negative.
+ * su: Conversion from signed integers to unsigned integers where
+ * the source and destination are the same size. Overflow occurs
+ * when the source value is negative.
*
- * us: Conversion from unsigned integers to signed integers where
- * the source and destination are the same size. Overflow
- * occurs when the source magnitude is too large for the
- * destination.
+ * us: Conversion from unsigned integers to signed integers where
+ * the source and destination are the same size. Overflow
+ * occurs when the source magnitude is too large for the
+ * destination.
*
- * fF: Floating-point values to floating-point values where the
- * destination is at least as wide as the source. This case
+ * fF: Floating-point values to floating-point values where the
+ * destination is at least as wide as the source. This case
* cannot generate overflows.
*
- * Ff: Floating-point values to floating-point values the source is at
- * least as large as the destination. Overflows can occur when
- * the destination is narrower than the source.
+ * Ff: Floating-point values to floating-point values the source is at
+ * least as large as the destination. Overflows can occur when
+ * the destination is narrower than the source.
*
* xF: Integers to float-point(float or double) values where the destination
* is at least as wide as the source. This case cannot generate
@@ -118,29 +118,29 @@
*
* The macros take a subset of these arguments in the order listed here:
*
- * CDATA: A pointer to the H5T_cdata_t structure that was passed to the
- * conversion function.
+ * CDATA: A pointer to the H5T_cdata_t structure that was passed to the
+ * conversion function.
*
- * STYPE: The hid_t value for the source datatype.
+ * STYPE: The hid_t value for the source datatype.
*
- * DTYPE: The hid_t value for the destination datatype.
+ * DTYPE: The hid_t value for the destination datatype.
*
- * BUF: A pointer to the conversion buffer.
+ * BUF: A pointer to the conversion buffer.
*
- * NELMTS: The number of values to be converted.
+ * NELMTS: The number of values to be converted.
*
- * ST: The C name for source datatype (e.g., int)
+ * ST: The C name for source datatype (e.g., int)
*
- * DT: The C name for the destination datatype (e.g., signed char)
+ * DT: The C name for the destination datatype (e.g., signed char)
*
- * D_MIN: The minimum possible destination value. For unsigned
- * destination types this should be zero. For signed
- * destination types it's a negative value with a magnitude that
- * is usually one greater than D_MAX. Source values which are
- * smaller than D_MIN generate overflows.
+ * D_MIN: The minimum possible destination value. For unsigned
+ * destination types this should be zero. For signed
+ * destination types it's a negative value with a magnitude that
+ * is usually one greater than D_MAX. Source values which are
+ * smaller than D_MIN generate overflows.
*
- * D_MAX: The maximum possible destination value. Source values which
- * are larger than D_MAX generate overflows.
+ * D_MAX: The maximum possible destination value. Source values which
+ * are larger than D_MAX generate overflows.
*
* The macros are implemented with a generic programming technique, similar
* to templates in C++. The macro which defines the "core" part of the
@@ -155,25 +155,25 @@
*
* The generic "core" macros are: (others are specific to particular conversion)
*
- * Suffix Description
- * ------ -----------
- * xX: Generic Conversion where the destination is at least as
+ * Suffix Description
+ * ------ -----------
+ * xX: Generic Conversion where the destination is at least as
* wide as the source. This case cannot generate overflows.
*
- * Xx: Generic signed conversion where the source is at least as large
+ * Xx: Generic signed conversion where the source is at least as large
* as the destination. Overflows can occur when the destination is
* narrower than the source.
*
- * Ux: Generic conversion for the `Us', `Uu' & `us' cases
- * Overflow occurs when the source magnitude is too large for the
- * destination.
+ * Ux: Generic conversion for the `Us', `Uu' & `us' cases
+ * Overflow occurs when the source magnitude is too large for the
+ * destination.
*
*/
-#define H5T_CONV_xX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_xX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_xX_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_xX_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
/* Added a condition branch(else if (*(S) == (DT)(D_MAX))) which seems redundant.
@@ -183,13 +183,13 @@
* equal. In this case, do not return exception but make sure the maximum is assigned
* to the destination. SLU - 2005/06/29
*/
-#define H5T_CONV_Xx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Xx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -198,69 +198,69 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MIN); \
+ *(D) = (DT)(D_MIN); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Xx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Xx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
} else if (*(S) < (ST)(D_MIN)) { \
- *(D) = (DT)(D_MIN); \
- } else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MIN); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ux_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ux_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ux_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ux_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
- *(D) = (DT)(D_MAX); \
- } else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MAX); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_sS(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_sS(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_sU_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_sU_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) < 0) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = 0; \
+ *(D) = 0; \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_sU_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_sU_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) < 0) \
- *(D) = 0; \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = 0; \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_sU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_sU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_sU, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
@@ -348,23 +348,23 @@
H5T_CONV(H5T_CONV_uS, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_uU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_uU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Ss(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Ss(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Xx, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) < 0) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = 0; \
+ *(D) = 0; \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -373,106 +373,106 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) < 0) \
- *(D) = 0; \
+ *(D) = 0; \
else if (sizeof(ST)>sizeof(DT) && *(S) > (ST)(D_MAX)) \
- *(D) = (DT)(D_MAX); \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MAX); \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Su, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Ux, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Uu(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Uu(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Ux, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if(*(S) < 0) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = 0; \
+ *(D) = 0; \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if(*(S) < 0) \
- *(D) = 0; \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = 0; \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)==sizeof(DT)); \
+#define H5T_CONV_su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)==sizeof(DT)); \
H5T_CONV(H5T_CONV_su, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_us_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_us_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if (*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_us_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_us_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if(*(S) > (ST)(D_MAX)) \
- *(D) = (DT)(D_MAX); \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MAX); \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)==sizeof(DT)); \
+#define H5T_CONV_us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)==sizeof(DT)); \
H5T_CONV(H5T_CONV_us, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_fF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_fF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
/* Same as H5T_CONV_Xx_CORE, except that instead of using D_MAX and D_MIN
* when an overflow occurs, use the 'float' infinity values.
*/
-#define H5T_CONV_Ff_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ff_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
+ *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -481,24 +481,24 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
+ *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ff_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ff_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX)) \
- *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
+ *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
else if (*(S) < (ST)(D_MIN)) \
- *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ff(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Ff(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Ff, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
@@ -561,35 +561,35 @@
LO = count; \
}
-#define H5T_CONV_xF_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- if (sprec > dprec) { \
+#define H5T_CONV_xF_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ if (sprec > dprec) { \
unsigned low_bit_pos, high_bit_pos; \
\
/* Detect high & low bits set in source */ \
H5T_HI_LO_BIT_SET(ST, *(S), low_bit_pos, high_bit_pos) \
\
/* Check for more bits of precision in src than available in dst */ \
- if((high_bit_pos - low_bit_pos) >= dprec) { \
+ if((high_bit_pos - low_bit_pos) >= dprec) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_PRECISION, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } \
+ } \
else \
- *(D) = (DT)(*(S)); \
- } \
+ *(D) = (DT)(*(S)); \
+ } \
else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_xF_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_xF_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_xF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_xF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
H5T_CONV(H5T_CONV_xF, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, Y) \
}
@@ -601,13 +601,13 @@
* (ST)(D_MAX))) is for some compilers like Sun, HP, IBM, and SGI where under
* the same situation the "int" doesn't overflow. SLU - 2005/9/12
*/
-#define H5T_CONV_Fx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Fx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX) || (sprec < dprec && *(S) == (ST)(D_MAX))) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -616,7 +616,7 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MIN); \
+ *(D) = (DT)(D_MIN); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -625,24 +625,24 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } \
+ } \
else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Fx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Fx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX)) \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(*(S) < (ST)(D_MIN)) \
- *(D) = (DT)(D_MIN); \
+ *(D) = (DT)(D_MIN); \
else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Fx(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Fx(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
H5T_CONV(H5T_CONV_Fx, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, Y) \
}
@@ -651,146 +651,146 @@
* to do them all.
*/
#ifndef H5_WANT_DCONV_EXCEPTION
-#define H5T_CONV_NO_EXCEPT_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_NO_EXCEPT_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
#endif /* H5_WANT_DCONV_EXCEPTION */
/* The main part of every integer hardware conversion macro */
-#define H5T_CONV(GUTS,STYPE,DTYPE,ST,DT,D_MIN,D_MAX,PREC) \
+#define H5T_CONV(GUTS,STYPE,DTYPE,ST,DT,D_MIN,D_MAX,PREC) \
{ \
herr_t ret_value=SUCCEED; /* Return value */ \
\
FUNC_ENTER_PACKAGE \
\
{ \
- size_t elmtno; /*element number */ \
+ size_t elmtno; /*element number */ \
H5T_CONV_DECL_PREC(PREC) /*declare precision variables, or not */ \
- void *src_buf; /*'raw' source buffer */ \
- void *dst_buf; /*'raw' destination buffer */ \
- ST *src, *s; /*source buffer */ \
- DT *dst, *d; /*destination buffer */ \
- H5T_t *st, *dt; /*datatype descriptors */ \
- ST src_aligned; /*source aligned type */ \
- DT dst_aligned; /*destination aligned type */ \
- hbool_t s_mv, d_mv; /*move data to align it? */ \
- ssize_t s_stride, d_stride; /*src and dst strides */ \
+ void *src_buf; /*'raw' source buffer */ \
+ void *dst_buf; /*'raw' destination buffer */ \
+ ST *src, *s; /*source buffer */ \
+ DT *dst, *d; /*destination buffer */ \
+ H5T_t *st, *dt; /*datatype descriptors */ \
+ ST src_aligned; /*source aligned type */ \
+ DT dst_aligned; /*destination aligned type */ \
+ hbool_t s_mv, d_mv; /*move data to align it? */ \
+ ssize_t s_stride, d_stride; /*src and dst strides */ \
size_t safe; /*how many elements are safe to process in each pass */ \
H5T_conv_cb_t cb_struct; /*conversion callback structure */ \
\
- switch (cdata->command) { \
- case H5T_CONV_INIT: \
- /* Sanity check and initialize statistics */ \
- cdata->need_bkg = H5T_BKG_NO; \
+ switch (cdata->command) { \
+ case H5T_CONV_INIT: \
+ /* Sanity check and initialize statistics */ \
+ cdata->need_bkg = H5T_BKG_NO; \
if (NULL==(st=(H5T_t*)H5I_object(src_id)) || NULL==(dt=(H5T_t*)H5I_object(dst_id))) \
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
- "unable to dereference datatype object ID") \
- if (st->shared->size!=sizeof(ST) || dt->shared->size!=sizeof(DT)) \
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
- "disagreement about datatype size") \
- CI_ALLOC_PRIV \
- break; \
- \
- case H5T_CONV_FREE: \
- /* Print and free statistics */ \
- CI_PRINT_STATS(STYPE,DTYPE); \
- CI_FREE_PRIV \
- break; \
- \
- case H5T_CONV_CONV: \
- /* Initialize source & destination strides */ \
- if (buf_stride) { \
- HDassert(buf_stride >= sizeof(ST)); \
- HDassert(buf_stride >= sizeof(DT)); \
- s_stride = d_stride = (ssize_t)buf_stride; \
- } else { \
- s_stride = sizeof(ST); \
- d_stride = sizeof(DT); \
- } \
- \
- /* Is alignment required for source or dest? */ \
- s_mv = H5T_NATIVE_##STYPE##_ALIGN_g>1 && \
- ((size_t)buf%H5T_NATIVE_##STYPE##_ALIGN_g || \
- /* Cray */ ((size_t)((ST*)buf)!=(size_t)buf) || \
- (size_t)s_stride%H5T_NATIVE_##STYPE##_ALIGN_g); \
- d_mv = H5T_NATIVE_##DTYPE##_ALIGN_g>1 && \
- ((size_t)buf%H5T_NATIVE_##DTYPE##_ALIGN_g || \
- /* Cray */ ((size_t)((DT*)buf)!=(size_t)buf) || \
- (size_t)d_stride%H5T_NATIVE_##DTYPE##_ALIGN_g); \
- CI_INC_SRC(s_mv) \
- CI_INC_DST(d_mv) \
- \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
+ "unable to dereference datatype object ID") \
+ if (st->shared->size!=sizeof(ST) || dt->shared->size!=sizeof(DT)) \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
+ "disagreement about datatype size") \
+ CI_ALLOC_PRIV \
+ break; \
+ \
+ case H5T_CONV_FREE: \
+ /* Print and free statistics */ \
+ CI_PRINT_STATS(STYPE,DTYPE); \
+ CI_FREE_PRIV \
+ break; \
+ \
+ case H5T_CONV_CONV: \
+ /* Initialize source & destination strides */ \
+ if (buf_stride) { \
+ HDassert(buf_stride >= sizeof(ST)); \
+ HDassert(buf_stride >= sizeof(DT)); \
+ s_stride = d_stride = (ssize_t)buf_stride; \
+ } else { \
+ s_stride = sizeof(ST); \
+ d_stride = sizeof(DT); \
+ } \
+ \
+ /* Is alignment required for source or dest? */ \
+ s_mv = H5T_NATIVE_##STYPE##_ALIGN_g>1 && \
+ ((size_t)buf%H5T_NATIVE_##STYPE##_ALIGN_g || \
+ /* Cray */ ((size_t)((ST*)buf)!=(size_t)buf) || \
+ (size_t)s_stride%H5T_NATIVE_##STYPE##_ALIGN_g); \
+ d_mv = H5T_NATIVE_##DTYPE##_ALIGN_g>1 && \
+ ((size_t)buf%H5T_NATIVE_##DTYPE##_ALIGN_g || \
+ /* Cray */ ((size_t)((DT*)buf)!=(size_t)buf) || \
+ (size_t)d_stride%H5T_NATIVE_##DTYPE##_ALIGN_g); \
+ CI_INC_SRC(s_mv) \
+ CI_INC_DST(d_mv) \
+ \
/* Get conversion exception callback property */ \
if(H5CX_get_dt_conv_cb(&cb_struct) < 0) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback") \
\
- /* Get source and destination datatypes */ \
+ /* Get source and destination datatypes */ \
if(NULL == (st = (H5T_t *)H5I_object(src_id)) || NULL == (dt = (H5T_t *)H5I_object(dst_id))) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to dereference datatype object ID") \
- \
+ \
H5T_CONV_SET_PREC(PREC) /*init precision variables, or not */ \
\
/* The outer loop of the type conversion macro, controlling which */ \
- /* direction the buffer is walked */ \
- while (nelmts>0) { \
- /* Check if we need to go backwards through the buffer */ \
- if(d_stride>s_stride) { \
+ /* direction the buffer is walked */ \
+ while (nelmts>0) { \
+ /* Check if we need to go backwards through the buffer */ \
+ if(d_stride>s_stride) { \
/* Compute the number of "safe" destination elements at */ \
/* the end of the buffer (Those which don't overlap with */ \
/* any source elements at the beginning of the buffer) */ \
safe = nelmts - (((nelmts * (size_t)s_stride) + (size_t)(d_stride - 1)) / (size_t)d_stride); \
- \
+ \
/* If we're down to the last few elements, just wrap up */ \
- /* with a "real" reverse copy */ \
- if(safe<2) { \
+ /* with a "real" reverse copy */ \
+ if(safe<2) { \
src = (ST *)(src_buf = (void *)((uint8_t *)buf + (nelmts - 1) * (size_t)s_stride)); \
dst = (DT *)(dst_buf = (void *)((uint8_t *)buf + (nelmts - 1) * (size_t)d_stride)); \
- s_stride = -s_stride; \
- d_stride = -d_stride; \
- \
- safe=nelmts; \
- } /* end if */ \
- else { \
+ s_stride = -s_stride; \
+ d_stride = -d_stride; \
+ \
+ safe=nelmts; \
+ } /* end if */ \
+ else { \
src = (ST *)(src_buf = (void *)((uint8_t *)buf + (nelmts - safe) * (size_t)s_stride)); \
dst = (DT *)(dst_buf = (void *)((uint8_t *)buf + (nelmts - safe) * (size_t)d_stride)); \
- } /* end else */ \
- } /* end if */ \
- else { \
- /* Single forward pass over all data */ \
- src = (ST *)(src_buf = buf); \
- dst = (DT *)(dst_buf = buf); \
- safe=nelmts; \
- } /* end else */ \
+ } /* end else */ \
+ } /* end if */ \
+ else { \
+ /* Single forward pass over all data */ \
+ src = (ST *)(src_buf = buf); \
+ dst = (DT *)(dst_buf = buf); \
+ safe=nelmts; \
+ } /* end else */ \
\
- /* Perform loop over elements to convert */ \
- if (s_mv && d_mv) { \
- /* Alignment is required for both source and dest */ \
- s = &src_aligned; \
+ /* Perform loop over elements to convert */ \
+ if (s_mv && d_mv) { \
+ /* Alignment is required for both source and dest */ \
+ s = &src_aligned; \
H5T_CONV_LOOP_OUTER(PRE_SALIGN,PRE_DALIGN,POST_SALIGN,POST_DALIGN,GUTS,STYPE,DTYPE,s,d,ST,DT,D_MIN,D_MAX) \
- } else if(s_mv) { \
- /* Alignment is required only for source */ \
- s = &src_aligned; \
+ } else if(s_mv) { \
+ /* Alignment is required only for source */ \
+ s = &src_aligned; \
H5T_CONV_LOOP_OUTER(PRE_SALIGN,PRE_DNOALIGN,POST_SALIGN,POST_DNOALIGN,GUTS,STYPE,DTYPE,s,dst,ST,DT,D_MIN,D_MAX) \
- } else if(d_mv) { \
- /* Alignment is required only for destination */ \
+ } else if(d_mv) { \
+ /* Alignment is required only for destination */ \
H5T_CONV_LOOP_OUTER(PRE_SNOALIGN,PRE_DALIGN,POST_SNOALIGN,POST_DALIGN,GUTS,STYPE,DTYPE,src,d,ST,DT,D_MIN,D_MAX) \
- } else { \
+ } else { \
/* Alignment is not required for both source and destination */ \
H5T_CONV_LOOP_OUTER(PRE_SNOALIGN,PRE_DNOALIGN,POST_SNOALIGN,POST_DNOALIGN,GUTS,STYPE,DTYPE,src,dst,ST,DT,D_MIN,D_MAX) \
- } \
- \
- /* Decrement number of elements left to convert */ \
- nelmts-=safe; \
- } /* end while */ \
- break; \
- \
- default: \
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \
- "unknown conversion command"); \
- } \
+ } \
+ \
+ /* Decrement number of elements left to convert */ \
+ nelmts-=safe; \
+ } /* end while */ \
+ break; \
+ \
+ default: \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \
+ "unknown conversion command"); \
+ } \
} \
- \
+ \
done: \
FUNC_LEAVE_NOAPI(ret_value) \
}
@@ -799,9 +799,9 @@ done: \
#define H5T_CONV_DECL_PREC(PREC) H5_GLUE(H5T_CONV_DECL_PREC_, PREC)
#define H5T_CONV_DECL_PREC_Y \
- size_t sprec; /*source precision */ \
- size_t dprec; /*destination precision */ \
- H5T_class_t tclass; /*datatype's class */
+ size_t sprec; /*source precision */ \
+ size_t dprec; /*destination precision */ \
+ H5T_class_t tclass; /*datatype's class */
#define H5T_CONV_DECL_PREC_N /*no precision variables */
@@ -809,60 +809,60 @@ done: \
#define H5T_CONV_SET_PREC(PREC) H5_GLUE(H5T_CONV_SET_PREC_, PREC)
#define H5T_CONV_SET_PREC_Y \
- /* Get source & destination precisions into a variable */ \
- tclass = st->shared->type; \
- HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
- if(tclass == H5T_INTEGER) \
- sprec = st->shared->u.atomic.prec; \
- else \
- sprec = 1 + st->shared->u.atomic.u.f.msize; \
- tclass = dt->shared->type; \
- HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
- if(tclass == H5T_INTEGER) \
- dprec = dt->shared->u.atomic.prec; \
- else \
+ /* Get source & destination precisions into a variable */ \
+ tclass = st->shared->type; \
+ HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
+ if(tclass == H5T_INTEGER) \
+ sprec = st->shared->u.atomic.prec; \
+ else \
+ sprec = 1 + st->shared->u.atomic.u.f.msize; \
+ tclass = dt->shared->type; \
+ HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
+ if(tclass == H5T_INTEGER) \
+ dprec = dt->shared->u.atomic.prec; \
+ else \
dprec = 1 + dt->shared->u.atomic.u.f.msize;
#define H5T_CONV_SET_PREC_N /*don't init precision variables */
/* Macro defining action on source data which needs to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_SALIGN(ST) { \
- H5MM_memcpy(&src_aligned, src, sizeof(ST)); \
+#define H5T_CONV_LOOP_PRE_SALIGN(ST) { \
+ H5MM_memcpy(&src_aligned, src, sizeof(ST)); \
}
/* Macro defining action on source data which doesn't need to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_SNOALIGN(ST) { \
+#define H5T_CONV_LOOP_PRE_SNOALIGN(ST) { \
}
/* Macro defining action on destination data which needs to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_DALIGN(DT) { \
- d = &dst_aligned; \
+#define H5T_CONV_LOOP_PRE_DALIGN(DT) { \
+ d = &dst_aligned; \
}
/* Macro defining action on destination data which doesn't need to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_DNOALIGN(DT) { \
+#define H5T_CONV_LOOP_PRE_DNOALIGN(DT) { \
}
/* Macro defining action on source data which needs to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_SALIGN(ST) { \
+#define H5T_CONV_LOOP_POST_SALIGN(ST) { \
}
/* Macro defining action on source data which doesn't need to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_SNOALIGN(ST) { \
+#define H5T_CONV_LOOP_POST_SNOALIGN(ST) { \
}
/* Macro defining action on destination data which needs to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_DALIGN(DT) { \
- H5MM_memcpy(dst, &dst_aligned, sizeof(DT)); \
+#define H5T_CONV_LOOP_POST_DALIGN(DT) { \
+ H5MM_memcpy(dst, &dst_aligned, sizeof(DT)); \
}
/* Macro defining action on destination data which doesn't need to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_DNOALIGN(DT) { \
+#define H5T_CONV_LOOP_POST_DNOALIGN(DT) { \
}
/* The outer wrapper for the type conversion loop, to check for an exception handling routine */
#define H5T_CONV_LOOP_OUTER(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
- if(cb_struct.func) { \
+ if(cb_struct.func) { \
H5T_CONV_LOOP(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
} \
else { \
@@ -871,36 +871,36 @@ done: \
/* The inner loop of the type conversion macro, actually converting the elements */
#define H5T_CONV_LOOP(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
- for (elmtno=0; elmtno<safe; elmtno++) { \
- /* Handle source pre-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,PRE_SALIGN_GUTS)(ST) \
+ for (elmtno=0; elmtno<safe; elmtno++) { \
+ /* Handle source pre-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,PRE_SALIGN_GUTS)(ST) \
\
- /* Handle destination pre-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,PRE_DALIGN_GUTS)(DT) \
+ /* Handle destination pre-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,PRE_DALIGN_GUTS)(DT) \
\
- /* ... user-defined stuff here -- the conversion ... */ \
- H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
+ /* ... user-defined stuff here -- the conversion ... */ \
+ H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
\
- /* Handle source post-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,POST_SALIGN_GUTS)(ST) \
+ /* Handle source post-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,POST_SALIGN_GUTS)(ST) \
\
- /* Handle destination post-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,POST_DALIGN_GUTS)(DT) \
+ /* Handle destination post-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,POST_DALIGN_GUTS)(DT) \
\
- /* Advance pointers */ \
- src_buf = (void *)((uint8_t *)src_buf + s_stride); \
- src = (ST *)src_buf; \
- dst_buf = (void *)((uint8_t *)dst_buf + d_stride); \
- dst = (DT *)dst_buf; \
+ /* Advance pointers */ \
+ src_buf = (void *)((uint8_t *)src_buf + s_stride); \
+ src = (ST *)src_buf; \
+ dst_buf = (void *)((uint8_t *)dst_buf + d_stride); \
+ dst = (DT *)dst_buf; \
}
/* Macro to call the actual "guts" of the type conversion, or call the "no exception" guts */
#ifdef H5_WANT_DCONV_EXCEPTION
-#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
- /* ... user-defined stuff here -- the conversion ... */ \
+#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
+ /* ... user-defined stuff here -- the conversion ... */ \
H5_GLUE(GUTS,_CORE)(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX)
#else /* H5_WANT_DCONV_EXCEPTION */
-#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
+#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
H5_GLUE(H5T_CONV_NO_EXCEPT,_CORE)(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX)
#endif /* H5_WANT_DCONV_EXCEPTION */
@@ -908,27 +908,27 @@ done: \
#ifdef H5T_DEBUG
/* Print alignment statistics */
-# define CI_PRINT_STATS(STYPE,DTYPE) { \
- if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \
- HDfprintf(H5DEBUG(T), \
- " %Hu src elements aligned on %lu-byte boundaries\n", \
- ((H5T_conv_hw_t *)cdata->priv)->s_aligned, \
- (unsigned long)H5T_NATIVE_##STYPE##_ALIGN_g); \
- } \
- if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \
- HDfprintf(H5DEBUG(T), \
- " %Hu dst elements aligned on %lu-byte boundaries\n", \
- ((H5T_conv_hw_t *)cdata->priv)->d_aligned, \
- (unsigned long)H5T_NATIVE_##DTYPE##_ALIGN_g); \
- } \
+# define CI_PRINT_STATS(STYPE,DTYPE) { \
+ if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \
+ HDfprintf(H5DEBUG(T), \
+ " %Hu src elements aligned on %lu-byte boundaries\n", \
+ ((H5T_conv_hw_t *)cdata->priv)->s_aligned, \
+ (unsigned long)H5T_NATIVE_##STYPE##_ALIGN_g); \
+ } \
+ if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \
+ HDfprintf(H5DEBUG(T), \
+ " %Hu dst elements aligned on %lu-byte boundaries\n", \
+ ((H5T_conv_hw_t *)cdata->priv)->d_aligned, \
+ (unsigned long)H5T_NATIVE_##DTYPE##_ALIGN_g); \
+ } \
}
/* Allocate private alignment structure for atomic types */
# define CI_ALLOC_PRIV \
- if (NULL==(cdata->priv=H5MM_calloc(sizeof(H5T_conv_hw_t)))) { \
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \
- "memory allocation failed"); \
- }
+ if (NULL==(cdata->priv=H5MM_calloc(sizeof(H5T_conv_hw_t)))) { \
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \
+ "memory allocation failed"); \
+ }
/* Free private alignment structure for atomic types */
# define CI_FREE_PRIV \
@@ -960,25 +960,25 @@ done: \
/* Conversion data for H5T__conv_struct() */
typedef struct H5T_conv_struct_t {
- int *src2dst; /*mapping from src to dst member num */
- hid_t *src_memb_id; /*source member type ID's */
- hid_t *dst_memb_id; /*destination member type ID's */
- H5T_path_t **memb_path; /*conversion path for each member */
+ int *src2dst; /*mapping from src to dst member num */
+ hid_t *src_memb_id; /*source member type ID's */
+ hid_t *dst_memb_id; /*destination member type ID's */
+ H5T_path_t **memb_path; /*conversion path for each member */
H5T_subset_info_t subset_info; /*info related to compound subsets */
unsigned src_nmembs; /*needed by free function */
} H5T_conv_struct_t;
/* Conversion data for H5T__conv_enum() */
typedef struct H5T_enum_struct_t {
- int base; /*lowest `in' value */
- unsigned length; /*num elements in arrays */
- int *src2dst; /*map from src to dst index */
+ int base; /*lowest `in' value */
+ unsigned length; /*num elements in arrays */
+ int *src2dst; /*map from src to dst index */
} H5T_enum_struct_t;
/* Conversion data for the hardware conversion functions */
typedef struct H5T_conv_hw_t {
- size_t s_aligned; /*number source elements aligned */
- size_t d_aligned; /*number destination elements aligned*/
+ size_t s_aligned; /*number source elements aligned */
+ size_t d_aligned; /*number destination elements aligned*/
} H5T_conv_hw_t;
/********************/
@@ -992,7 +992,7 @@ typedef struct H5T_conv_hw_t {
static herr_t H5T__reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order);
-
+
/*********************/
/* Public Variables */
/*********************/
@@ -1021,17 +1021,17 @@ H5FL_BLK_DEFINE_STATIC(array_seq);
/* Declare a free list to manage pieces of reference data */
H5FL_BLK_DEFINE_STATIC(ref_seq);
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_noop
+ * Function: H5T__conv_noop
*
- * Purpose: The no-op conversion. The library knows about this
- * conversion without it being registered.
+ * Purpose: The no-op conversion. The library knows about this
+ * conversion without it being registered.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Wednesday, January 14, 1998
+ * Programmer: Robb Matzke
+ * Wednesday, January 14, 1998
*
*-------------------------------------------------------------------------
*/
@@ -1065,20 +1065,20 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_noop() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_order_opt
+ * Function: H5T__conv_order_opt
*
- * Purpose: Convert one type to another when byte order is the only
- * difference. This is the optimized version of H5T__conv_order()
+ * Purpose: Convert one type to another when byte order is the only
+ * difference. This is the optimized version of H5T__conv_order()
* for a handful of different sizes.
*
- * Note: This is a soft conversion function.
+ * Note: This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, January 25, 2002
+ * Programmer: Robb Matzke
+ * Friday, January 25, 2002
*
*-------------------------------------------------------------------------
*/
@@ -1088,9 +1088,9 @@ H5T__conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *background)
{
- uint8_t *buf = (uint8_t*)_buf;
- H5T_t *src = NULL;
- H5T_t *dst = NULL;
+ uint8_t *buf = (uint8_t*)_buf;
+ H5T_t *src = NULL;
+ H5T_t *dst = NULL;
size_t i;
herr_t ret_value = SUCCEED; /* Return value */
@@ -1480,30 +1480,30 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T__conv_order
+ * Function: H5T__conv_order
*
- * Purpose: Convert one type to another when byte order is the only
- * difference.
+ * Purpose: Convert one type to another when byte order is the only
+ * difference.
*
- * Note: This is a soft conversion function.
+ * Note: This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, January 13, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, January 13, 1998
*
*-------------------------------------------------------------------------
*/
herr_t
H5T__conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
- size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
+ size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *background)
{
- uint8_t *buf = (uint8_t*)_buf;
- H5T_t *src = NULL;
- H5T_t *dst = NULL;
- size_t i;
- size_t j, md;
+ uint8_t *buf = (uint8_t*)_buf;
+ H5T_t *src = NULL;
+ H5T_t *dst = NULL;
+ size_t i;
+ size_t j, md;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1580,34 +1580,34 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_order() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_b_b
+ * Function: H5T__conv_b_b
*
- * Purpose: Convert from one bitfield to any other bitfield.
+ * Purpose: Convert from one bitfield to any other bitfield.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, May 20, 1999
+ * Programmer: Robb Matzke
+ * Thursday, May 20, 1999
*
*-------------------------------------------------------------------------
*/
herr_t
H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
- size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
+ size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *background)
{
- uint8_t *buf = (uint8_t*)_buf;
- H5T_t *src = NULL, *dst = NULL; /*source and dest datatypes */
- ssize_t direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t olap; /*num overlapping elements */
- size_t half_size; /*1/2 of total size for swapping*/
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8_t dbuf[256]; /*temp destination buffer */
- size_t msb_pad_offset; /*offset for dest MSB padding */
- size_t i;
+ uint8_t *buf = (uint8_t*)_buf;
+ H5T_t *src = NULL, *dst = NULL; /*source and dest datatypes */
+ ssize_t direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t olap; /*num overlapping elements */
+ size_t half_size; /*1/2 of total size for swapping*/
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ uint8_t dbuf[256]; /*temp destination buffer */
+ size_t msb_pad_offset; /*offset for dest MSB padding */
+ size_t i;
uint8_t *src_rev=NULL; /*order-reversed source buffer */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
@@ -1822,17 +1822,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_b_b() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct_free
+ * Function: H5T__conv_struct_free
*
- * Purpose: Free the private data structure used by the compound
+ * Purpose: Free the private data structure used by the compound
* conversion functions.
*
- * Return: The result of H5MM_xfree(priv) (NULL)
+ * Return: The result of H5MM_xfree(priv) (NULL)
*
- * Programmer: Neil Fortner
- * Wednesday, October 1, 2008
+ * Programmer: Neil Fortner
+ * Wednesday, October 1, 2008
*
*-------------------------------------------------------------------------
*/
@@ -1864,24 +1864,24 @@ H5T__conv_struct_free(H5T_conv_struct_t *priv)
FUNC_LEAVE_NOAPI((H5T_conv_struct_t *)H5MM_xfree(priv))
} /* end H5T__conv_struct_free() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct_init
+ * Function: H5T__conv_struct_init
*
- * Purpose: Initialize the `priv' field of `cdata' with conversion
- * information that is relatively constant. If `priv' is
- * already initialized then the member conversion functions
- * are recalculated.
+ * Purpose: Initialize the `priv' field of `cdata' with conversion
+ * information that is relatively constant. If `priv' is
+ * already initialized then the member conversion functions
+ * are recalculated.
*
- * Priv fields are indexed by source member number or
- * destination member number depending on whether the field
- * contains information about the source datatype or the
- * destination datatype (fields that contains the same
- * information for both source and destination are indexed by
- * source member number). The src2dst[] priv array maps source
- * member numbers to destination member numbers, but if the
- * source member doesn't have a corresponding destination member
- * then the src2dst[i]=-1.
+ * Priv fields are indexed by source member number or
+ * destination member number depending on whether the field
+ * contains information about the source datatype or the
+ * destination datatype (fields that contains the same
+ * information for both source and destination are indexed by
+ * source member number). The src2dst[] priv array maps source
+ * member numbers to destination member numbers, but if the
+ * source member doesn't have a corresponding destination member
+ * then the src2dst[i]=-1.
*
* Special optimization case when the source and destination
* members are a subset of each other, and the order is the same,
@@ -1904,20 +1904,20 @@ H5T__conv_struct_free(H5T_conv_struct_t *priv)
* The optimization is simply moving data to the appropriate
* places in the buffer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Monday, January 26, 1998
+ * Programmer: Robb Matzke
+ * Monday, January 26, 1998
*
*-------------------------------------------------------------------------
*/
static herr_t
H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
{
- H5T_conv_struct_t *priv = (H5T_conv_struct_t*)(cdata->priv);
- int *src2dst = NULL;
+ H5T_conv_struct_t *priv = (H5T_conv_struct_t*)(cdata->priv);
+ int *src2dst = NULL;
unsigned src_nmembs, dst_nmembs;
- unsigned i, j;
+ unsigned i, j;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1964,8 +1964,8 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
} /* end if */
} /* end for */
if(src2dst[i] >= 0) {
- hid_t tid;
- H5T_t *type;
+ hid_t tid;
+ H5T_t *type;
type = H5T_copy(src->shared->u.compnd.memb[i].type, H5T_COPY_ALL);
tid = H5I_register(H5I_DATATYPE, type, FALSE);
@@ -2055,9 +2055,9 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_struct_init() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct_subset
+ * Function: H5T__conv_struct_subset
*
* Purpose: A quick way to return a field in a struct private in this
* file. The flag SMEMBS_SUBSET indicates whether the source
@@ -2075,15 +2075,15 @@ done:
* Return: A pointer to the subset info struct in p. Points directly
* into the structure.
*
- * Programmer: Raymond Lu
- * 8 June 2007
+ * Programmer: Raymond Lu
+ * 8 June 2007
*
*-------------------------------------------------------------------------
*/
H5T_subset_info_t *
H5T__conv_struct_subset(const H5T_cdata_t *cdata)
{
- H5T_conv_struct_t *priv = NULL;
+ H5T_conv_struct_t *priv = NULL;
FUNC_ENTER_PACKAGE_NOERR
@@ -2095,30 +2095,30 @@ H5T__conv_struct_subset(const H5T_cdata_t *cdata)
FUNC_LEAVE_NOAPI((H5T_subset_info_t *) &priv->subset_info)
} /* end H5T__conv_struct_subset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct
+ * Function: H5T__conv_struct
*
- * Purpose: Converts between compound datatypes. This is a soft
- * conversion function. The algorithm is basically:
+ * Purpose: Converts between compound datatypes. This is a soft
+ * conversion function. The algorithm is basically:
*
- * For each element do
- * For I=1..NELMTS do
- * If sizeof destination type <= sizeof source type then
- * Convert member to destination type;
- * Move member as far left as possible;
+ * For each element do
+ * For I=1..NELMTS do
+ * If sizeof destination type <= sizeof source type then
+ * Convert member to destination type;
+ * Move member as far left as possible;
*
- * For I=NELMTS..1 do
- * If not destination type then
- * Convert member to destination type;
- * Move member to correct position in BKG
+ * For I=NELMTS..1 do
+ * If not destination type then
+ * Convert member to destination type;
+ * Move member to correct position in BKG
*
- * Copy BKG to BUF
+ * Copy BKG to BUF
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, January 22, 1998
+ * Programmer: Robb Matzke
+ * Thursday, January 22, 1998
*
*-------------------------------------------------------------------------
*/
@@ -2126,20 +2126,20 @@ herr_t
H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg)
{
- uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
- uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
+ uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
+ uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
uint8_t *xbuf = buf, *xbkg = bkg; /*temp pointers into buf and bkg*/
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- int *src2dst = NULL; /*maps src member to dst member */
- H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
- H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
- size_t offset; /*byte offset wrt struct */
- ssize_t src_delta; /*source stride */
- ssize_t bkg_delta; /*background stride */
- size_t elmtno;
- unsigned u; /*counters */
- int i; /*counters */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ int *src2dst = NULL; /*maps src member to dst member */
+ H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
+ H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
+ size_t offset; /*byte offset wrt struct */
+ ssize_t src_delta; /*source stride */
+ ssize_t bkg_delta; /*background stride */
+ size_t elmtno;
+ unsigned u; /*counters */
+ int i; /*counters */
H5T_conv_struct_t *priv = (H5T_conv_struct_t *)(cdata->priv);
herr_t ret_value = SUCCEED; /* Return value */
@@ -2305,29 +2305,29 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_struct() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct_opt
+ * Function: H5T__conv_struct_opt
*
- * Purpose: Converts between compound datatypes in a manner more
- * efficient than the general-purpose H5T__conv_struct()
- * function. This function isn't applicable if the destination
- * is larger than the source type. This is a soft conversion
- * function. The algorithm is basically:
+ * Purpose: Converts between compound datatypes in a manner more
+ * efficient than the general-purpose H5T__conv_struct()
+ * function. This function isn't applicable if the destination
+ * is larger than the source type. This is a soft conversion
+ * function. The algorithm is basically:
*
- * For each member of the struct
- * If sizeof destination type <= sizeof source type then
- * Convert member to destination type for all elements
- * Move memb to BKG buffer for all elements
- * Else
- * Move member as far left as possible for all elements
+ * For each member of the struct
+ * If sizeof destination type <= sizeof source type then
+ * Convert member to destination type for all elements
+ * Move memb to BKG buffer for all elements
+ * Else
+ * Move member as far left as possible for all elements
*
- * For each member of the struct (in reverse order)
- * If not destination type then
- * Convert member to destination type for all elements
- * Move member to correct position in BKG for all elements
+ * For each member of the struct (in reverse order)
+ * If not destination type then
+ * Convert member to destination type for all elements
+ * Move member to correct position in BKG for all elements
*
- * Copy BKG to BUF for all elements
+ * Copy BKG to BUF for all elements
*
* Special case when the source and destination members
* are a subset of each other, and the order is the same, and no
@@ -2342,10 +2342,10 @@ done:
* The optimization is simply moving data to the appropriate
* places in the buffer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, January 22, 1998
+ * Programmer: Robb Matzke
+ * Thursday, January 22, 1998
*
*-------------------------------------------------------------------------
*/
@@ -2353,22 +2353,22 @@ herr_t
H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg)
{
- uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
- uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
- uint8_t *xbuf = NULL; /*temporary pointer into `buf' */
- uint8_t *xbkg = NULL; /*temporary pointer into `bkg' */
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- int *src2dst = NULL; /*maps src member to dst member */
- H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
- H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
- size_t offset; /*byte offset wrt struct */
- size_t elmtno; /*element counter */
+ uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
+ uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
+ uint8_t *xbuf = NULL; /*temporary pointer into `buf' */
+ uint8_t *xbkg = NULL; /*temporary pointer into `bkg' */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ int *src2dst = NULL; /*maps src member to dst member */
+ H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
+ H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
+ size_t offset; /*byte offset wrt struct */
+ size_t elmtno; /*element counter */
size_t copy_size; /*size of element for copying */
- H5T_conv_struct_t *priv = NULL; /*private data */
+ H5T_conv_struct_t *priv = NULL; /*private data */
hbool_t no_stride = FALSE; /*flag to indicate no stride */
- unsigned u; /*counters */
- int i; /*counters */
+ unsigned u; /*counters */
+ int i; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2577,17 +2577,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_struct_opt() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_enum_init
+ * Function: H5T__conv_enum_init
*
- * Purpose: Initialize information for H5T__conv_enum().
+ * Purpose: Initialize information for H5T__conv_enum().
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, January 4, 1999
*
*-------------------------------------------------------------------------
@@ -2595,21 +2595,21 @@ done:
static herr_t
H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
{
- H5T_enum_struct_t *priv = NULL; /*private conversion data */
- int n; /*src value cast as native int */
- int domain[2] = {0, 0}; /*min and max source values */
- int *map = NULL; /*map from src value to dst idx */
- unsigned length; /*nelmts in map array */
- unsigned i, j; /*counters */
+ H5T_enum_struct_t *priv = NULL; /*private conversion data */
+ int n; /*src value cast as native int */
+ int domain[2] = {0, 0}; /*min and max source values */
+ int *map = NULL; /*map from src value to dst idx */
+ unsigned length; /*nelmts in map array */
+ unsigned i, j; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
cdata->need_bkg = H5T_BKG_NO;
if(NULL == (priv = (H5T_enum_struct_t *)(cdata->priv = H5MM_calloc(sizeof(*priv)))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
if(0 == src->shared->u.enumer.nmembs)
- HGOTO_DONE(SUCCEED);
+ HGOTO_DONE(SUCCEED);
/*
* Check that the source symbol names are a subset of the destination
@@ -2619,16 +2619,16 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
H5T__sort_name(src, NULL);
H5T__sort_name(dst, NULL);
if(NULL == (priv->src2dst = (int *)H5MM_malloc(src->shared->u.enumer.nmembs * sizeof(int))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
for(i = 0, j = 0;
i < src->shared->u.enumer.nmembs && j < dst->shared->u.enumer.nmembs;
i++, j++) {
- while(j < dst->shared->u.enumer.nmembs &&
- HDstrcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j]))
+ while(j < dst->shared->u.enumer.nmembs &&
+ HDstrcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j]))
j++;
- if(j >= dst->shared->u.enumer.nmembs)
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "source type is not a subset of destination type")
- priv->src2dst[i] = (int)j;
+ if(j >= dst->shared->u.enumer.nmembs)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "source type is not a subset of destination type")
+ priv->src2dst[i] = (int)j;
} /* end for */
/*
@@ -2636,12 +2636,12 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
* value converted. However, if all of the following constraints are met
* then we can build a perfect hash table and use an O(1) lookup method.
*
- * A: The source datatype size matches one of our native datatype
- * sizes.
+ * A: The source datatype size matches one of our native datatype
+ * sizes.
*
- * B: After casting the source value bit pattern to a native type
- * the size of the range of values is less than 20% larger than
- * the number of values.
+ * B: After casting the source value bit pattern to a native type
+ * the size of the range of values is less than 20% larger than
+ * the number of values.
*
* If this special case is met then we use the source bit pattern cast as
* a native integer type as an index into the `val2dst'. The values of
@@ -2658,53 +2658,53 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
* situations. SLU - 2011/5/24)
*/
if(1 == src->shared->size || sizeof(short) == src->shared->size || sizeof(int) == src->shared->size) {
- for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
- if(1 == src->shared->size)
- n = *((signed char *)((uint8_t *)src->shared->u.enumer.value + i));
- else if (sizeof(short) == src->shared->size)
- n = *((short *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
- else
- n = *((int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
- if(0 == i) {
- domain[0] = domain[1] = n;
- } else {
- domain[0] = MIN(domain[0], n);
- domain[1] = MAX(domain[1], n);
- }
- } /* end for */
+ for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
+ if(1 == src->shared->size)
+ n = *((signed char *)((uint8_t *)src->shared->u.enumer.value + i));
+ else if (sizeof(short) == src->shared->size)
+ n = *((short *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
+ else
+ n = *((int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
+ if(0 == i) {
+ domain[0] = domain[1] = n;
+ } else {
+ domain[0] = MIN(domain[0], n);
+ domain[1] = MAX(domain[1], n);
+ }
+ } /* end for */
HDassert(domain[1] >= domain[0]);
- length = (unsigned)(domain[1] - domain[0]) + 1;
- if(src->shared->u.enumer.nmembs < 2 ||
+ length = (unsigned)(domain[1] - domain[0]) + 1;
+ if(src->shared->u.enumer.nmembs < 2 ||
(double)length / src->shared->u.enumer.nmembs < (double)(1.2f)) {
- priv->base = domain[0];
- priv->length = length;
- if(NULL == (map = (int *)H5MM_malloc(length * sizeof(int))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- for(i = 0; i < length; i++)
+ priv->base = domain[0];
+ priv->length = length;
+ if(NULL == (map = (int *)H5MM_malloc(length * sizeof(int))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ for(i = 0; i < length; i++)
map[i] = -1; /*entry unused*/
- for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
- if(1 == src->shared->size)
- n = *((signed char *)((uint8_t *)src->shared->u.enumer.value + i));
- else if(sizeof(short) == src->shared->size)
- n = *((short *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
- else
- n = *((int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
- n -= priv->base;
- HDassert(n >= 0 && (unsigned)n < priv->length);
- HDassert(map[n] < 0);
- map[n] = priv->src2dst[i];
- } /* end for */
-
- /*
- * Replace original src2dst array with our new one. The original
- * was indexed by source member number while the new one is
- * indexed by source values.
- */
- H5MM_xfree(priv->src2dst);
- priv->src2dst = map;
- HGOTO_DONE(SUCCEED);
- }
+ for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
+ if(1 == src->shared->size)
+ n = *((signed char *)((uint8_t *)src->shared->u.enumer.value + i));
+ else if(sizeof(short) == src->shared->size)
+ n = *((short *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
+ else
+ n = *((int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
+ n -= priv->base;
+ HDassert(n >= 0 && (unsigned)n < priv->length);
+ HDassert(map[n] < 0);
+ map[n] = priv->src2dst[i];
+ } /* end for */
+
+ /*
+ * Replace original src2dst array with our new one. The original
+ * was indexed by source member number while the new one is
+ * indexed by source values.
+ */
+ H5MM_xfree(priv->src2dst);
+ priv->src2dst = map;
+ HGOTO_DONE(SUCCEED);
+ }
}
/* Sort source type by value and adjust src2dst[] appropriately */
@@ -2712,24 +2712,24 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
done:
if (ret_value<0 && priv) {
- H5MM_xfree(priv->src2dst);
- H5MM_xfree(priv);
- cdata->priv = NULL;
+ H5MM_xfree(priv->src2dst);
+ H5MM_xfree(priv);
+ cdata->priv = NULL;
}
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_enum
+ * Function: H5T__conv_enum
*
- * Purpose: Converts one type of enumerated data to another.
+ * Purpose: Converts one type of enumerated data to another.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, January 4, 1999
*-------------------------------------------------------------------------
*/
@@ -2738,15 +2738,15 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *bkg)
{
- uint8_t *buf = (uint8_t*)_buf; /*cast for pointer arithmetic */
- H5T_t *src = NULL, *dst = NULL; /*src and dst datatypes */
- uint8_t *s = NULL, *d = NULL; /*src and dst BUF pointers */
- ssize_t src_delta, dst_delta; /*conversion strides */
- int n; /*src value cast as native int */
+ uint8_t *buf = (uint8_t*)_buf; /*cast for pointer arithmetic */
+ H5T_t *src = NULL, *dst = NULL; /*src and dst datatypes */
+ uint8_t *s = NULL, *d = NULL; /*src and dst BUF pointers */
+ ssize_t src_delta, dst_delta; /*conversion strides */
+ int n; /*src value cast as native int */
H5T_enum_struct_t *priv = (H5T_enum_struct_t*)(cdata->priv);
H5T_conv_cb_t cb_struct; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
- size_t i; /*counters */
+ size_t i; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2908,30 +2908,30 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_enum() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_enum_numeric
+ * Function: H5T__conv_enum_numeric
*
- * Purpose: Converts enumerated data to a numeric type (integer or
+ * Purpose: Converts enumerated data to a numeric type (integer or
* floating-point number). This function is registered into
* the conversion table twice in H5T_init_interface in H5T.c.
* Once for enum-integer conversion. Once for enum-float conversion.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 12 October 2012
*-------------------------------------------------------------------------
*/
herr_t
H5T__conv_enum_numeric(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
- size_t H5_ATTR_UNUSED buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
+ size_t H5_ATTR_UNUSED buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *bkg)
{
- H5T_t *src, *dst; /*src and dst datatypes */
- H5T_t *src_parent; /*parent type for src */
+ H5T_t *src, *dst; /*src and dst datatypes */
+ H5T_t *src_parent; /*parent type for src */
hid_t src_parent_id = -1; /*ID for parent of the source */
H5T_path_t *tpath; /* Conversion information */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2988,28 +2988,28 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_enum_numeric() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_vlen
+ * Function: H5T__conv_vlen
*
- * Purpose: Converts between VL datatypes in memory and on disk.
- * This is a soft conversion function. The algorithm is
- * basically:
+ * Purpose: Converts between VL datatypes in memory and on disk.
+ * This is a soft conversion function. The algorithm is
+ * basically:
*
- * For every VL struct in the main buffer:
- * 1. Allocate space for temporary dst VL data (reuse buffer
- * if possible)
+ * For every VL struct in the main buffer:
+ * 1. Allocate space for temporary dst VL data (reuse buffer
+ * if possible)
* 2. Copy VL data from src buffer into dst buffer
* 3. Convert VL data into dst representation
* 4. Allocate buffer in dst heap
- * 5. Free heap objects storing old data
+ * 5. Free heap objects storing old data
* 6. Write dst VL data into dst heap
* 7. Store (heap ID or pointer) and length in main dst buffer
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Wednesday, May 26, 1999
+ * Programmer: Quincey Koziol
+ * Wednesday, May 26, 1999
*
*-------------------------------------------------------------------------
*/
@@ -3018,27 +3018,27 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t bkg_stride, void *buf, void *bkg)
{
H5T_vlen_alloc_info_t vl_alloc_info;/* VL allocation info */
- H5T_path_t *tpath = NULL; /* Type conversion path */
+ H5T_path_t *tpath = NULL; /* Type conversion path */
hbool_t noop_conv = FALSE; /* Flag to indicate a noop conversion */
hbool_t write_to_file = FALSE; /* Flag to indicate writing to file */
htri_t parent_is_vlen; /* Flag to indicate parent is vlen datatyp */
- size_t bg_seq_len = 0; /* The number of elements in the background sequence */
- hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- uint8_t *s = NULL; /*source buffer */
- uint8_t *d = NULL; /*destination buffer */
- uint8_t *b = NULL; /*background buffer */
- ssize_t s_stride, d_stride; /*src and dst strides */
- ssize_t b_stride; /*bkg stride */
+ size_t bg_seq_len = 0; /* The number of elements in the background sequence */
+ hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ uint8_t *s = NULL; /*source buffer */
+ uint8_t *d = NULL; /*destination buffer */
+ uint8_t *b = NULL; /*background buffer */
+ ssize_t s_stride, d_stride; /*src and dst strides */
+ ssize_t b_stride; /*bkg stride */
size_t safe; /*how many elements are safe to process in each pass */
- size_t src_base_size, dst_base_size;/*source & destination base size*/
- void *conv_buf = NULL; /*temporary conversion buffer */
- size_t conv_buf_size = 0; /*size of conversion buffer in bytes */
- void *tmp_buf = NULL; /*temporary background buffer */
- size_t tmp_buf_size = 0; /*size of temporary bkg buffer */
+ size_t src_base_size, dst_base_size;/*source & destination base size*/
+ void *conv_buf = NULL; /*temporary conversion buffer */
+ size_t conv_buf_size = 0; /*size of conversion buffer in bytes */
+ void *tmp_buf = NULL; /*temporary background buffer */
+ size_t tmp_buf_size = 0; /*size of temporary bkg buffer */
hbool_t nested = FALSE; /*flag of nested VL case */
- size_t elmtno; /*element number counter */
+ size_t elmtno; /*element number counter */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3207,7 +3207,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't set VL data to 'nil'")
} /* end else-if */
else {
- size_t seq_len; /* The number of elements in the current sequence */
+ size_t seq_len; /* The number of elements in the current sequence */
/* Get length of element sequences */
if((*(src->shared->u.vlen.cls->getlen))(src->shared->u.vlen.file, s, &seq_len) < 0)
@@ -3220,7 +3220,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid source pointer")
} /* end if */
else {
- size_t src_size, dst_size; /*source & destination total size in bytes*/
+ size_t src_size, dst_size; /*source & destination total size in bytes*/
src_size = seq_len * src_base_size;
dst_size = seq_len * dst_base_size;
@@ -3228,11 +3228,11 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Check if conversion buffer is large enough, resize if
* necessary. If the SEQ_LEN is 0, allocate a minimal size buffer.
*/
- if(!seq_len && !conv_buf) {
+ if(!seq_len && !conv_buf) {
conv_buf_size = H5T_VLEN_MIN_CONF_BUF_SIZE;
if(NULL == (conv_buf = H5FL_BLK_CALLOC(vlen_seq, conv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
- } /* end if */
+ } /* end if */
else if(conv_buf_size < MAX(src_size, dst_size)) {
/* Only allocate conversion buffer in H5T_VLEN_MIN_CONF_BUF_SIZE increments */
conv_buf_size = ((MAX(src_size, dst_size) / H5T_VLEN_MIN_CONF_BUF_SIZE) + 1) * H5T_VLEN_MIN_CONF_BUF_SIZE;
@@ -3349,17 +3349,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_vlen() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_array
+ * Function: H5T__conv_array
*
- * Purpose: Converts between array datatypes in memory and on disk.
- * This is a soft conversion function.
+ * Purpose: Converts between array datatypes in memory and on disk.
+ * This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Monday, November 6, 2000
+ * Programmer: Quincey Koziol
+ * Monday, November 6, 2000
*
*-------------------------------------------------------------------------
*/
@@ -3367,16 +3367,16 @@ herr_t
H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t bkg_stride, void *_buf, void H5_ATTR_UNUSED *_bkg)
{
- H5T_path_t *tpath; /* Type conversion path */
- hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- uint8_t *sp, *dp; /*source and dest traversal ptrs */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number counter */
+ H5T_path_t *tpath; /* Type conversion path */
+ hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ uint8_t *sp, *dp; /*source and dest traversal ptrs */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number counter */
unsigned u; /* local index variable */
- void *bkg_buf = NULL; /*temporary background buffer */
+ void *bkg_buf = NULL; /*temporary background buffer */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3454,7 +3454,7 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Check if we need a background buffer for this conversion */
if(tpath->cdata.need_bkg) {
- size_t bkg_buf_size; /*size of background buffer in bytes */
+ size_t bkg_buf_size; /*size of background buffer in bytes */
/* Allocate background buffer */
bkg_buf_size = src->shared->u.array.nelem * MAX(src->shared->size, dst->shared->size);
@@ -3696,18 +3696,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_ref() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_i_i
+ * Function: H5T__conv_i_i
*
- * Purpose: Convert one integer type to another. This is the catch-all
- * function for integer conversions and is probably not
- * particularly fast.
+ * Purpose: Convert one integer type to another. This is the catch-all
+ * function for integer conversions and is probably not
+ * particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Wednesday, June 10, 1998
+ * Programmer: Robb Matzke
+ * Wednesday, June 10, 1998
*
*-------------------------------------------------------------------------
*/
@@ -3715,19 +3715,19 @@ herr_t
H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
- size_t olap; /*num overlapping elements */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
+ size_t olap; /*num overlapping elements */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev=NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
- size_t first;
- ssize_t sfirst; /*a signed version of `first' */
- size_t i; /*Local index variables */
+ uint8_t dbuf[64]; /*temp destination buffer */
+ size_t first;
+ ssize_t sfirst; /*a signed version of `first' */
+ size_t i; /*Local index variables */
H5T_conv_cb_t cb_struct={NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
hbool_t reverse; /*if reverse the order of destination */
@@ -4087,18 +4087,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_i_i() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_f_f
+ * Function: H5T__conv_f_f
*
- * Purpose: Convert one floating point type to another. This is a catch
- * all for floating point conversions and is probably not
- * particularly fast!
+ * Purpose: Convert one floating point type to another. This is a catch
+ * all for floating point conversions and is probably not
+ * particularly fast!
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4107,32 +4107,32 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t *src_p; /*source datatype */
- H5T_t *dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t *src_p; /*source datatype */
+ H5T_t *dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
- ssize_t bitno = 0; /*bit number */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ size_t olap; /*num overlapping elements */
+ ssize_t bitno = 0; /*bit number */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t dbuf[64]; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- int64_t expo; /*exponent */
- hssize_t expo_max; /*maximum possible dst exponent */
- size_t msize = 0; /*useful size of mantissa in src*/
- size_t mpos; /*offset to useful mant is src */
+ int64_t expo; /*exponent */
+ hssize_t expo_max; /*maximum possible dst exponent */
+ size_t msize = 0; /*useful size of mantissa in src*/
+ size_t mpos; /*offset to useful mant is src */
uint64_t sign; /*source sign bit value */
- size_t mrsh; /*amount to right shift mantissa*/
- hbool_t carry = FALSE; /*carry after rounding mantissa */
- size_t i; /*miscellaneous counters */
- size_t implied; /*destination implied bits */
+ size_t mrsh; /*amount to right shift mantissa*/
+ hbool_t carry = FALSE; /*carry after rounding mantissa */
+ size_t i; /*miscellaneous counters */
+ size_t implied; /*destination implied bits */
hbool_t denormalized = FALSE; /*is either source or destination denormalized?*/
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
@@ -4396,7 +4396,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*
* Get the exponent as an unsigned quantity from the section of
- * the source bit field where it's located. Don't worry about
+ * the source bit field where it's located. Don't worry about
* the exponent bias yet.
*/
expo = (int64_t)H5T__bit_get_d(s, src.u.f.epos, src.u.f.esize);
@@ -4482,7 +4482,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
else if (expo>=expo_max) {
/*
* The exponent is too large to fit in the available region
- * or it results in the maximum possible value. Use positive
+ * or it results in the maximum possible value. Use positive
* or negative infinity instead unless the application
* specifies something else. Before calling the overflow
* handler make sure the source buffer we hand it is in the
@@ -4674,16 +4674,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_f_f() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_s_s
+ * Function: H5T__conv_s_s
*
- * Purpose: Convert one fixed-length string type to another.
+ * Purpose: Convert one fixed-length string type to another.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, August 7, 1998
+ * Programmer: Robb Matzke
+ * Friday, August 7, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4692,15 +4692,15 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf,
void H5_ATTR_UNUSED *bkg)
{
- H5T_t *src=NULL; /*source datatype */
- H5T_t *dst=NULL; /*destination datatype */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t olap; /*num overlapping elements */
- size_t nchars=0; /*number of characters copied */
- uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/
- uint8_t *dbuf=NULL; /*temp buf for overlap convers. */
+ H5T_t *src=NULL; /*source datatype */
+ H5T_t *dst=NULL; /*destination datatype */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t olap; /*num overlapping elements */
+ size_t nchars=0; /*number of characters copied */
+ uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/
+ uint8_t *dbuf=NULL; /*temp buf for overlap convers. */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -4906,18 +4906,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_s_s() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_uchar
+ * Function: H5T__conv_schar_uchar
*
- * Purpose: Converts `signed char' to `unsigned char'
+ * Purpose: Converts `signed char' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4929,18 +4929,18 @@ H5T__conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(SCHAR, UCHAR, signed char, unsigned char, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_schar
+ * Function: H5T__conv_uchar_schar
*
- * Purpose: Converts `unsigned char' to `signed char'
+ * Purpose: Converts `unsigned char' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4952,18 +4952,18 @@ H5T__conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(UCHAR, SCHAR, unsigned char, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_short
+ * Function: H5T__conv_schar_short
*
- * Purpose: Converts `signed char' to `short'
+ * Purpose: Converts `signed char' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4975,18 +4975,18 @@ H5T__conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, SHORT, signed char, short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ushort
+ * Function: H5T__conv_schar_ushort
*
- * Purpose: Converts `signed char' to `unsigned short'
+ * Purpose: Converts `signed char' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4998,18 +4998,18 @@ H5T__conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, USHORT, signed char, unsigned short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_short
+ * Function: H5T__conv_uchar_short
*
- * Purpose: Converts `unsigned char' to `short'
+ * Purpose: Converts `unsigned char' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5021,18 +5021,18 @@ H5T__conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, SHORT, unsigned char, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ushort
+ * Function: H5T__conv_uchar_ushort
*
- * Purpose: Converts `unsigned char' to `unsigned short'
+ * Purpose: Converts `unsigned char' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5044,18 +5044,18 @@ H5T__conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, USHORT, unsigned char, unsigned short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_int
+ * Function: H5T__conv_schar_int
*
- * Purpose: Converts `signed char' to `int'
+ * Purpose: Converts `signed char' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5067,18 +5067,18 @@ H5T__conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, INT, signed char, int, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_uint
+ * Function: H5T__conv_schar_uint
*
- * Purpose: Converts `signed char' to `unsigned int'
+ * Purpose: Converts `signed char' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5090,18 +5090,18 @@ H5T__conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, UINT, signed char, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_int
+ * Function: H5T__conv_uchar_int
*
- * Purpose: Converts `unsigned char' to `int'
+ * Purpose: Converts `unsigned char' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5113,18 +5113,18 @@ H5T__conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, INT, unsigned char, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_uint
+ * Function: H5T__conv_uchar_uint
*
- * Purpose: Converts `unsigned char' to `unsigned int'
+ * Purpose: Converts `unsigned char' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5136,18 +5136,18 @@ H5T__conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, UINT, unsigned char, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_long
+ * Function: H5T__conv_schar_long
*
- * Purpose: Converts `signed char' to `long'
+ * Purpose: Converts `signed char' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5159,18 +5159,18 @@ H5T__conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, LONG, signed char, long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ulong
+ * Function: H5T__conv_schar_ulong
*
- * Purpose: Converts `signed char' to `unsigned long'
+ * Purpose: Converts `signed char' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5182,18 +5182,18 @@ H5T__conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, ULONG, signed char, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_long
+ * Function: H5T__conv_uchar_long
*
- * Purpose: Converts `unsigned char' to `long'
+ * Purpose: Converts `unsigned char' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5205,18 +5205,18 @@ H5T__conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, LONG, unsigned char, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ulong
+ * Function: H5T__conv_uchar_ulong
*
- * Purpose: Converts `unsigned char' to `unsigned long'
+ * Purpose: Converts `unsigned char' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5228,18 +5228,18 @@ H5T__conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, ULONG, unsigned char, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_llong
+ * Function: H5T__conv_schar_llong
*
- * Purpose: Converts `signed char' to `long long'
+ * Purpose: Converts `signed char' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5251,18 +5251,18 @@ H5T__conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, LLONG, signed char, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ullong
+ * Function: H5T__conv_schar_ullong
*
- * Purpose: Converts `signed char' to `unsigned long long'
+ * Purpose: Converts `signed char' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5274,18 +5274,18 @@ H5T__conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, ULLONG, signed char, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_llong
+ * Function: H5T__conv_uchar_llong
*
- * Purpose: Converts `unsigned char' to `long long'
+ * Purpose: Converts `unsigned char' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5297,18 +5297,18 @@ H5T__conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, LLONG, unsigned char, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ullong
+ * Function: H5T__conv_uchar_ullong
*
- * Purpose: Converts `unsigned char' to `unsigned long long'
+ * Purpose: Converts `unsigned char' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5320,18 +5320,18 @@ H5T__conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, ULLONG, unsigned char, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_schar
+ * Function: H5T__conv_short_schar
*
- * Purpose: Converts `short' to `signed char'
+ * Purpose: Converts `short' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5343,18 +5343,18 @@ H5T__conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(SHORT, SCHAR, short, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_uchar
+ * Function: H5T__conv_short_uchar
*
- * Purpose: Converts `short' to `unsigned char'
+ * Purpose: Converts `short' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5366,18 +5366,18 @@ H5T__conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(SHORT, UCHAR, short, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_schar
+ * Function: H5T__conv_ushort_schar
*
- * Purpose: Converts `unsigned short' to `signed char'
+ * Purpose: Converts `unsigned short' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5389,18 +5389,18 @@ H5T__conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(USHORT, SCHAR, unsigned short, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_uchar
+ * Function: H5T__conv_ushort_uchar
*
- * Purpose: Converts `unsigned short' to `unsigned char'
+ * Purpose: Converts `unsigned short' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5412,18 +5412,18 @@ H5T__conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(USHORT, UCHAR, unsigned short, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ushort
+ * Function: H5T__conv_short_ushort
*
- * Purpose: Converts `short' to `unsigned short'
+ * Purpose: Converts `short' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5435,18 +5435,18 @@ H5T__conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(SHORT, USHORT, short, unsigned short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_short
+ * Function: H5T__conv_ushort_short
*
- * Purpose: Converts `unsigned short' to `short'
+ * Purpose: Converts `unsigned short' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5458,18 +5458,18 @@ H5T__conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(USHORT, SHORT, unsigned short, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_int
+ * Function: H5T__conv_short_int
*
- * Purpose: Converts `short' to `int'
+ * Purpose: Converts `short' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5481,18 +5481,18 @@ H5T__conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SHORT, INT, short, int, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_uint
+ * Function: H5T__conv_short_uint
*
- * Purpose: Converts `short' to `unsigned int'
+ * Purpose: Converts `short' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5504,18 +5504,18 @@ H5T__conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SHORT, UINT, short, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_int
+ * Function: H5T__conv_ushort_int
*
- * Purpose: Converts `unsigned short' to `int'
+ * Purpose: Converts `unsigned short' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5527,18 +5527,18 @@ H5T__conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(USHORT, INT, unsigned short, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_uint
+ * Function: H5T__conv_ushort_uint
*
- * Purpose: Converts `unsigned short' to `unsigned int'
+ * Purpose: Converts `unsigned short' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5550,18 +5550,18 @@ H5T__conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(USHORT, UINT, unsigned short, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_long
+ * Function: H5T__conv_short_long
*
- * Purpose: Converts `short' to `long'
+ * Purpose: Converts `short' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5573,18 +5573,18 @@ H5T__conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SHORT, LONG, short, long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ulong
+ * Function: H5T__conv_short_ulong
*
- * Purpose: Converts `short' to `unsigned long'
+ * Purpose: Converts `short' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5596,18 +5596,18 @@ H5T__conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SHORT, ULONG, short, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_long
+ * Function: H5T__conv_ushort_long
*
- * Purpose: Converts `unsigned short' to `long'
+ * Purpose: Converts `unsigned short' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5619,18 +5619,18 @@ H5T__conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(USHORT, LONG, unsigned short, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ulong
+ * Function: H5T__conv_ushort_ulong
*
- * Purpose: Converts `unsigned short' to `unsigned long'
+ * Purpose: Converts `unsigned short' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5642,18 +5642,18 @@ H5T__conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(USHORT, ULONG, unsigned short, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_llong
+ * Function: H5T__conv_short_llong
*
- * Purpose: Converts `short' to `long long'
+ * Purpose: Converts `short' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5665,18 +5665,18 @@ H5T__conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SHORT, LLONG, short, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ullong
+ * Function: H5T__conv_short_ullong
*
- * Purpose: Converts `short' to `unsigned long long'
+ * Purpose: Converts `short' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5688,18 +5688,18 @@ H5T__conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SHORT, ULLONG, short, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_llong
+ * Function: H5T__conv_ushort_llong
*
- * Purpose: Converts `unsigned short' to `long long'
+ * Purpose: Converts `unsigned short' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5711,18 +5711,18 @@ H5T__conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(USHORT, LLONG, unsigned short, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ullong
+ * Function: H5T__conv_ushort_ullong
*
- * Purpose: Converts `unsigned short' to `unsigned long long'
+ * Purpose: Converts `unsigned short' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5734,18 +5734,18 @@ H5T__conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(USHORT, ULLONG, unsigned short, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_schar
+ * Function: H5T__conv_int_schar
*
- * Purpose: Converts `int' to `signed char'
+ * Purpose: Converts `int' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5757,18 +5757,18 @@ H5T__conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(INT, SCHAR, int, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_uchar
+ * Function: H5T__conv_int_uchar
*
- * Purpose: Converts `int' to `unsigned char'
+ * Purpose: Converts `int' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5780,18 +5780,18 @@ H5T__conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(INT, UCHAR, int, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_schar
+ * Function: H5T__conv_uint_schar
*
- * Purpose: Converts `unsigned int' to `signed char'
+ * Purpose: Converts `unsigned int' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5803,18 +5803,18 @@ H5T__conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(UINT, SCHAR, unsigned, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_uchar
+ * Function: H5T__conv_uint_uchar
*
- * Purpose: Converts `unsigned int' to `unsigned char'
+ * Purpose: Converts `unsigned int' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5826,18 +5826,18 @@ H5T__conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(UINT, UCHAR, unsigned, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_short
+ * Function: H5T__conv_int_short
*
- * Purpose: Converts `int' to `short'
+ * Purpose: Converts `int' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5849,18 +5849,18 @@ H5T__conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(INT, SHORT, int, short, SHRT_MIN, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ushort
+ * Function: H5T__conv_int_ushort
*
- * Purpose: Converts `int' to `unsigned short'
+ * Purpose: Converts `int' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5872,18 +5872,18 @@ H5T__conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(INT, USHORT, int, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_short
+ * Function: H5T__conv_uint_short
*
- * Purpose: Converts `unsigned int' to `short'
+ * Purpose: Converts `unsigned int' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5895,18 +5895,18 @@ H5T__conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(UINT, SHORT, unsigned, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ushort
+ * Function: H5T__conv_uint_ushort
*
- * Purpose: Converts `unsigned int' to `unsigned short'
+ * Purpose: Converts `unsigned int' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5918,18 +5918,18 @@ H5T__conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(UINT, USHORT, unsigned, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_uint
+ * Function: H5T__conv_int_uint
*
- * Purpose: Converts `int' to `unsigned int'
+ * Purpose: Converts `int' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5941,18 +5941,18 @@ H5T__conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(INT, UINT, int, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_int
+ * Function: H5T__conv_uint_int
*
- * Purpose: Converts `unsigned int' to `int'
+ * Purpose: Converts `unsigned int' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5964,18 +5964,18 @@ H5T__conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(UINT, INT, unsigned, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_long
+ * Function: H5T__conv_int_long
*
- * Purpose: Converts `int' to `long'
+ * Purpose: Converts `int' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5987,18 +5987,18 @@ H5T__conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(INT, LONG, int, long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ulong
+ * Function: H5T__conv_int_ulong
*
- * Purpose: Converts `int' to `unsigned long'
+ * Purpose: Converts `int' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6010,18 +6010,18 @@ H5T__conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(INT, LONG, int, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_long
+ * Function: H5T__conv_uint_long
*
- * Purpose: Converts `unsigned int' to `long'
+ * Purpose: Converts `unsigned int' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6033,18 +6033,18 @@ H5T__conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UINT, LONG, unsigned, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ulong
+ * Function: H5T__conv_uint_ulong
*
- * Purpose: Converts `unsigned int' to `unsigned long'
+ * Purpose: Converts `unsigned int' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6056,18 +6056,18 @@ H5T__conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UINT, ULONG, unsigned, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_llong
+ * Function: H5T__conv_int_llong
*
- * Purpose: Converts `int' to `long long'
+ * Purpose: Converts `int' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6079,18 +6079,18 @@ H5T__conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(INT, LLONG, int, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ullong
+ * Function: H5T__conv_int_ullong
*
- * Purpose: Converts `int' to `unsigned long long'
+ * Purpose: Converts `int' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6102,18 +6102,18 @@ H5T__conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(INT, ULLONG, int, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_llong
+ * Function: H5T__conv_uint_llong
*
- * Purpose: Converts `unsigned int' to `long long'
+ * Purpose: Converts `unsigned int' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6125,18 +6125,18 @@ H5T__conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UINT, LLONG, unsigned, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ullong
+ * Function: H5T__conv_uint_ullong
*
- * Purpose: Converts `unsigned int' to `unsigned long long'
+ * Purpose: Converts `unsigned int' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6148,18 +6148,18 @@ H5T__conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UINT, ULLONG, unsigned, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_schar
+ * Function: H5T__conv_long_schar
*
- * Purpose: Converts `long' to `signed char'
+ * Purpose: Converts `long' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6171,18 +6171,18 @@ H5T__conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LONG, SCHAR, long, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_uchar
+ * Function: H5T__conv_long_uchar
*
- * Purpose: Converts `long' to `unsigned char'
+ * Purpose: Converts `long' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6194,18 +6194,18 @@ H5T__conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LONG, UCHAR, long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_schar
+ * Function: H5T__conv_ulong_schar
*
- * Purpose: Converts `unsigned long' to `signed char'
+ * Purpose: Converts `unsigned long' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6217,18 +6217,18 @@ H5T__conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULONG, SCHAR, unsigned long, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_uchar
+ * Function: H5T__conv_ulong_uchar
*
- * Purpose: Converts `unsigned long' to `unsigned char'
+ * Purpose: Converts `unsigned long' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6240,18 +6240,18 @@ H5T__conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULONG, UCHAR, unsigned long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_short
+ * Function: H5T__conv_long_short
*
- * Purpose: Converts `long' to `short'
+ * Purpose: Converts `long' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6263,18 +6263,18 @@ H5T__conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LONG, SHORT, long, short, SHRT_MIN, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ushort
+ * Function: H5T__conv_long_ushort
*
- * Purpose: Converts `long' to `unsigned short'
+ * Purpose: Converts `long' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6286,18 +6286,18 @@ H5T__conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LONG, USHORT, long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_short
+ * Function: H5T__conv_ulong_short
*
- * Purpose: Converts `unsigned long' to `short'
+ * Purpose: Converts `unsigned long' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6309,18 +6309,18 @@ H5T__conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULONG, SHORT, unsigned long, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ushort
+ * Function: H5T__conv_ulong_ushort
*
- * Purpose: Converts `unsigned long' to `unsigned short'
+ * Purpose: Converts `unsigned long' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6332,18 +6332,18 @@ H5T__conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULONG, USHORT, unsigned long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_int
+ * Function: H5T__conv_long_int
*
- * Purpose: Converts `long' to `int'
+ * Purpose: Converts `long' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6355,18 +6355,18 @@ H5T__conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LONG, INT, long, int, INT_MIN, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_uint
+ * Function: H5T__conv_long_uint
*
- * Purpose: Converts `long' to `unsigned int'
+ * Purpose: Converts `long' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6378,18 +6378,18 @@ H5T__conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LONG, UINT, long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_int
+ * Function: H5T__conv_ulong_int
*
- * Purpose: Converts `unsigned long' to `int'
+ * Purpose: Converts `unsigned long' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6401,18 +6401,18 @@ H5T__conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULONG, INT, unsigned long, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_uint
+ * Function: H5T__conv_ulong_uint
*
- * Purpose: Converts `unsigned long' to `unsigned int'
+ * Purpose: Converts `unsigned long' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6424,18 +6424,18 @@ H5T__conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULONG, UINT, unsigned long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ulong
+ * Function: H5T__conv_long_ulong
*
- * Purpose: Converts `long' to `unsigned long'
+ * Purpose: Converts `long' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6447,18 +6447,18 @@ H5T__conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(LONG, ULONG, long, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_long
+ * Function: H5T__conv_ulong_long
*
- * Purpose: Converts `unsigned long' to `long'
+ * Purpose: Converts `unsigned long' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6470,18 +6470,18 @@ H5T__conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(ULONG, LONG, unsigned long, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_llong
+ * Function: H5T__conv_long_llong
*
- * Purpose: Converts `long' to `long long'
+ * Purpose: Converts `long' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6493,18 +6493,18 @@ H5T__conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(LONG, LLONG, long, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ullong
+ * Function: H5T__conv_long_ullong
*
- * Purpose: Converts `long' to `unsigned long long'
+ * Purpose: Converts `long' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6516,18 +6516,18 @@ H5T__conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(LONG, ULLONG, long, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_llong
+ * Function: H5T__conv_ulong_llong
*
- * Purpose: Converts `unsigned long' to `long long'
+ * Purpose: Converts `unsigned long' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6539,18 +6539,18 @@ H5T__conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(ULONG, LLONG, unsigned long, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ullong
+ * Function: H5T__conv_ulong_ullong
*
- * Purpose: Converts `unsigned long' to `unsigned long long'
+ * Purpose: Converts `unsigned long' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6562,18 +6562,18 @@ H5T__conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(ULONG, ULLONG, unsigned long, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_schar
+ * Function: H5T__conv_llong_schar
*
- * Purpose: Converts `long long' to `signed char'
+ * Purpose: Converts `long long' to `signed char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6585,18 +6585,18 @@ H5T__conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, SCHAR, long long, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_uchar
+ * Function: H5T__conv_llong_uchar
*
- * Purpose: Converts `long long' to `unsigned char'
+ * Purpose: Converts `long long' to `unsigned char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6608,18 +6608,18 @@ H5T__conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, UCHAR, long long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_schar
+ * Function: H5T__conv_ullong_schar
*
- * Purpose: Converts `unsigned long long' to `signed char'
+ * Purpose: Converts `unsigned long long' to `signed char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6631,18 +6631,18 @@ H5T__conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, SCHAR, unsigned long long, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_uchar
+ * Function: H5T__conv_ullong_uchar
*
- * Purpose: Converts `unsigned long long' to `unsigned char'
+ * Purpose: Converts `unsigned long long' to `unsigned char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6654,18 +6654,18 @@ H5T__conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, UCHAR, unsigned long long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_short
+ * Function: H5T__conv_llong_short
*
- * Purpose: Converts `long long' to `short'
+ * Purpose: Converts `long long' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6677,18 +6677,18 @@ H5T__conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, SHORT, long long, short, SHRT_MIN, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ushort
+ * Function: H5T__conv_llong_ushort
*
- * Purpose: Converts `long long' to `unsigned short'
+ * Purpose: Converts `long long' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6700,18 +6700,18 @@ H5T__conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, USHORT, long long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_short
+ * Function: H5T__conv_ullong_short
*
- * Purpose: Converts `unsigned long long' to `short'
+ * Purpose: Converts `unsigned long long' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6723,18 +6723,18 @@ H5T__conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, SHORT, unsigned long long, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ushort
+ * Function: H5T__conv_ullong_ushort
*
- * Purpose: Converts `unsigned long long' to `unsigned short'
+ * Purpose: Converts `unsigned long long' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6746,18 +6746,18 @@ H5T__conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, USHORT, unsigned long long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_int
+ * Function: H5T__conv_llong_int
*
- * Purpose: Converts `long long' to `int'
+ * Purpose: Converts `long long' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6769,18 +6769,18 @@ H5T__conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, INT, long long, int, INT_MIN, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_uint
+ * Function: H5T__conv_llong_uint
*
- * Purpose: Converts `long long' to `unsigned int'
+ * Purpose: Converts `long long' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6792,18 +6792,18 @@ H5T__conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, UINT, long long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_int
+ * Function: H5T__conv_ullong_int
*
- * Purpose: Converts `unsigned long long' to `int'
+ * Purpose: Converts `unsigned long long' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6815,18 +6815,18 @@ H5T__conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, INT, unsigned long long, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_uint
+ * Function: H5T__conv_ullong_uint
*
- * Purpose: Converts `unsigned long long' to `unsigned int'
+ * Purpose: Converts `unsigned long long' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6838,18 +6838,18 @@ H5T__conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, UINT, unsigned long long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_long
+ * Function: H5T__conv_llong_long
*
- * Purpose: Converts `long long' to `long'
+ * Purpose: Converts `long long' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6861,18 +6861,18 @@ H5T__conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, LONG, long long, long, LONG_MIN, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ulong
+ * Function: H5T__conv_llong_ulong
*
- * Purpose: Converts `long long' to `unsigned long'
+ * Purpose: Converts `long long' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6884,18 +6884,18 @@ H5T__conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, ULONG, long long, unsigned long, -, ULONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_long
+ * Function: H5T__conv_ullong_long
*
- * Purpose: Converts `unsigned long long' to `long'
+ * Purpose: Converts `unsigned long long' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6907,18 +6907,18 @@ H5T__conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, LONG, unsigned long long, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ulong
+ * Function: H5T__conv_ullong_ulong
*
- * Purpose: Converts `unsigned long long' to `unsigned long'
+ * Purpose: Converts `unsigned long long' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6930,18 +6930,18 @@ H5T__conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, ULONG, unsigned long long, unsigned long, -, ULONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ullong
+ * Function: H5T__conv_llong_ullong
*
- * Purpose: Converts `long long' to `unsigned long long'
+ * Purpose: Converts `long long' to `unsigned long long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6953,18 +6953,18 @@ H5T__conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(LLONG, ULLONG, long long, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_llong
+ * Function: H5T__conv_ullong_llong
*
- * Purpose: Converts `unsigned long long' to `long long'
+ * Purpose: Converts `unsigned long long' to `long long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6976,17 +6976,17 @@ H5T__conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(ULLONG, LLONG, unsigned long long, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_double
+ * Function: H5T__conv_float_double
*
- * Purpose: Convert native `float' to native `double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `float' to native `double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6998,17 +6998,17 @@ H5T__conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_fF(FLOAT, DOUBLE, float, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ldouble
+ * Function: H5T__conv_float_ldouble
*
- * Purpose: Convert native `float' to native `long double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `float' to native `long double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7022,17 +7022,17 @@ H5T__conv_float_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_float
+ * Function: H5T__conv_double_float
*
- * Purpose: Convert native `double' to native `float' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `double' to native `float' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -7044,17 +7044,17 @@ H5T__conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ff(DOUBLE, FLOAT, double, float, -FLT_MAX, FLT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ldouble
+ * Function: H5T__conv_double_ldouble
*
- * Purpose: Convert native `double' to native `long double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `double' to native `long double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7068,17 +7068,17 @@ H5T__conv_double_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_float
+ * Function: H5T__conv_ldouble_float
*
- * Purpose: Convert native `long double' to native `float' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `long double' to native `float' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7092,17 +7092,17 @@ H5T__conv_ldouble_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_double
+ * Function: H5T__conv_ldouble_double
*
- * Purpose: Convert native `long double' to native `double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `long double' to native `double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7116,17 +7116,17 @@ H5T__conv_ldouble_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_float
+ * Function: H5T__conv_schar_float
*
- * Purpose: Convert native signed char to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native signed char to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7138,17 +7138,17 @@ H5T__conv_schar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SCHAR, FLOAT, signed char, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_double
+ * Function: H5T__conv_schar_double
*
- * Purpose: Convert native signed char to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native signed char to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7160,17 +7160,17 @@ H5T__conv_schar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SCHAR, DOUBLE, signed char, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ldouble
+ * Function: H5T__conv_schar_ldouble
*
- * Purpose: Convert native signed char to native long double using
+ * Purpose: Convert native signed char to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7182,17 +7182,17 @@ H5T__conv_schar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SCHAR, LDOUBLE, signed char, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_float
+ * Function: H5T__conv_uchar_float
*
- * Purpose: Convert native unsigned char to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned char to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7204,17 +7204,17 @@ H5T__conv_uchar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UCHAR, FLOAT, unsigned char, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_double
+ * Function: H5T__conv_uchar_double
*
- * Purpose: Convert native unsigned char to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned char to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7226,17 +7226,17 @@ H5T__conv_uchar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UCHAR, DOUBLE, unsigned char, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ldouble
+ * Function: H5T__conv_uchar_ldouble
*
- * Purpose: Convert native unsigned char to native long double using
+ * Purpose: Convert native unsigned char to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7248,17 +7248,17 @@ H5T__conv_uchar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UCHAR, LDOUBLE, unsigned char, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_float
+ * Function: H5T__conv_short_float
*
- * Purpose: Convert native short to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7270,17 +7270,17 @@ H5T__conv_short_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SHORT, FLOAT, short, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_double
+ * Function: H5T__conv_short_double
*
- * Purpose: Convert native short to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7292,17 +7292,17 @@ H5T__conv_short_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SHORT, DOUBLE, short, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ldouble
+ * Function: H5T__conv_short_ldouble
*
- * Purpose: Convert native short to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7314,17 +7314,17 @@ H5T__conv_short_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SHORT, LDOUBLE, short, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_float
+ * Function: H5T__conv_ushort_float
*
- * Purpose: Convert native unsigned short to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned short to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7336,17 +7336,17 @@ H5T__conv_ushort_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(USHORT, FLOAT, unsigned short, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_double
+ * Function: H5T__conv_ushort_double
*
- * Purpose: Convert native unsigned short to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned short to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7358,17 +7358,17 @@ H5T__conv_ushort_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(USHORT, DOUBLE, unsigned short, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ldouble
+ * Function: H5T__conv_ushort_ldouble
*
- * Purpose: Convert native unsigned short to native long double using
+ * Purpose: Convert native unsigned short to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7380,17 +7380,17 @@ H5T__conv_ushort_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(USHORT, LDOUBLE, unsigned short, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_float
+ * Function: H5T__conv_int_float
*
- * Purpose: Convert native integer to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7402,17 +7402,17 @@ H5T__conv_int_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(INT, FLOAT, int, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_double
+ * Function: H5T__conv_int_double
*
- * Purpose: Convert native integer to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7424,17 +7424,17 @@ H5T__conv_int_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(INT, DOUBLE, int, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ldouble
+ * Function: H5T__conv_int_ldouble
*
- * Purpose: Convert native integer to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7446,17 +7446,17 @@ H5T__conv_int_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(INT, LDOUBLE, int, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_float
+ * Function: H5T__conv_uint_float
*
- * Purpose: Convert native unsigned integer to native float using
+ * Purpose: Convert native unsigned integer to native float using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7468,17 +7468,17 @@ H5T__conv_uint_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UINT, FLOAT, unsigned int, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_double
+ * Function: H5T__conv_uint_double
*
- * Purpose: Convert native unsigned integer to native double using
+ * Purpose: Convert native unsigned integer to native double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7490,17 +7490,17 @@ H5T__conv_uint_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UINT, DOUBLE, unsigned int, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ldouble
+ * Function: H5T__conv_uint_ldouble
*
- * Purpose: Convert native unsigned integer to native long double using
+ * Purpose: Convert native unsigned integer to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7512,17 +7512,17 @@ H5T__conv_uint_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UINT, LDOUBLE, unsigned int, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_float
+ * Function: H5T__conv_long_float
*
- * Purpose: Convert native long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7534,17 +7534,17 @@ H5T__conv_long_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LONG, FLOAT, long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_double
+ * Function: H5T__conv_long_double
*
- * Purpose: Convert native long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7556,17 +7556,17 @@ H5T__conv_long_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LONG, DOUBLE, long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ldouble
+ * Function: H5T__conv_long_ldouble
*
- * Purpose: Convert native long to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7578,17 +7578,17 @@ H5T__conv_long_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LONG, LDOUBLE, long, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_float
+ * Function: H5T__conv_ulong_float
*
- * Purpose: Convert native unsigned long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7600,17 +7600,17 @@ H5T__conv_ulong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULONG, FLOAT, unsigned long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_double
+ * Function: H5T__conv_ulong_double
*
- * Purpose: Convert native unsigned long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7622,17 +7622,17 @@ H5T__conv_ulong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULONG, DOUBLE, unsigned long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ldouble
+ * Function: H5T__conv_ulong_ldouble
*
- * Purpose: Convert native unsigned long to native long double using
+ * Purpose: Convert native unsigned long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7644,17 +7644,17 @@ H5T__conv_ulong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULONG, LDOUBLE, unsigned long, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_float
+ * Function: H5T__conv_llong_float
*
- * Purpose: Convert native long long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7666,17 +7666,17 @@ H5T__conv_llong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LLONG, FLOAT, long long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_double
+ * Function: H5T__conv_llong_double
*
- * Purpose: Convert native long long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7688,17 +7688,17 @@ H5T__conv_llong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LLONG, DOUBLE, long long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ldouble
+ * Function: H5T__conv_llong_ldouble
*
- * Purpose: Convert native long long to native long double using
+ * Purpose: Convert native long long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7712,17 +7712,17 @@ H5T__conv_llong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_float
+ * Function: H5T__conv_ullong_float
*
- * Purpose: Convert native unsigned long long to native float using
+ * Purpose: Convert native unsigned long long to native float using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7734,17 +7734,17 @@ H5T__conv_ullong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULLONG, FLOAT, unsigned long long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_double
+ * Function: H5T__conv_ullong_double
*
- * Purpose: Convert native unsigned long long to native double using
+ * Purpose: Convert native unsigned long long to native double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7756,17 +7756,17 @@ H5T__conv_ullong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULLONG, DOUBLE, unsigned long long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ldouble
+ * Function: H5T__conv_ullong_ldouble
*
- * Purpose: Convert native unsigned long long to native long double using
+ * Purpose: Convert native unsigned long long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7780,17 +7780,17 @@ H5T__conv_ullong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /*H5T_CONV_INTERNAL_ULLONG_LDOUBLE*/
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_schar
+ * Function: H5T__conv_float_schar
*
- * Purpose: Convert native float to native signed char using
+ * Purpose: Convert native float to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7799,22 +7799,22 @@ H5T__conv_float_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, SCHAR, float, signed char, SCHAR_MIN, SCHAR_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_uchar
+ * Function: H5T__conv_float_uchar
*
- * Purpose: Convert native float to native unsigned char using
+ * Purpose: Convert native float to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7823,22 +7823,22 @@ H5T__conv_float_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, UCHAR, float, unsigned char, 0, UCHAR_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_schar
+ * Function: H5T__conv_double_schar
*
- * Purpose: Convert native double to native signed char using
+ * Purpose: Convert native double to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7847,22 +7847,22 @@ H5T__conv_double_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, SCHAR, double, signed char, SCHAR_MIN, SCHAR_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_uchar
+ * Function: H5T__conv_double_uchar
*
- * Purpose: Convert native double to native unsigned char using
+ * Purpose: Convert native double to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7871,22 +7871,22 @@ H5T__conv_double_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, UCHAR, double, unsigned char, 0, UCHAR_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_schar
+ * Function: H5T__conv_ldouble_schar
*
- * Purpose: Convert native long double to native signed char using
+ * Purpose: Convert native long double to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7895,22 +7895,22 @@ H5T__conv_ldouble_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, SCHAR, long double, signed char, SCHAR_MIN, SCHAR_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_uchar
+ * Function: H5T__conv_ldouble_uchar
*
- * Purpose: Convert native long double to native unsigned char using
+ * Purpose: Convert native long double to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7919,22 +7919,22 @@ H5T__conv_ldouble_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, UCHAR, long double, unsigned char, 0, UCHAR_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_short
+ * Function: H5T__conv_float_short
*
- * Purpose: Convert native float to native short using
+ * Purpose: Convert native float to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7943,22 +7943,22 @@ H5T__conv_float_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, SHORT, float, short, SHRT_MIN, SHRT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ushort
+ * Function: H5T__conv_float_ushort
*
- * Purpose: Convert native float to native unsigned short using
+ * Purpose: Convert native float to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7967,22 +7967,22 @@ H5T__conv_float_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, USHORT, float, unsigned short, 0, USHRT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_short
+ * Function: H5T__conv_double_short
*
- * Purpose: Convert native double to native short using
+ * Purpose: Convert native double to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7991,22 +7991,22 @@ H5T__conv_double_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, SHORT, double, short, SHRT_MIN, SHRT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ushort
+ * Function: H5T__conv_double_ushort
*
- * Purpose: Convert native double to native unsigned short using
+ * Purpose: Convert native double to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8015,22 +8015,22 @@ H5T__conv_double_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, USHORT, double, unsigned short, 0, USHRT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_short
+ * Function: H5T__conv_ldouble_short
*
- * Purpose: Convert native long double to native short using
+ * Purpose: Convert native long double to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8039,22 +8039,22 @@ H5T__conv_ldouble_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, SHORT, long double, short, SHRT_MIN, SHRT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ushort
+ * Function: H5T__conv_ldouble_ushort
*
- * Purpose: Convert native long double to native unsigned short using
+ * Purpose: Convert native long double to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8063,22 +8063,22 @@ H5T__conv_ldouble_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, USHORT, long double, unsigned short, 0, USHRT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_int
+ * Function: H5T__conv_float_int
*
- * Purpose: Convert native float to native int using
+ * Purpose: Convert native float to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8087,22 +8087,22 @@ H5T__conv_float_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, INT, float, int, INT_MIN, INT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_uint
+ * Function: H5T__conv_float_uint
*
- * Purpose: Convert native float to native unsigned int using
+ * Purpose: Convert native float to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8111,22 +8111,22 @@ H5T__conv_float_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, UINT, float, unsigned int, 0, UINT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_int
+ * Function: H5T__conv_double_int
*
- * Purpose: Convert native double to native int using
+ * Purpose: Convert native double to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8135,22 +8135,22 @@ H5T__conv_double_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, INT, double, int, INT_MIN, INT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_uint
+ * Function: H5T__conv_double_uint
*
- * Purpose: Convert native double to native unsigned int using
+ * Purpose: Convert native double to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8159,22 +8159,22 @@ H5T__conv_double_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, UINT, double, unsigned int, 0, UINT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_int
+ * Function: H5T__conv_ldouble_int
*
- * Purpose: Convert native long double to native int using
+ * Purpose: Convert native long double to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8183,22 +8183,22 @@ H5T__conv_ldouble_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, INT, long double, int, INT_MIN, INT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_uint
+ * Function: H5T__conv_ldouble_uint
*
- * Purpose: Convert native long double to native unsigned int using
+ * Purpose: Convert native long double to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8207,22 +8207,22 @@ H5T__conv_ldouble_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, UINT, long double, unsigned int, 0, UINT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_long
+ * Function: H5T__conv_float_long
*
- * Purpose: Convert native float to native long using
+ * Purpose: Convert native float to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8231,22 +8231,22 @@ H5T__conv_float_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, LONG, float, long, LONG_MIN, LONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ulong
+ * Function: H5T__conv_float_ulong
*
- * Purpose: Convert native float to native unsigned long using
+ * Purpose: Convert native float to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8255,22 +8255,22 @@ H5T__conv_float_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, ULONG, float, unsigned long, 0, ULONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_long
+ * Function: H5T__conv_double_long
*
- * Purpose: Convert native double to native long using
+ * Purpose: Convert native double to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8279,22 +8279,22 @@ H5T__conv_double_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, LONG, double, long, LONG_MIN, LONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ulong
+ * Function: H5T__conv_double_ulong
*
- * Purpose: Convert native double to native unsigned long using
+ * Purpose: Convert native double to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8303,22 +8303,22 @@ H5T__conv_double_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, ULONG, double, unsigned long, 0, ULONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_long
+ * Function: H5T__conv_ldouble_long
*
- * Purpose: Convert native long double to native long using
+ * Purpose: Convert native long double to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8327,22 +8327,22 @@ H5T__conv_ldouble_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, LONG, long double, long, LONG_MIN, LONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ulong
+ * Function: H5T__conv_ldouble_ulong
*
- * Purpose: Convert native long double to native unsigned long using
+ * Purpose: Convert native long double to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8351,22 +8351,22 @@ H5T__conv_ldouble_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, ULONG, long double, unsigned long, 0, ULONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_llong
+ * Function: H5T__conv_float_llong
*
- * Purpose: Convert native float to native long long using
+ * Purpose: Convert native float to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8375,22 +8375,22 @@ H5T__conv_float_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, LLONG, float, long long, LLONG_MIN, LLONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ullong
+ * Function: H5T__conv_float_ullong
*
- * Purpose: Convert native float to native unsigned long long using
+ * Purpose: Convert native float to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8399,22 +8399,22 @@ H5T__conv_float_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, ULLONG, float, unsigned long long, 0, ULLONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_llong
+ * Function: H5T__conv_double_llong
*
- * Purpose: Convert native double to native long long using
+ * Purpose: Convert native double to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8423,22 +8423,22 @@ H5T__conv_double_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, LLONG, double, long long, LLONG_MIN, LLONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ullong
+ * Function: H5T__conv_double_ullong
*
- * Purpose: Convert native double to native unsigned long long using
+ * Purpose: Convert native double to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8447,22 +8447,22 @@ H5T__conv_double_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, ULLONG, double, unsigned long long, 0, ULLONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_llong
+ * Function: H5T__conv_ldouble_llong
*
- * Purpose: Convert native long double to native long long using
+ * Purpose: Convert native long double to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8472,23 +8472,23 @@ H5T__conv_ldouble_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, LLONG, long double, long long, LLONG_MIN, LLONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_LLONG*/
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ullong
+ * Function: H5T__conv_ldouble_ullong
*
- * Purpose: Convert native long double to native unsigned long long using
+ * Purpose: Convert native long double to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8498,24 +8498,24 @@ H5T__conv_ldouble_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, ULLONG, long double, unsigned long long, 0, ULLONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_ULLONG*/
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_f_i
+ * Function: H5T__conv_f_i
*
- * Purpose: Convert one floating-point type to an integer. This is
+ * Purpose: Convert one floating-point type to an integer. This is
* the catch-all function for float-integer conversions and
* is probably not particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Wednesday, Jan 21, 2004
+ * Programmer: Raymond Lu
+ * Wednesday, Jan 21, 2004
*
*-------------------------------------------------------------------------
*/
@@ -8524,28 +8524,28 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t *src_p; /*source datatype */
- H5T_t *dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t *src_p; /*source datatype */
+ H5T_t *dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ size_t olap; /*num overlapping elements */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev=NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t dbuf[64]; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- hssize_t expo; /*source exponent */
+ hssize_t expo; /*source exponent */
hssize_t sign; /*source sign bit value */
uint8_t *int_buf=NULL; /*buffer for temporary value */
size_t buf_size; /*buffer size for temporary value */
- size_t i; /*miscellaneous counters */
- size_t first; /*first bit(MSB) in an integer */
- ssize_t sfirst; /*a signed version of `first' */
+ size_t i; /*miscellaneous counters */
+ size_t first; /*first bit(MSB) in an integer */
+ ssize_t sfirst; /*a signed version of `first' */
H5T_conv_cb_t cb_struct={NULL, NULL}; /*conversion callback structure */
hbool_t truncated; /*if fraction value is dropped */
hbool_t reverse; /*if reverse order of destination at the end */
@@ -9074,18 +9074,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_f_i() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_i_f
+ * Function: H5T__conv_i_f
*
- * Purpose: Convert one integer type to a floating-point type. This is
+ * Purpose: Convert one integer type to a floating-point type. This is
* the catch-all function for integer-float conversions and
* is probably not particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 6, 2004
+ * Programmer: Raymond Lu
+ * Friday, Feb 6, 2004
*
*-------------------------------------------------------------------------
*/
@@ -9094,31 +9094,31 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t *src_p; /*source datatype */
- H5T_t *dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t *src_p; /*source datatype */
+ H5T_t *dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ size_t olap; /*num overlapping elements */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t dbuf[64]; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- hsize_t expo; /*destination exponent */
- hsize_t expo_max; /*maximal possible exponent value */
+ hsize_t expo; /*destination exponent */
+ hsize_t expo_max; /*maximal possible exponent value */
size_t sign; /*source sign bit value */
hbool_t is_max_neg; /*source is maximal negative value*/
hbool_t do_round; /*whether there is roundup */
uint8_t *int_buf = NULL; /*buffer for temporary value */
size_t buf_size; /*buffer size for temporary value */
- size_t i; /*miscellaneous counters */
- size_t first; /*first bit(MSB) in an integer */
- ssize_t sfirst; /*a signed version of `first' */
+ size_t i; /*miscellaneous counters */
+ size_t first; /*first bit(MSB) in an integer */
+ ssize_t sfirst; /*a signed version of `first' */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
hbool_t reverse; /*if reverse the order of destination */
@@ -9305,10 +9305,10 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (H5T_NORM_IMPLIED==dst.u.f.norm) {
/* Imply first bit */
H5T__bit_set(int_buf, first, (size_t)1, 0);
- }
+ }
else if (H5T_NORM_NONE==dst.u.f.norm) {
first++;
- }
+ }
/* Roundup for mantissa */
if(first > dst.u.f.msize) {
@@ -9336,7 +9336,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Check 1st dropoff bit, see if it's set. */
if(H5T__bit_get_d(int_buf, ((first - dst.u.f.msize) - 1), (size_t)1)) {
- /* Check all bits after 1st dropoff bit, see if any of them is set. */
+ /* Check all bits after 1st dropoff bit, see if any of them is set. */
if(((first - dst.u.f.msize) - 1) > 0 && H5T__bit_get_d(int_buf, (size_t)0, ((first - dst.u.f.msize) - 1)))
do_round = 1;
else { /* The .50...0 case */
@@ -9344,7 +9344,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(H5T__bit_get_d(int_buf, (first - dst.u.f.msize), (size_t)1))
do_round = 1;
}
- }
+ }
/* Right shift to drop off extra bits */
H5T__bit_shift(int_buf, (ssize_t)(dst.u.f.msize - first), (size_t)0, buf_size * 8);
@@ -9353,28 +9353,28 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
H5T__bit_inc(int_buf, (size_t)0, buf_size * 8);
do_round = 0;
- /* If integer is like 0x0ff...fff and we need to round up the
- * last f, we get 0x100...000. Treat this special case here.
- */
- if(H5T__bit_get_d(int_buf, dst.u.f.msize, (size_t)1)) {
- if (H5T_NORM_IMPLIED==dst.u.f.norm) {
- /* The bit at this 1's position was impled already, so this
- * number should be 0x200...000. We need to increment the
- * exponent in this case.
- */
- expo++;
- } else if (H5T_NORM_NONE==dst.u.f.norm) {
- /* Right shift 1 bit to let the carried 1 fit in the mantissa,
- * and increment exponent by 1.
- */
+ /* If integer is like 0x0ff...fff and we need to round up the
+ * last f, we get 0x100...000. Treat this special case here.
+ */
+ if(H5T__bit_get_d(int_buf, dst.u.f.msize, (size_t)1)) {
+ if (H5T_NORM_IMPLIED==dst.u.f.norm) {
+ /* The bit at this 1's position was impled already, so this
+ * number should be 0x200...000. We need to increment the
+ * exponent in this case.
+ */
+ expo++;
+ } else if (H5T_NORM_NONE==dst.u.f.norm) {
+ /* Right shift 1 bit to let the carried 1 fit in the mantissa,
+ * and increment exponent by 1.
+ */
H5T__bit_shift(int_buf, (ssize_t)-1, (size_t)0, buf_size * 8);
- expo++;
- }
- }
+ expo++;
+ }
+ }
}
} else {
/* The bit sequence can fit mantissa part. Left shift to fit in from high-order of
- * bit position. */
+ * bit position. */
H5T__bit_shift(int_buf, (ssize_t)(dst.u.f.msize - first), (size_t)0, dst.u.f.msize);
}
@@ -9484,11 +9484,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_i_f() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__reverse_order
+ * Function: H5T__reverse_order
*
- * Purpose: Internal assisting function to reverse the order of
+ * Purpose: Internal assisting function to reverse the order of
* a sequence of byte when it's big endian or VAX order.
* The byte sequence simulates the endian order.
*
@@ -9496,8 +9496,8 @@ done:
*
* Failure: Null
*
- * Programmer: Raymond Lu
- * April 26, 2004
+ * Programmer: Raymond Lu
+ * April 26, 2004
*
*-------------------------------------------------------------------------
*/
@@ -9527,7 +9527,7 @@ H5T__reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order)
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5T_reclaim
*
@@ -9571,7 +9571,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_reclaim() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_reclaim_cb
*
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index 357bb08..ab6b86c 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -19,13 +19,13 @@
#include "H5Tmodule.h" /* This source code file is part of the H5T module */
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Tpkg.h" /* Datatypes */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Tpkg.h" /* Datatypes */
/* Static local functions */
static H5T_t *H5T__get_native_type(H5T_t *dt, H5T_direction_t direction,
@@ -41,7 +41,7 @@ static herr_t H5T__cmp_offset(size_t *comp_size, size_t *offset, size_t elem_siz
size_t nelems, size_t align, size_t *struct_align);
-
+
/*-------------------------------------------------------------------------
* Function: H5Tget_native_type
*
@@ -107,7 +107,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tget_native_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__get_native_type
*
@@ -339,7 +339,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali
case H5T_ENUM:
{
- H5T_path_t *tpath; /* Type conversion info */
+ H5T_path_t *tpath; /* Type conversion info */
hid_t super_type_id, nat_super_type_id;
/* Don't need to do anything special for alignment, offset since the ENUM type usually is integer. */
@@ -530,8 +530,8 @@ done:
* the code below, but early (4.4.7, at least) gcc only allows
* diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(duplicated-branches)
-
+H5_GCC_DIAG_OFF("duplicated-branches")
+
/*-------------------------------------------------------------------------
* Function: H5T__get_native_integer
*
@@ -671,7 +671,7 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction,
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__get_native_integer() */
-H5_GCC_DIAG_ON(duplicated-branches)
+H5_GCC_DIAG_ON("duplicated-branches")
/* Disable warning for intentional identical branches here -QAK */
/*
@@ -679,8 +679,8 @@ H5_GCC_DIAG_ON(duplicated-branches)
* the code below, but early (4.4.7, at least) gcc only allows
* diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(duplicated-branches)
-
+H5_GCC_DIAG_OFF("duplicated-branches")
+
/*-------------------------------------------------------------------------
* Function: H5T__get_native_float
*
@@ -702,7 +702,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
H5T_t *dt=NULL; /* Appropriate native datatype to copy */
hid_t tid=(-1); /* Datatype ID of appropriate native datatype */
size_t align=0; /* Alignment necessary for native datatype */
- size_t native_size=0; /* Datatype size of the native type */
+ size_t native_size=0; /* Datatype size of the native type */
enum match_type { /* The different kinds of floating point types we can match */
H5T_NATIVE_FLOAT_MATCH_FLOAT,
H5T_NATIVE_FLOAT_MATCH_DOUBLE,
@@ -720,50 +720,50 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
if(direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) {
if(size<=sizeof(float)) {
match=H5T_NATIVE_FLOAT_MATCH_FLOAT;
- native_size = sizeof(float);
+ native_size = sizeof(float);
}
else if(size<=sizeof(double)) {
match=H5T_NATIVE_FLOAT_MATCH_DOUBLE;
- native_size = sizeof(double);
+ native_size = sizeof(double);
}
#if H5_SIZEOF_LONG_DOUBLE !=0
else if(size<=sizeof(long double)) {
match=H5T_NATIVE_FLOAT_MATCH_LDOUBLE;
- native_size = sizeof(long double);
+ native_size = sizeof(long double);
}
#endif
else { /* If not match, return the biggest datatype */
#if H5_SIZEOF_LONG_DOUBLE !=0
match=H5T_NATIVE_FLOAT_MATCH_LDOUBLE;
- native_size = sizeof(long double);
+ native_size = sizeof(long double);
#else
match=H5T_NATIVE_FLOAT_MATCH_DOUBLE;
native_size = sizeof(double);
#endif
- }
+ }
} else {
#if H5_SIZEOF_LONG_DOUBLE !=0
if(size>sizeof(double)) {
match=H5T_NATIVE_FLOAT_MATCH_LDOUBLE;
- native_size = sizeof(long double);
+ native_size = sizeof(long double);
}
else if(size>sizeof(float)) {
match=H5T_NATIVE_FLOAT_MATCH_DOUBLE;
- native_size = sizeof(double);
+ native_size = sizeof(double);
}
else {
match=H5T_NATIVE_FLOAT_MATCH_FLOAT;
- native_size = sizeof(float);
- }
+ native_size = sizeof(float);
+ }
#else
if(size>sizeof(float)) {
match=H5T_NATIVE_FLOAT_MATCH_DOUBLE;
- native_size = sizeof(double);
+ native_size = sizeof(double);
}
else {
match=H5T_NATIVE_FLOAT_MATCH_FLOAT;
- native_size = sizeof(float);
- }
+ native_size = sizeof(float);
+ }
#endif
}
@@ -804,7 +804,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__get_native_float() */
-H5_GCC_DIAG_ON(duplicated-branches)
+H5_GCC_DIAG_ON("duplicated-branches")
/* Disable warning for intentional identical branches here -QAK */
/*
@@ -812,8 +812,8 @@ H5_GCC_DIAG_ON(duplicated-branches)
* the code below, but early (4.4.7, at least) gcc only allows
* diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(duplicated-branches)
-
+H5_GCC_DIAG_OFF("duplicated-branches")
+
/*-------------------------------------------------------------------------
* Function: H5T__get_native_bitfield
*
@@ -898,22 +898,22 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction,
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__get_native_bitfield() */
-H5_GCC_DIAG_ON(duplicated-branches)
+H5_GCC_DIAG_ON("duplicated-branches")
+
-
/*-------------------------------------------------------------------------
- * Function: H5T__cmp_offset
+ * Function: H5T__cmp_offset
*
- * Purpose: This function is only for convenience. It computes the
+ * Purpose: This function is only for convenience. It computes the
* compound type size, offset of the member being considered
* and the alignment for the whole compound type.
*
- * Return: Success: Non-negative value.
+ * Return: Success: Non-negative value.
*
- * Failure: Negative value.
+ * Failure: Negative value.
*
- * Programmer: Raymond Lu
- * December 10, 2002
+ * Programmer: Raymond Lu
+ * December 10, 2002
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h
index 5c975f6..0c69ba6 100644
--- a/src/H5VMprivate.h
+++ b/src/H5VMprivate.h
@@ -19,9 +19,9 @@
#define H5VMprivate_H
/* Private headers needed by this file */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
/* Vector-Vector sequence operation callback */
typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off,
@@ -41,7 +41,7 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off,
/* Other functions */
#define H5VM_vector_cpy(N,DST,SRC) { \
- HDassert(sizeof(*(DST))==sizeof(*(SRC))); \
+ HDassert(sizeof(*(DST))==sizeof(*(SRC))); \
if (SRC) H5MM_memcpy (DST, SRC, (N)*sizeof(*(DST))); \
else HDmemset (DST, 0, (N)*sizeof(*(DST))); \
}
@@ -85,32 +85,32 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off,
#define H5VM_ZERO NULL
H5_DLL hsize_t H5VM_hyper_stride(unsigned n, const hsize_t *size,
- const hsize_t *total_size,
- const hsize_t *offset,
- hsize_t *stride);
+ const hsize_t *total_size,
+ const hsize_t *offset,
+ hsize_t *stride);
H5_DLL htri_t H5VM_hyper_eq(unsigned n, const hsize_t *offset1,
- const hsize_t *size1, const hsize_t *offset2,
- const hsize_t *size2);
+ const hsize_t *size1, const hsize_t *offset2,
+ const hsize_t *size2);
H5_DLL herr_t H5VM_hyper_fill(unsigned n, const hsize_t *_size,
- const hsize_t *total_size,
- const hsize_t *offset, void *_dst,
- unsigned fill_value);
+ const hsize_t *total_size,
+ const hsize_t *offset, void *_dst,
+ unsigned fill_value);
H5_DLL herr_t H5VM_hyper_copy(unsigned n, const hsize_t *size,
- const hsize_t *dst_total_size,
- const hsize_t *dst_offset, void *_dst,
- const hsize_t *src_total_size,
- const hsize_t *src_offset, const void *_src);
+ const hsize_t *dst_total_size,
+ const hsize_t *dst_offset, void *_dst,
+ const hsize_t *src_total_size,
+ const hsize_t *src_offset, const void *_src);
H5_DLL herr_t H5VM_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size,
- const hsize_t *stride, void *_dst,
- unsigned fill_value);
+ const hsize_t *stride, void *_dst,
+ unsigned fill_value);
H5_DLL herr_t H5VM_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *_size,
- const hsize_t *dst_stride, void *_dst,
- const hsize_t *src_stride, const void *_src);
+ const hsize_t *dst_stride, void *_dst,
+ const hsize_t *src_stride, const void *_src);
H5_DLL herr_t H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *_size,
- const hssize_t *dst_stride, void *_dst,
- const hssize_t *src_stride, const void *_src);
+ const hssize_t *dst_stride, void *_dst,
+ const hssize_t *src_stride, const void *_src);
H5_DLL herr_t H5VM_array_fill(void *_dst, const void *src, size_t size,
- size_t count);
+ size_t count);
H5_DLL herr_t H5VM_array_down(unsigned n, const hsize_t *total_size,
hsize_t *down);
H5_DLL hsize_t H5VM_array_offset_pre(unsigned n,
@@ -204,7 +204,7 @@ H5VM_vector_zerop_u(int n, const hsize_t *v)
if (!v)
HGOTO_DONE(TRUE)
while (n--)
- if (*v++)
+ if (*v++)
HGOTO_DONE(FALSE)
done:
@@ -241,7 +241,7 @@ H5VM_vector_zerop_s(int n, const hssize_t *v)
if (!v)
HGOTO_DONE(TRUE)
while (n--)
- if (*v++)
+ if (*v++)
HGOTO_DONE(FALSE)
done:
@@ -291,9 +291,9 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5VM_vector_cmp_s
+ * Function: H5VM_vector_cmp_s
*
* Purpose: Compares two vectors of the same size and determines if V1 is
* lexicographically less than, equal, or greater than V2.
@@ -308,7 +308,7 @@ done:
*
* Failure: 0 if N is zero
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 8, 1998
*
*-------------------------------------------------------------------------
@@ -335,7 +335,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5VM_vector_inc
*
@@ -361,6 +361,7 @@ H5VM_vector_inc(int n, hsize_t *v1, const hsize_t *v2)
/* Lookup table for general log2(n) routine */
static const unsigned char LogTable256[] =
{
+ /* clang-clang-format off */
0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
@@ -377,9 +378,10 @@ static const unsigned char LogTable256[] =
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+ /* clang-clang-format on */
};
-
+
/*-------------------------------------------------------------------------
* Function: H5VM_log2_gen
*
@@ -432,7 +434,7 @@ static const unsigned MultiplyDeBruijnBitPosition[32] =
31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
};
-
+
/*-------------------------------------------------------------------------
* Function: H5VM_log2_of2
*
@@ -464,19 +466,19 @@ H5VM_log2_of2(uint32_t n)
return(MultiplyDeBruijnBitPosition[(n * (uint32_t)0x077CB531UL) >> 27]);
} /* H5VM_log2_of2() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5VM_power2up
+ * Function: H5VM_power2up
*
- * Purpose: Round up a number to the next power of 2
+ * Purpose: Round up a number to the next power of 2
*
* Note: Although this routine is 'static' in this file, that's intended
* only as an optimization and the naming (with a single underscore)
* reflects its inclusion in a "private" header file.
*
- * Return: Return the number which is a power of 2
+ * Return: Return the number which is a power of 2
*
- * Programmer: Vailin Choi; Nov 2014
+ * Programmer: Vailin Choi; Nov 2014
*
*-------------------------------------------------------------------------
*/
@@ -495,7 +497,7 @@ H5VM_power2up(hsize_t n)
return(ret_value);
} /* H5VM_power2up */
-
+
/*-------------------------------------------------------------------------
* Function: H5VM_limit_enc_size
*
@@ -522,15 +524,15 @@ H5VM_limit_enc_size(uint64_t limit)
static const unsigned char H5VM_bit_set_g[8] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
static const unsigned char H5VM_bit_clear_g[8] = {0x7F, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD, 0xFE};
-
+
/*-------------------------------------------------------------------------
* Function: H5VM_bit_get
*
* Purpose: Determine the value of the n'th bit in a buffer.
*
- * Note: No range checking on <offset> is performed!
+ * Note: No range checking on <offset> is performed!
*
- * Note #2: Bits are sequentially stored in the buffer, starting with bit
+ * Note #2: Bits are sequentially stored in the buffer, starting with bit
* offset 0 in the first byte's high-bit position, proceeding down
* to bit offset 7 in the first byte's low-bit position, then to
* bit offset 8 in the second byte's high-bit position, etc.
@@ -553,15 +555,15 @@ H5VM_bit_get(const unsigned char *buf, size_t offset)
return (hbool_t)((buf[offset / 8] & (H5VM_bit_set_g[offset % 8])) ? TRUE : FALSE);
} /* end H5VM_bit_get() */
-
+
/*-------------------------------------------------------------------------
* Function: H5VM_bit_set
*
* Purpose: Set/reset the n'th bit in a buffer.
*
- * Note: No range checking on <offset> is performed!
+ * Note: No range checking on <offset> is performed!
*
- * Note #2: Bits are sequentially stored in the buffer, starting with bit
+ * Note #2: Bits are sequentially stored in the buffer, starting with bit
* offset 0 in the first byte's high-bit position, proceeding down
* to bit offset 7 in the first byte's low-bit position, then to
* bit offset 8 in the second byte's high-bit position, etc.
diff --git a/src/H5detect.c b/src/H5detect.c
index ac416aa..652dab8 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -52,7 +52,7 @@ static const char *FileHeader = "\n\
/* Disable warning about cast increasing the alignment of the target type,
* that's _exactly_ what this code is probing. -QAK
*/
-H5_GCC_DIAG_OFF(cast-align)
+H5_GCC_DIAG_OFF("cast-align")
#if defined(__has_attribute)
# if __has_attribute(no_sanitize_address)
@@ -120,9 +120,9 @@ typedef struct malign_t {
FILE *rawoutstream = NULL;
/* global variables types detection code */
-H5_GCC_DIAG_OFF(larger-than=)
+H5_GCC_DIAG_OFF("larger-than=")
static detected_t d_g[MAXDETECT];
-H5_GCC_DIAG_ON(larger-than=)
+H5_GCC_DIAG_ON("larger-than=")
static malign_t m_g[MAXDETECT];
static volatile int nd_g = 0, na_g = 0;
@@ -158,7 +158,7 @@ static H5JMP_BUF jbuf_g;
#endif
-
+
/*-------------------------------------------------------------------------
* Function: precision
*
@@ -211,7 +211,7 @@ precision (detected_t *d)
}
}
-
+
/*-------------------------------------------------------------------------
* Function: DETECT_I/DETECT_BYTE
*
@@ -266,7 +266,7 @@ precision (detected_t *d)
DETECT_I_BYTE_CORE(TYPE,VAR,INFO,TYPE) \
}
-
+
/*-------------------------------------------------------------------------
* Function: DETECT_F
*
@@ -305,10 +305,10 @@ precision (detected_t *d)
for(_byte_mask = (unsigned char)1; _byte_mask; _byte_mask = (unsigned char) (_byte_mask << 1)) { \
_buf1[_i] ^= _byte_mask; \
HDmemcpy((void *)&_v2, (const void *)_buf1, sizeof(TYPE)); \
- H5_GCC_DIAG_OFF(float-equal) \
+ H5_GCC_DIAG_OFF("float-equal") \
if(_v1 != _v2) \
_pad_mask[_i] |= _byte_mask; \
- H5_GCC_DIAG_ON(float-equal) \
+ H5_GCC_DIAG_ON("float-equal") \
_buf1[_i] ^= _byte_mask; \
} /* end for */ \
\
@@ -363,7 +363,7 @@ precision (detected_t *d)
} \
}
-
+
/*-------------------------------------------------------------------------
* Function: DETECT_M
*
@@ -414,10 +414,10 @@ precision (detected_t *d)
else /* Little-Endian */ \
HDmemcpy(_buf+align_g[_ano]+(INFO.offset/8),((char *)&_val)+(INFO.offset/8),(size_t)(INFO.precision/8)); \
_val2 = *((TYPE*)(_buf+align_g[_ano])); \
- H5_GCC_DIAG_OFF(float-equal) \
+ H5_GCC_DIAG_OFF("float-equal") \
if(_val!=_val2) \
H5LONGJMP(jbuf_g, 1); \
- H5_GCC_DIAG_ON(float-equal) \
+ H5_GCC_DIAG_ON("float-equal") \
/* End Cray Check */ \
(INFO.align)=align_g[_ano]; \
} else { \
@@ -438,7 +438,7 @@ precision (detected_t *d)
#if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL)
-
+
/*-------------------------------------------------------------------------
* Function: sigsegv_handler
*
@@ -471,7 +471,7 @@ sigsegv_handler(int H5_ATTR_UNUSED signo)
#if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL)
-
+
/*-------------------------------------------------------------------------
* Function: sigbus_handler
*
@@ -504,7 +504,7 @@ sigbus_handler(int H5_ATTR_UNUSED signo)
#if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL)
-
+
/*-------------------------------------------------------------------------
* Function: sigill_handler
*
@@ -535,7 +535,7 @@ sigill_handler(int H5_ATTR_UNUSED signo)
}
#endif
-
+
/*-------------------------------------------------------------------------
* Function: print_results
*
@@ -814,7 +814,7 @@ done:\n\
fprintf(rawoutstream, "/* sigill_handler called: %d times */\n", sigill_handler_called_g);
} /* end print_results() */
-
+
/*-------------------------------------------------------------------------
* Function: iprint
*
@@ -904,7 +904,7 @@ iprint(detected_t *d)
}
-
+
/*-------------------------------------------------------------------------
* Function: byte_cmp
*
@@ -931,7 +931,7 @@ byte_cmp(int n, const void *_a, const void *_b, const unsigned char *pad_mask)
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: bit_cmp
*
@@ -972,7 +972,7 @@ bit_cmp(unsigned int nbytes, int *perm, void *_a, void *_b,
return 0;
}
-
+
/*-------------------------------------------------------------------------
* Function: fix_order
*
@@ -1040,7 +1040,7 @@ fix_order(int n, int last, int *perm, const char **mesg)
}
}
-
+
/*-------------------------------------------------------------------------
* Function: imp_bit
*
@@ -1094,7 +1094,7 @@ imp_bit(unsigned int n, int *perm, void *_a, void *_b, const unsigned char *pad_
return (a[perm[major]] >> minor) & 0x01 ? 0 : 1;
}
-
+
/*-------------------------------------------------------------------------
* Function: find_bias
*
@@ -1125,7 +1125,7 @@ find_bias(unsigned int epos, unsigned int esize, int *perm, void *_a)
return bias;
}
-
+
/*-------------------------------------------------------------------------
* Function: print_header
*
@@ -1266,7 +1266,7 @@ bit.\n";
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C89_integers
*
@@ -1288,7 +1288,7 @@ detect_C89_integers(void)
DETECT_I(unsigned long, ULONG, d_g[nd_g]); nd_g++;
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C89_floats
*
@@ -1304,7 +1304,7 @@ detect_C89_floats(void)
DETECT_F(double, DOUBLE, d_g[nd_g]); nd_g++;
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers8
*
@@ -1360,7 +1360,7 @@ detect_C99_integers8(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers16
*
@@ -1392,7 +1392,7 @@ detect_C99_integers16(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers32
*
@@ -1424,7 +1424,7 @@ detect_C99_integers32(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers64
*
@@ -1470,7 +1470,7 @@ detect_C99_integers64(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers
*
@@ -1490,7 +1490,7 @@ detect_C99_integers(void)
detect_C99_integers64();
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_floats
*
@@ -1515,7 +1515,7 @@ detect_C99_floats(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_alignments
*
@@ -1593,7 +1593,7 @@ static int verify_signal_handlers(int signum, void (*handler)(int))
}
#endif
-
+
/*-------------------------------------------------------------------------
* Function: main
*
@@ -1685,4 +1685,4 @@ main(int argc, char *argv[])
return EXIT_SUCCESS;
}
-H5_GCC_DIAG_ON(cast-align)
+H5_GCC_DIAG_ON("cast-align")
diff --git a/src/H5public.h b/src/H5public.h
index ba2505a..249cc1d 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -81,12 +81,11 @@ extern "C" {
*/
/* These pragmas are only implemented usefully in gcc 4.6+ */
#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406
- #define H5_GCC_DIAG_STR(s) #s
- #define H5_GCC_DIAG_JOINSTR(x,y) H5_GCC_DIAG_STR(x ## y)
- #define H5_GCC_DIAG_DO_PRAGMA(x) _Pragma (#x)
- #define H5_GCC_DIAG_PRAGMA(x) H5_GCC_DIAG_DO_PRAGMA(GCC diagnostic x)
+ #define H5_GCC_DIAG_JOINSTR(x, y) x y
+ #define H5_GCC_DIAG_DO_PRAGMA(x) _Pragma(#x)
+ #define H5_GCC_DIAG_PRAGMA(x) H5_GCC_DIAG_DO_PRAGMA(GCC diagnostic x)
- #define H5_GCC_DIAG_OFF(x) H5_GCC_DIAG_PRAGMA(push) H5_GCC_DIAG_PRAGMA(ignored H5_GCC_DIAG_JOINSTR(-W,x))
+ #define H5_GCC_DIAG_OFF(x) H5_GCC_DIAG_PRAGMA(push) H5_GCC_DIAG_PRAGMA(ignored H5_GCC_DIAG_JOINSTR("-W",x))
#define H5_GCC_DIAG_ON(x) H5_GCC_DIAG_PRAGMA(pop)
#else
#define H5_GCC_DIAG_OFF(x)
@@ -182,10 +181,10 @@ typedef long long ssize_t;
* type.
*/
#if H5_SIZEOF_LONG_LONG >= 8
-H5_GCC_DIAG_OFF(long-long)
+H5_GCC_DIAG_OFF("long-long")
typedef unsigned long long hsize_t;
typedef signed long long hssize_t;
-H5_GCC_DIAG_ON(long-long)
+H5_GCC_DIAG_ON("long-long")
# define H5_SIZEOF_HSIZE_T H5_SIZEOF_LONG_LONG
# define H5_SIZEOF_HSSIZE_T H5_SIZEOF_LONG_LONG
#else
diff --git a/src/H5system.c b/src/H5system.c
index c5fea9f..d664038 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -73,7 +73,7 @@
/* Track whether tzset routine was called */
static hbool_t H5_ntzset = FALSE;
-
+
/*-------------------------------------------------------------------------
* Function: HDfprintf
*
@@ -107,7 +107,7 @@ static hbool_t H5_ntzset = FALSE;
* format_templ in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
int
HDfprintf(FILE *stream, const char *fmt, ...)
{
@@ -473,9 +473,9 @@ HDfprintf(FILE *stream, const char *fmt, ...)
HDva_end(ap);
return nout;
} /* end HDfprintf() */
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
+
-
/*-------------------------------------------------------------------------
* Function: HDstrtoll
*
@@ -600,7 +600,7 @@ HDstrtoll(const char *s, const char **rest, int base)
return acc;
} /* end HDstrtoll() */
#endif
-
+
/*-------------------------------------------------------------------------
* Function: HDrand/HDsrand
*
@@ -635,8 +635,8 @@ void HDsrand(unsigned int seed)
}
#endif /* H5_HAVE_RAND_R */
-
-
+
+
/*-------------------------------------------------------------------------
* Function: Pflock
*
@@ -680,7 +680,7 @@ Pflock(int fd, int operation) {
} /* end Pflock() */
#endif /* H5_HAVE_FCNTL */
-
+
/*-------------------------------------------------------------------------
* Function: Nflock
*
@@ -697,7 +697,7 @@ Nflock(int H5_ATTR_UNUSED fd, int H5_ATTR_UNUSED operation) {
return 0;
} /* end Nflock() */
-
+
/*-------------------------------------------------------------------------
* Function: H5_make_time
*
@@ -782,7 +782,7 @@ done:
/* Offset between 1/1/1601 and 1/1/1970 in 100 nanosecond units */
#define _W32_FT_OFFSET (116444736000000000ULL)
-
+
/*-------------------------------------------------------------------------
* Function: Wgettimeofday
*
@@ -834,7 +834,7 @@ Wgettimeofday(struct timeval *tv, struct timezone *tz)
return 0;
} /* end Wgettimeofday() */
-
+
/*-------------------------------------------------------------------------
* Function: Wsetenv
*
@@ -873,7 +873,7 @@ Wsetenv(const char *name, const char *value, int overwrite)
#pragma comment(lib, "advapi32.lib")
#endif
-
+
/*-------------------------------------------------------------------------
* Function: H5_get_win32_times
*
@@ -952,7 +952,7 @@ H5_get_win32_times(H5_timevals_t *tvs /*in,out*/)
#define WloginBuffer_count 256
static char Wlogin_buffer[WloginBuffer_count];
-
+
char*
Wgetlogin(void)
{
@@ -990,7 +990,7 @@ int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap)
return count;
}
-
+
/*-------------------------------------------------------------------------
* Function: Wflock
*
@@ -1058,7 +1058,7 @@ Wnanosleep(const struct timespec *req, struct timespec *rem)
} /* end Wnanosleep() */
-
+
/*-------------------------------------------------------------------------
* Function: Wllround, Wllroundf, Wlround, Wlroundf, Wround, Wroundf
*
@@ -1236,7 +1236,7 @@ done:
#endif /* H5_HAVE_WIN32_API */
-
+
/*-------------------------------------------------------------------------
* Function: H5_build_extpath
*
@@ -1356,7 +1356,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5_build_extpath() */
-
+
/*--------------------------------------------------------------------------
* Function: H5_combine_path
*
@@ -1431,7 +1431,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5_combine_path() */
-
+
/*--------------------------------------------------------------------------
* Function: H5_nanosleep
*
@@ -1463,7 +1463,7 @@ H5_nanosleep(uint64_t nanosec)
#define H5_WIN32_ENV_VAR_BUFFER_SIZE 32767
-
+
/*-------------------------------------------------------------------------
* Function: H5_expand_windows_env_vars()
*