mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r4299] Purpose:
Bringing 'last minute' release branch edits into development branch. 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. Copy edits. Platforms tested: IE 5
This commit is contained in:
parent
73e6cacf08
commit
a2788dafc7
@ -2701,29 +2701,55 @@ hid_t dset4 = H5Dcreate (file, "dset4", t2, space, H5P_DEFAULT);
|
|||||||
conversion path, then the hard function is favored and when
|
conversion path, then the hard function is favored and when
|
||||||
multiple soft functions apply, the one defined last is favored.
|
multiple soft functions apply, the one defined last is favored.
|
||||||
|
|
||||||
<p>A data conversion function is of type <code>H5T_conv_t</code>
|
<p>A data conversion function is of type <code>H5T_conv_t</code>,
|
||||||
which is defined as:
|
which is defined as follows:
|
||||||
|
|
||||||
<p>
|
<dir><pre><em>typedef</em> herr_t (<em>*H5T_conv_t</em>) (hid_t <em>src_id</em>,
|
||||||
<code><pre>
|
hid_t <em>dst_id</em>,
|
||||||
typedef herr_t (*H5T_conv_t)(hid_t <em>src_type</em>,
|
H5T_cdata_t *<em>cdata</em>,
|
||||||
hid_t <em>dest_type</em>,
|
hsize_t <em>nelmts</em>,
|
||||||
H5T_cdata_t *<em>cdata</em>,
|
size_t <em>buf_stride</em>,
|
||||||
size_t <em>nelmts</em>,
|
size_t <em>bkg_stride</em>,
|
||||||
void *<em>buffer</em>,
|
void *<em>buffer</em>,
|
||||||
void *<em>background</em>);
|
void *<em>bkg_buffer</em>,
|
||||||
</pre></code>
|
hid_t <em>dset_xfer_plist</em>);</pre></dir>
|
||||||
|
|
||||||
<p>The conversion function is called with the source and
|
|
||||||
destination datatypes (<em>src_type</em> and
|
<p>The conversion function is called with
|
||||||
<em>dst_type</em>), path-constant data (<em>cdata</em>), the
|
the source and destination datatypes (<em>src_id</em> and
|
||||||
number of instances of the datatype to convert
|
<em>dst_id</em>),
|
||||||
(<em>nelmts</em>), a buffer which initially contains an array of
|
the path-constant data struct (<em>cdata</em>),
|
||||||
data having the source type and on return will contain an array
|
the number of instances of the datatype to convert (<em>nelmts</em>),
|
||||||
of data having the destination type (<em>buffer</em>), and a
|
a conversion buffer (<em>buffer</em>) which initially contains
|
||||||
temporary or background buffer (<em>background</em>). Functions
|
an array of data having the source type and on return will
|
||||||
return a negative value on failure and some other value on
|
contain an array of data having the destination type,
|
||||||
success.
|
a temporary or background buffer (<em>bkg_buffer</em>,
|
||||||
|
see description of <code>H5T_BKG_YES</code> below),
|
||||||
|
conversion and background buffer strides (<em>buf_stride</em> and
|
||||||
|
<em>bkg_stride</em>) that indicate what data is to be converted, and
|
||||||
|
a dataset transfer properties list (<em>dset_xfer_plist</em>).
|
||||||
|
|
||||||
|
<p><em>buf_stride</em> and <em>bkg_stride</em> 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.
|
||||||
|
|
||||||
|
<p><em>dset_xfer_plist</em> may contain properties that are passed
|
||||||
|
to the read and write calls.
|
||||||
|
This parameter is currently used only with variable-length data.
|
||||||
|
|
||||||
|
<p><em>bkg_buffer</em> and <em>bkg_stride</em> are used only with
|
||||||
|
compound datatypes.
|
||||||
|
|
||||||
|
<p>The path-constant data struct, <code>H5T_cdata_t</code>,
|
||||||
|
is declared as follows:
|
||||||
|
|
||||||
|
<dir><pre><em>typedef</em> struct <em>*H5T_cdata_t</em> (H5T_cmd_t <em>command</em>,
|
||||||
|
H5T_bkg_t <em>need_bkg</em>,
|
||||||
|
hbool_t *<em>recalc</em>,
|
||||||
|
void *<em>priv</em>)</pre></dir>
|
||||||
|
|
||||||
<p>The <code>command</code> field of the <em>cdata</em> argument
|
<p>The <code>command</code> field of the <em>cdata</em> argument
|
||||||
determines what happens within the conversion function. It's
|
determines what happens within the conversion function. It's
|
||||||
@ -2883,9 +2909,9 @@ typedef herr_t (*H5T_conv_t)(hid_t <em>src_type</em>,
|
|||||||
5
|
5
|
||||||
6 herr_t
|
6 herr_t
|
||||||
7 cray_ushort2be (hid_t src, hid_t dst,
|
7 cray_ushort2be (hid_t src, hid_t dst,
|
||||||
8 H5T_cdata_t *cdata,
|
8 H5T_cdata_t *cdata, hsize_t nelmts,
|
||||||
9 size_t nelmts, void *buf,
|
9 size_t buf_str, size_t bkg_str, void *buf,
|
||||||
10 const void *background)
|
10 const void *background, hid_t plist)
|
||||||
11 {
|
11 {
|
||||||
12 unsigned char *src = (unsigned char *)buf;
|
12 unsigned char *src = (unsigned char *)buf;
|
||||||
13 unsigned char *dst = src;
|
13 unsigned char *dst = src;
|
||||||
@ -3063,7 +3089,7 @@ H5Tregister(H5T_PERS_SOFT, "cus2be",
|
|||||||
|
|
||||||
<!-- Created: Thu Dec 4 14:57:32 EST 1997 -->
|
<!-- Created: Thu Dec 4 14:57:32 EST 1997 -->
|
||||||
<!-- hhmts start -->
|
<!-- hhmts start -->
|
||||||
Last modified: 16 February 2001
|
Last modified: 2 August 2001
|
||||||
<!-- hhmts end -->
|
<!-- hhmts end -->
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
@ -2171,17 +2171,33 @@ zero.
|
|||||||
For soft conversion functions, only the class of these types is important.
|
For soft conversion functions, only the class of these types is important.
|
||||||
<p>
|
<p>
|
||||||
The type of the conversion function pointer is declared as:
|
The type of the conversion function pointer is declared as:
|
||||||
<dl>
|
<dir>
|
||||||
<dd><code>typedef</code> <em>herr_t </em>(<code>*H5T_conv_t</code>)
|
<pre><code>typedef</code> <em>herr_t </em>(<code>*H5T_conv_t</code>) (<em>hid_t </em><code>src_id</code>,
|
||||||
(<em>hid_t </em><code>src_id</code>,
|
<em>hid_t </em><code>dst_id</code>,
|
||||||
<em>hid_t </em><code>dst_id</code>,
|
<em>H5T_cdata_t *</em><code>cdata</code>,
|
||||||
<em>H5T_cdata_t *</em><code>cdata</code>,
|
<em>hsize_t </em><code>nelmts</code>,
|
||||||
<em>size_t </em><code>nelmts</code>,
|
<em>size_t </em><code>buf_stride</code>,
|
||||||
<em>size_t </em><code>stride</code>,
|
<em>size_t </em><code>bkg_stride</code>,
|
||||||
<em>void *</em><code>buf</code>,
|
<em>void *</em><code>buf</code>,
|
||||||
<em>void *</em><code>bkg</code>,
|
<em>void *</em><code>bkg</code>,
|
||||||
<em>hid_t </em><code>dset_xfer_plist</code>);
|
<em>hid_t </em><code>dset_xfer_plist</code>)</pre>
|
||||||
</dl>
|
</dir>
|
||||||
|
<p>
|
||||||
|
The <code>H5T_cdata_t</code> struct is declared as:
|
||||||
|
<dir>
|
||||||
|
<pre><code>typedef</code> <em>struct </em><code>*H5T_cdata_t</code> (<em>H5T_cmd_t </em><code>command</code>,
|
||||||
|
<em>H5T_bkg_t </em><code>need_bkg</code>,
|
||||||
|
<em>hbool_t *</em><code>recalc</code>,
|
||||||
|
<em>void *</em><code>priv</code>)</pre>
|
||||||
|
</dir>
|
||||||
|
<p>
|
||||||
|
The <code>H5T_conv_t</code> parameters and
|
||||||
|
the elements of the <code>H5T_cdata_t</code> struct
|
||||||
|
are described more fully in the
|
||||||
|
“<a href="Datatypes.html#Datatypes-DataConversion"
|
||||||
|
target="WinUG">Data Conversion</a>”
|
||||||
|
section of “The Datatype Interface (H5T)”
|
||||||
|
in the <cite>HDF5 User's Guide</cite>.
|
||||||
<dt><strong>Parameters:</strong>
|
<dt><strong>Parameters:</strong>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><em>H5T_pers_t</em> <code>pers</code>
|
<dt><em>H5T_pers_t</em> <code>pers</code>
|
||||||
@ -2712,10 +2728,9 @@ H5T
|
|||||||
<a href="mailto:hdfhelp@ncsa.uiuc.edu">HDF Help Desk</a>
|
<a href="mailto:hdfhelp@ncsa.uiuc.edu">HDF Help Desk</a>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
Last modified: 5 July 2001
|
Last modified: 2 August 2001
|
||||||
<br>
|
<br>
|
||||||
Describes HDF5 Release 1.5, Unreleased Development Branch
|
Describes HDF5 Release 1.5, Unreleased Development Branch
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user