summaryrefslogtreecommitdiffstats
path: root/src/H5Zprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-04-09 02:34:21 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-04-09 02:34:21 (GMT)
commit92b6e817897817df03ad9f9b171ea4e11b901834 (patch)
tree5dc8befddaa0341a8380f80b55756ba1801ad110 /src/H5Zprivate.h
parent099a9f4e74078691a79874638b9aeeebb3bc1996 (diff)
downloadhdf5-92b6e817897817df03ad9f9b171ea4e11b901834.zip
hdf5-92b6e817897817df03ad9f9b171ea4e11b901834.tar.gz
hdf5-92b6e817897817df03ad9f9b171ea4e11b901834.tar.bz2
[svn-r6611] Purpose:
Code cleanup/new features Description: Switch over to a new style for registering filters with the library - instead passing in an ID, a string and a callback function to H5Zregister, the client should pass in a single pointer to a H5Z_claass_t struct which contains the ID, the description string and all the function callbacks as fields. Added support for a new "can apply" callback for each filter, which is called when a dataset is created to check whether the parameters for that filter apply correctly to the combination of the datatype and the chunk size (i.e. dataspace) for the dataset. Added support for a new "set local" callback for each filter, which is called when a dataset is created (after the "can apply" filter callback) and sets filter parameters that are specific to that particular dataset. Switched the filters we ship over to use the new H5Z_class_t struct for their internal registrations and also added "set local" callbacks to the szip and shuffle filters and a "can apply" callback to the szip filter. Lots of other code cleanups, etc. also Solution: Platforms tested: FreeBSD 4.8 (sleipnir) w/szip Linux 2.4 (sleipnir) w/szip Solaris 2.7 (arabica) w/FORTRAN IRIX64 6.5 (modi4) w/szip, FORTRAN & parallel Misc. update:
Diffstat (limited to 'src/H5Zprivate.h')
-rw-r--r--src/H5Zprivate.h63
1 files changed, 20 insertions, 43 deletions
diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h
index 6f90e76..84b2eeb 100644
--- a/src/H5Zprivate.h
+++ b/src/H5Zprivate.h
@@ -20,58 +20,35 @@
#define _H5Zprivate_H
#include "H5Zpublic.h"
-#include "H5Fprivate.h"
-#include "H5Ppublic.h"
-/*
- * The filter table maps filter identification numbers to structs that
- * contain a pointers to the filter function and timing statistics.
- */
-typedef struct H5Z_class_t {
- H5Z_filter_t id; /*filter ID number */
- char *name; /*comment for debugging */
- H5Z_func_t func; /*the filter function */
-
-#ifdef H5Z_DEBUG
- struct {
- hsize_t total; /*total number of bytes processed */
- hsize_t errors; /*bytes of total attributable to errors */
- H5_timer_t timer; /*execution time including errors */
- } stats[2]; /*0=output, 1=input */
-#endif
-} H5Z_class_t;
+/* Structure to store information about each filter's parameters */
+typedef struct {
+ H5Z_filter_t id; /*filter identification number */
+ unsigned flags; /*defn and invocation flags */
+ char *name; /*optional filter name */
+ size_t cd_nelmts; /*number of elements in cd_values[] */
+ unsigned *cd_values; /*client data values */
+} H5Z_filter_info_t;
struct H5O_pline_t; /*forward decl*/
-H5_DLL herr_t H5Z_register(H5Z_filter_t id, const char *comment,
- H5Z_func_t filter);
-H5_DLL herr_t H5Z_unregister (H5Z_filter_t id);
+/* Internal API routines */
+H5_DLL herr_t H5Z_register(const H5Z_class_t *cls);
+H5_DLL herr_t H5Z_unregister(H5Z_filter_t id);
H5_DLL herr_t H5Z_append(struct H5O_pline_t *pline, H5Z_filter_t filter,
- unsigned flags, size_t cd_nelmts,
- const unsigned int cd_values[]);
-H5_DLL herr_t H5Z_pipeline(H5F_t *f, const struct H5O_pline_t *pline,
+ unsigned flags, size_t cd_nelmts, const unsigned int cd_values[]);
+H5_DLL herr_t H5Z_modify(struct H5O_pline_t *pline, H5Z_filter_t filter,
+ unsigned flags, size_t cd_nelmts, const unsigned int cd_values[]);
+H5_DLL herr_t H5Z_pipeline(const struct H5O_pline_t *pline,
unsigned flags, unsigned *filter_mask/*in,out*/,
H5Z_EDC_t edc_read, H5Z_cb_t cb_struct,
size_t *nbytes/*in,out*/, size_t *buf_size/*in,out*/,
void **buf/*in,out*/);
H5_DLL H5Z_class_t *H5Z_find(H5Z_filter_t id);
-
-
-/* Filter routines */
-H5_DLL size_t H5Z_filter_deflate(unsigned flags, size_t cd_nelmts,
- const unsigned cd_values[], size_t nbytes,
- size_t *buf_size, void **buf);
-
-H5_DLL size_t H5Z_filter_szip(unsigned flags, size_t cd_nelmts,
- const unsigned cd_values[], size_t nbytes,
- size_t *buf_size, void **buf);
-
-H5_DLL size_t H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts,
- const unsigned cd_values[], size_t nbytes,
- size_t *buf_size, void **buf);
-
-H5_DLL size_t H5Z_filter_fletcher32(unsigned flags, size_t cd_nelmts,
- const unsigned cd_values[], size_t nbytes,
- size_t *buf_size, void **buf);
+H5_DLL herr_t H5Z_can_apply(hid_t dcpl_id, hid_t type_id);
+H5_DLL herr_t H5Z_set_local(hid_t dcpl_id, hid_t type_id);
+H5_DLL H5Z_filter_info_t *H5Z_filter_info(struct H5O_pline_t *pline,
+ H5Z_filter_t filter);
+H5_DLL htri_t H5Z_all_filters_avail(struct H5O_pline_t *pline);
#endif