From 964549b93544fc253b4caa3a8b0c665159aa3b7e Mon Sep 17 00:00:00 2001 From: Frank Baker Date: Fri, 20 Jul 2001 17:08:20 -0500 Subject: [svn-r4249] Purpose: Bugfix Description: RM_H5T.html Datatypes.html Reworked H5T_conv_t description in both. Added H5T_cdata_t struct definition to both. Details in Datatypes.html; structs and pointer in RM_H5T.html. Tested: IE 5 --- doc/html/Datatypes.html | 80 +++++++++++++++++++++++++++++++++---------------- doc/html/RM_H5T.html | 39 ++++++++++++++++-------- 2 files changed, 81 insertions(+), 38 deletions(-) diff --git a/doc/html/Datatypes.html b/doc/html/Datatypes.html index 9e566d5..6a368ff 100644 --- a/doc/html/Datatypes.html +++ b/doc/html/Datatypes.html @@ -2701,29 +2701,57 @@ hid_t dset4 = H5Dcreate (file, "dset4", t2, space, H5P_DEFAULT); conversion path, then the hard function is favored and when multiple soft functions apply, the one defined last is favored. -

A data conversion function is of type H5T_conv_t - which is defined as: +

A data conversion function is of type H5T_conv_t, + which is defined as follows: + +

typedef herr_t (*H5T_conv_t) (hid_t src_id, 
+                              hid_t dst_id, 
+                              H5T_cdata_t *cdata,
+                              hsize_t nelmts, 
+                              size_t buf_stride, 
+                              size_t bkg_stride, 
+                              void *buffer, 
+                              void *bkg_buffer,
+                              hid_t dset_xfer_plist);
+ -

-

-typedef herr_t (*H5T_conv_t)(hid_t src_type,
-                             hid_t dest_type,
-			     H5T_cdata_t *cdata,
-			     size_t nelmts,
-			     void *buffer,
-                             void *background);
-    
- -

The conversion function is called with the source and - destination datatypes (src_type and - dst_type), path-constant data (cdata), the - number of instances of the datatype to convert - (nelmts), a buffer which initially contains an array of - data having the source type and on return will contain an array - of data having the destination type (buffer), and a - temporary or background buffer (background). Functions - return a negative value on failure and some other value on - success. +

The conversion function is called with + the source and destination datatypes (src_id and + dst_id), + the path-constant data struct (cdata), + the number of instances of the datatype to convert (nelmts), + a conversion buffer (buffer) which initially contains + an array of data having the source type and on return will + contain an array of data having the destination type, + a temporary or background buffer (bkg_buffer, + see description of H5T_BKG_YES below), + conversion and background buffer strides (buf_stride and + bkg_stride) that indicate what data is to be converted, and + a dataset transfer properties list (dset_xfer_plist). + Functions return a negative value on failure and + some other value on success. + +

buf_stride and bkg_stride are in bytes and + are related to the size of the datatype. + If every data element is to be converted, the parameter's value + is equal to the size of the datatype; + if every other data element is to be converted, the parameter's value + is equal to twice the size of the datatype; etc. + +

dset_xfer_plist may contain properties that are passed + to the read and write calls. + This parameter is currently used only with variable-length data. + +

bkg_buffer and bkg_stride are used only with + compound datatypes. + +

The path-constant data struct, H5T_cdata_t, + is declared as follows: + +

typedef struct *H5T_cdata_t (H5T_cmd_t command, 
+                             H5T_bkg_t need_bkg, 
+                             hbool_t *recalc,
+                             void *priv)

The command field of the cdata argument determines what happens within the conversion function. It's @@ -2883,9 +2911,9 @@ typedef herr_t (*H5T_conv_t)(hid_t src_type, 5 6 herr_t 7 cray_ushort2be (hid_t src, hid_t dst, - 8 H5T_cdata_t *cdata, - 9 size_t nelmts, void *buf, -10 const void *background) + 8 H5T_cdata_t *cdata, hsize_t nelmts, + 9 size_t buf_str, size_t bkg_str, void *buf, +10 const void *background, hid_t plist) 11 { 12 unsigned char *src = (unsigned char *)buf; 13 unsigned char *dst = src; @@ -3063,7 +3091,7 @@ H5Tregister(H5T_PERS_SOFT, "cus2be", -Last modified: 16 February 2001 +Last modified: 20 July 2001
diff --git a/doc/html/RM_H5T.html b/doc/html/RM_H5T.html index 9163683..d3b0c59 100644 --- a/doc/html/RM_H5T.html +++ b/doc/html/RM_H5T.html @@ -2171,17 +2171,32 @@ zero. For soft conversion functions, only the class of these types is important.

The type of the conversion function pointer is declared as: -

-
typedef herr_t (*H5T_conv_t) - (hid_t src_id, - hid_t dst_id, - H5T_cdata_t *cdata, - size_t nelmts, - size_t stride, - void *buf, - void *bkg, - hid_t dset_xfer_plist); -
+ +
typedef herr_t (*H5T_conv_t) (hid_t src_id, 
+                              hid_t dst_id, 
+                              H5T_cdata_t *cdata,
+                              hsize_t nelmts, 
+                              size_t buf_stride, 
+                              size_t bkg_stride, 
+                              void *buf, 
+                              void *bkg,
+                              hid_t dset_xfer_plist)
+
+

+ The H5T_cdata_t struct is declared as: +

+
typedef struct *H5T_cdata_t (H5T_cmd_t command, 
+                             H5T_bkg_t need_bkg, 
+                             hbool_t *recalc,
+                             void *priv)
+
+

+ The *H5T_conv_t parameters and + the elements of the H5T_cdata_t struct + are described more fully in the + "Data Conversion" section of + "The Datatype Interface (H5T)" in the HDF5 User's Guide.

Parameters:
H5T_pers_t pers @@ -2712,7 +2727,7 @@ H5T   HDF Help Desk
-Last modified: 5 July 2001 +Last modified: 20 July 2001
Describes HDF5 Release 1.4.2, July 2001 -- cgit v0.12