summaryrefslogtreecommitdiffstats
path: root/src/H5HPprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-02-24 20:25:13 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-02-24 20:25:13 (GMT)
commit474a1434bd0b5a84c4cd5a485dd1bc7f47ca334f (patch)
treeebc424570bbeacb0ff20034de80a8976a616d060 /src/H5HPprivate.h
parentf239b2e7f330c8095297fd16993ad3851e7e5232 (diff)
downloadhdf5-474a1434bd0b5a84c4cd5a485dd1bc7f47ca334f.zip
hdf5-474a1434bd0b5a84c4cd5a485dd1bc7f47ca334f.tar.gz
hdf5-474a1434bd0b5a84c4cd5a485dd1bc7f47ca334f.tar.bz2
[svn-r6436] Purpose:
New internal feature Description: Add internal API for building and working with heaps (H5HP). This will be used for the LRU algorithm in the new metadata cache code. Platforms tested: Tested h5committest {arabica (fortran), eirene (fortran, C++) modi4 (parallel, fortran)} FreeBSD 4.7 (sleipnir)
Diffstat (limited to 'src/H5HPprivate.h')
-rw-r--r--src/H5HPprivate.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/H5HPprivate.h b/src/H5HPprivate.h
new file mode 100644
index 0000000..2c16ffe
--- /dev/null
+++ b/src/H5HPprivate.h
@@ -0,0 +1,70 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This file contains private information about the H5HP module
+ */
+#ifndef _H5HPprivate_H
+#define _H5HPprivate_H
+
+/**************************************/
+/* Public headers needed by this file */
+/**************************************/
+#ifdef LATER
+#include "H5HPpublic.h"
+#endif /* LATER */
+
+/***************************************/
+/* Private headers needed by this file */
+/***************************************/
+#include "H5private.h"
+
+/************/
+/* Typedefs */
+/************/
+
+/* Typedef for heap struct (defined in H5HP.c) */
+typedef struct H5HP_t H5HP_t;
+
+/* Typedef for objects which can be inserted into heaps */
+/* This _must_ be the first field in objects which can be inserted into heaps */
+typedef struct H5HP_info_t {
+ size_t heap_loc; /* Location of object in heap */
+}H5HP_info_t;
+
+/* Typedef for type of heap to create */
+typedef enum {
+ H5HP_MIN_HEAP, /* Minimum values in heap are at the "top" */
+ H5HP_MAX_HEAP /* Maximum values in heap are at the "top" */
+} H5HP_type_t;
+
+/**********/
+/* Macros */
+/**********/
+
+/********************/
+/* Private routines */
+/********************/
+H5_DLL H5HP_t *H5HP_create(H5HP_type_t heap_type);
+H5_DLL herr_t H5HP_insert(H5HP_t *heap, int val, void *obj);
+H5_DLL ssize_t H5HP_count(const H5HP_t *heap);
+H5_DLL herr_t H5HP_top(const H5HP_t *heap, int *val);
+H5_DLL herr_t H5HP_remove(H5HP_t *heap, int *val, void **ptr);
+H5_DLL herr_t H5HP_change(H5HP_t *heap, int val, void *obj);
+H5_DLL herr_t H5HP_incr(H5HP_t *heap, unsigned amt, void *obj);
+H5_DLL herr_t H5HP_decr(H5HP_t *heap, unsigned amt, void *obj);
+H5_DLL herr_t H5HP_close(H5HP_t *heap);
+
+#endif /* _H5HPprivate_H */
+