1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
|
<html>
<head><title>
HDF5/H5T Draft API Specification
</title></head>
<body>
<center>
<h1>H5T: Datatype Interface</h1>
</center>
<h2>Datatype Object API Functions</h2>
These functions create and manipulate the datatype which describes elements
of a dataset.
<table border=0>
<tr><td valign=top>
<ul>
<li><a href="#Datatype-Open">H5Topen</a>
<li><a href="#Datatype-Commit">H5Tcommit</a>
<li><a href="#Datatype-Committed">H5Tcommitted</a>
<li><a href="#Datatype-InsertArray">H5Tinsert_array</a>
<li><a href="#Datatype-Share">H5Tshare</a>
<li><a href="#Datatype-Find">H5Tfind</a>
<li><a href="#Datatype-Convert">H5Tconvert</a>
<li><a href="#Datatype-SetOverflow">H5Tset_overflow</a>
<li><a href="#Datatype-GetOverflow">H5Tget_overflow</a>
<li>
<li><a href="#Datatype-Create">H5Tcreate</a>
<li><a href="#Datatype-Copy">H5Tcopy</a>
<li><a href="#Datatype-Equal">H5Tequal</a>
<li><a href="#Datatype-Lock">H5Tlock</a>
<li><a href="#Datatype-GetClass">H5Tget_class</a>
<li><a href="#Datatype-GetSize">H5Tget_size</a>
<li><a href="#Datatype-SetSize">H5Tset_size</a>
<li><a href="#Datatype-GetOrder">H5Tget_order</a>
<li><a href="#Datatype-SetOrder">H5Tset_order</a>
<li><a href="#Datatype-GetPrecision">H5Tget_precision</a>
<li><a href="#Datatype-SetPrecision">H5Tset_precision</a>
<li><a href="#Datatype-GetOffset">H5Tget_offset</a>
<li><a href="#Datatype-SetOffset">H5Tset_offset</a>
<li><a href="#Datatype-GetPad">H5Tget_pad</a>
</ul>
</td><td> </td><td valign=top>
<ul>
<li><a href="#Datatype-SetPad">H5Tset_pad</a>
<li><a href="#Datatype-GetSign">H5Tget_sign</a>
<li><a href="#Datatype-SetSign">H5Tset_sign</a>
<li><a href="#Datatype-GetFields">H5Tget_fields</a>
<li><a href="#Datatype-SetFields">H5Tset_fields</a>
<li><a href="#Datatype-GetEbias">H5Tget_ebias</a>
<li><a href="#Datatype-SetEbias">H5Tset_ebias</a>
<li><a href="#Datatype-GetNorm">H5Tget_norm</a>
<li><a href="#Datatype-SetNorm">H5Tset_norm</a>
<li><a href="#Datatype-GetInpad">H5Tget_inpad</a>
<li><a href="#Datatype-SetInpad">H5Tset_inpad</a>
<li><a href="#Datatype-GetCset">H5Tget_cset</a>
<li><a href="#Datatype-SetCset">H5Tset_cset</a>
<li><a href="#Datatype-GetStrpad">H5Tget_strpad</a>
</ul>
</td><td> </td><td valign=top>
<ul>
<li><a href="#Datatype-SetStrpad">H5Tset_strpad</a>
<li><a href="#Datatype-GetNmembers">H5Tget_nmembers</a>
<li><a href="#Datatype-GetMemberName">H5Tget_member_name</a>
<li><a href="#Datatype-GetMemberOffset">H5Tget_member_offset</a>
<li><a href="#Datatype-GetMemberDims">H5Tget_member_dims</a>
<li><a href="#Datatype-GetMemberType">H5Tget_member_type</a>
<li><a href="#Datatype-Insert">H5Tinsert</a>
<li><a href="#Datatype-Pack">H5Tpack</a>
<li><a href="#Datatype-RegisterHard">H5Tregister_hard</a>
<li><a href="#Datatype-RegisterSoft">H5Tregister_soft</a>
<li><a href="#Datatype-Unregister">H5Tunregister</a>
<li><a href="#Datatype-Close">H5Tclose</a>
</ul>
</td></tr>
</table>
<p>
The Datatype interface, H5T, provides a mechanism to describe the
storage format of individual data points of a data set and is
hopefully designed in such a way as to allow new features to be
easily added without disrupting applications that use the data
type interface. A dataset (the H5D interface) is composed of a
collection or raw data points of homogeneous type organized
according to the data space (the H5S interface).
<p>
A data type is a collection of data type properties, all of
which can be stored on disk, and which when taken as a whole,
provide complete information for data conversion to or from that
data type. The interface provides functions to set and query
properties of a data type.
<p>
A <em>data point</em> is an instance of a <em>datatype</em>,
which is an instance of a <em>type class</em>. We have defined
a set of type classes and properties which can be extended at a
later time. The atomic type classes are those which describe
types which cannot be decomposed at the data type interface
level; all other classes are compound.
<p>
See <a href="Datatypes.html"><cite>The Datatype Interface (H5T)</cite></a>
in the <cite>HDF5 User's Guide</cite> for further information.
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-Open">H5Topen</a>
<dt><strong>Signature:</strong>
<dd><em>hid_t</em><code>H5Topen</code>(<em>hid_t</em> <code>loc_id</code>,
<em>const char *</em> <code>name</code>
)
<dt><strong>Purpose:</strong>
<dd>Opens a named datatype.
<dt><strong>Description:</strong>
<dd><b>From UG:</b> <code>H5Topen</code> opens a named datatype at the location
specified by <code>loc_id</code> and returns an identifier
for the data type. The identifier should eventually be closed
by calling <code>H5Tclose()</code> to release resources.
<code>loc_id</code> is either a file or group identifier.
<p>
<b>From SC:</b> Opens a named datatype.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>loc_id</code>
<dd>A file or group identifier.
<dt><em>const char *</em> <code>name</code>
<dd>A datatype name.
</dl>
<dt><strong>Returns:</strong>
<dd>Returns a named datatype identifier if successful;
otherwise FAIL (-1).
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-Commit">H5Tcommit</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t</em><code>H5Tcommit</code>(<em>hid_t</em> <code>loc_id</code>,
<em>const char *</em> <code>name</code>,
<em>hid_t</em> <code>type</code>
)
<dt><strong>Purpose:</strong>
<dd>Commits a transient datatype to a file, creating a new named datatype.
<dt><strong>Description:</strong>
<dd><b>From UG:</b> <code>H5Tcommit</code> commits a transient datatype (not immutable)
to a file, turned it into a named datatype. The <code>loc_id</code>
is either a file or group identifier which, when combined with
<code>name</code>, refers to a new named data type.
<p>
<b>From SC:</b> Saves a transient data type to a file and turns
the type identifier into a named, immutable type.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>loc_id</code>
<dd>A file or group identifier.
<dt><em>const char *</em> <code>name</code>
<dd>A datatype name.
<dt><em>hid_t</em> <code>type</code>
<dd>A datatype identifier.
</dl>
<dt><strong>Returns:</strong>
<dd>Returns SUCCEED (0) if successful;
otherwise FAIL (-1).
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-Committed">H5Tcommitted</a>
<dt><strong>Signature:</strong>
<dd><em>hbool_t</em><code>H5Tcommitted</code>(<em>hid_t</em> <code>type</code>)
<dt><strong>Purpose:</strong>
<dd>Determines whether a datatype is a named type or a transient type.
<dt><strong>Description:</strong>
<dd><b>From UG:</b> <code>H5Tcommitted</code> queries a type to determine whether
it is a named type or a transient type. If this function returns
a positive value, then the type is named (that is, it has been
committed, perhaps by some other application). Datasets which
return committed data types with <code>H5Dget_type()</code> are
able to share the data type with other datasets in the same file.
<p>
<b>From SC:</b> Determines whether a data type is committed.
<dt><strong>Parameters:</strong>
<dl>
<dt>hid_t</em> <code>type</code>
<dd>Datatype identifier.
</dl>
<dt><strong>Returns:</strong>
<dd><b>From UG:</b> Returns a datatype identifier if successful;
otherwise FAIL (-1).
<dd><b>From SC:</b> The successful returns values are TRUE if committed,
else FALSE. Otherwise returns FAIL (-1).
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-InsertArray">H5Tinsert_array</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t</em><code>H5Tinsert_array</code>(<em>hid_t</em> <code>parent_id</code>,
<em>const char *</em><code>name</code>,
<em>size_t</em> <code>offset</code>,
<em>int</em> <code>ndims</code>,
<em>const size_t *</em><code>dim</code>,
<em>const int *</em><code>perm</code>,
<em>hid_t</em> <code>member_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Adds a new member to a compound data type.
<dt><strong>Description:</strong>
<dd><b>From SC:</b> <code>H5Tinsert_array</code> adds a new member to the
compound data type <code>parent_id</code>. The new member's name,
<code>name</code>, must be unique within the compound data type.
The <code>offset</code> argument defines the start of
the member in an instance of the compound data type and
<code>member_id</code> is the type of the new member.
The member is an array with <code>ndims</code> dimensionality
and the size of the array is </em><code>dim</code>.
The total member size should be relatively small
<dt><strong>Parameters:</strong>
<dl>
<dt>hid_t</em> <code>parent_id</code>
<dd>
<dt><em>const char *</em><code>name</code>
<dd>
<dt><em>size_t</em> <code>offset</code>
<dd>
<dt><em>int</em> <code>ndims</code>
<dd>
<dt><em>const size_t *</em><code>dim</code>
<dd>
<dt><em>const int *</em><code>perm</code>
<dd>
<dt><em>hid_t</em> <code>member_id</code>
<dd>
</dl>
<dt><strong>Returns:</strong>
<dd>Returns SUCCEED (0) if successful;
otherwise FAIL (-1).
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-Find">H5Tfind</a>
<dt><strong>Signature:</strong>
<dd><em>H5T_conv_t</em> <code>H5Tfind</code>(<em>hid_t</em> <code>src_id</code>,
<em>hid_t</em> <code>dst_id</code>,
<em>H5T_cdata_t **</em><code>pcdata</code>
)
<dt><strong>Purpose:</strong>
<dd>Finds a conversion function.
<dt><strong>Description:</strong>
<dd><b>From SC:</b> <code>H5Tfind</code> finds a conversion function
that can handle a conversion from type <code>src_id</code> to
type <code>dst_id</code>.
The <code>pcdata</code> argument is a pointer
to a pointer to type conversion data which was created and
initialized by the soft type conversion function of this path
when the conversion function was installed on the path.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>src_id</code>
<dd>
<dt><em>hid_t</em> <code>dst_id</code>
<dd>
<dt><em>H5T_cdata_t **</em><code>pcdata</code>
<dd>
</dl>
<dt><strong>Returns:</strong>
<dd>Returns a pointer to a suitable conversion function if successful.
Otherwise returns FAIL (-1).
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-Convert">H5Tconvert</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t</em> <code>H5Tconvert</code>(<em>hid_t</em> <code>src_id</code>,
<em>hid_t</em> <code>dst_id</code>,
<em>size_t</em> <code>nelmts</code>,
<em>void *</em><code>buf</code>,
<em>void *</em><code>background</code>
)
<dt><strong>Purpose:</strong>
<dd>Converts data from between specified datatypes.
<dt><strong>Description:</strong>
<dd><b>From SC:</b> Convert <code>nelmts</code> elements from type
<code>src_id</code> to type <code>dst_id</code>.
The source elements are packed in <code>buf</code> and on return
the destination will be packed in <code>buf</code>.
That is, the conversion is performed in place.
The optional background buffer is an array of <code>nelmts</code>
values of destination type which are merged with the converted
values to fill in cracks (for instance, <code>background</code>
might be an array of structs with the <code>a</code> and
<code>b</code> fields already initialized and the conversion
of <code>buf</code> supplies the <code>c</code> and <code>d</code>
field values).
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>src_id</code>
<dd>
<dt><em>hid_t</em> <code>dst_id</code>
<dd>
<dt><em>size_t</em> <code>nelmts</code>
<dd>
<dt><em>void *</em><code>buf</code>
<dd>
<dt><em>void *</em><code>background</code>
<dd>
</dl>
<dt><strong>Returns:</strong>
<dd>Returns SUCCEED (0) if successful;
otherwise FAIL (-1).
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-SetOverflow">H5Tset_overflow</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t</em> <code>H5Tset_overflow</code>(<em>H5T_overflow_t</em> <code>func</code>)
<dt><strong>Purpose:</strong>
<dd>Sets the overflow handler to a specified function.
<dt><strong>Description:</strong>
<dd><b>From SC:</b> <code>H5Tset_overflow</code> sets the overflow handler
to be the function specified by <code>func</code>.
<code>func</code> will be called for all data type conversions that
result in an overflow.
<p>
See the definition of <code>H5T_overflow_t</code> in
<code>H5Tpublic.h</code> for documentation
of arguments and return values.
The prototype for <code>H5T_overflow_t</code> is as follows:<br>
<code>herr_t (*H5T_overflow_t)(hid_t src_id, hid_t dst_id,
void *src_buf, void *dst_buf);
</code>
<p>
The NULL pointer may be passed to remove the overflow handler.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>H5T_overflow_t</em> <code>func</code>
<dd>
</dl>
<dt><strong>Returns:</strong>
<dd>Returns SUCCEED (0) if successful;
otherwise FAIL (-1).
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetOverflow">H5Tget_overflow</a>
<dt><strong>Signature:</strong>
H5Tget_overflow ()
<dd><em>H5T_overflow_t</em> <code>H5Tget_overflow</code>(<code>void</code>)
<dt><strong>Purpose:</strong>
<dd>Returns a pointer to the current global overflow function.
<dt><strong>Description:</strong>
<dd><b>From SC:</b> <code>H5Tset_overflow</code> returns a pointer
to the current global overflow function.
This is an application-defined function that is called whenever a
data type conversion causes an overflow.
<dt><strong>Parameters:</strong>
<dl>
<dt>None.
</dl>
<dt><strong>Returns:</strong>
<dd>Returns a pointer to an application-defined function if successful.
Otherwise returns NULL; this can happen if no overflow handling
function is registered.
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-Create">H5Tcreate</a>
<dt><strong>Signature:</strong>
<dd><em>hid_t </em><code>H5Tcreate</code>(<em>H5T_class_t </em><code>class</code>,
<em>size_t</em><code>size</code>
)
<dt><strong>Purpose:</strong>
<dd>Creates a new dataype.
<dt><strong>Description:</strong>
<dd><code>H5Tcreate</code> creates a new dataype of the specified class with the
specified number of bytes. Currently, only the <code>H5T_COMPOUND</code>
datatype class is supported with this function, use <code>H5Tcopy</code>
to create integer or floating-point datatypes. The datatype ID
returned from this function should be released with H5Tclose or resource
leaks will result.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>H5T_class_t</em> <code>class</code>
<dd>Class of datatype to create.
<dt><em>size_t</em> <code>size</code>
<dd>The number of bytes in the datatype to create.
</dl>
<dt><strong>Returns:</strong>
<dd>Datatype ID on success, negative on failure.
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-Copy">H5Tcopy</a>
<dt><strong>Signature:</strong>
<dd><em>hid_t </em><code>H5Tcopy</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Copies an existing datatype.
<dt><strong>Description:</strong>
<dd><code>H5Tcopy</code> copies an existing datatype. The datatype ID returned
should be released with H5Tclose or resource leaks will occur. Native
datatypes supported by the library are:
<ul> <dl>
<dt>H5T_NATIVE_CHAR
<dd> Native character type, declare dataset array as 'char'
<dt>H5T_NATIVE_UCHAR
<dd> Native unsigned character type, declare dataset array as 'unsigned char'
<dt>H5T_NATIVE_SHORT
<dd> Native short type, declare dataset array as 'short'
<dt>H5T_NATIVE_USHORT
<dd> Native unsigned short type, declare dataset array as 'unsigned short'
<dt>H5T_NATIVE_INT
<dd> Native int type, declare dataset array as 'int'
<dt>H5T_NATIVE_UINT
<dd> Native unsigned int type, declare dataset array as 'unsigned int'
<dt>H5T_NATIVE_LONG
<dd> Native long type, declare dataset array as 'unsigned long'
<dt>H5T_NATIVE_ULONG
<dd> Native unsigned long type, declare dataset array as 'unsigned long'
<dt>H5T_NATIVE_LLONG
<dd> Native long long type, declare dataset array as 'unsigned long long'
<dt>H5T_NATIVE_ULLONG
<dd> Native unsigned long long type, declare dataset array as 'unsigned long long'
<dt>H5T_NATIVE_INT8
<dd> Native signed 8-bit type, declare dataset array as 'int8'
<dt>H5T_NATIVE_UINT8
<dd> Native unsigned 8-bit type, declare dataset array as 'uint8'
<dt>H5T_NATIVE_INT16
<dd> Native signed 16-bit type, declare dataset array as 'int16'
<dt>H5T_NATIVE_UINT16
<dd> Native unsigned 16-bit type, declare dataset array as 'uint16'
<dt>H5T_NATIVE_INT32
<dd> Native signed 32-bit type, declare dataset array as 'int32'
<dt>H5T_NATIVE_UINT32
<dd> Native unsigned 32-bit type, declare dataset array as 'uint32'
<dt>H5T_NATIVE_INT64
<dd> Native signed 64-bit type, declare dataset array as 'uint64'
<dt>H5T_NATIVE_UINT64
<dd> Native unsigned 64-bit type, declare dataset array as 'uint64'
<dt>H5T_NATIVE_FLOAT
<dd> Native single-precision float type, declare dataset array as 'float'
<dt>H5T_NATIVE_DOUBLE
<dd> Native double-precision float type, declare dataset array as 'double'
</dl> </ul>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to copy.
</dl>
<dt><strong>Returns:</strong>
<dd>Datatype ID on success, negative on failure.
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-Equal">H5Tequal</a>
<dt><strong>Signature:</strong>
<dd><em>hbool_t </em><code>H5Tequal</code>(<em>hid_t </em><code>type_id1</code>,
<em>hid_t</em><code>type_id2</code>
)
<dt><strong>Purpose:</strong>
<dd>Determines whether two datatype identifiers refer to the same datatype.
<dt><strong>Description:</strong>
<dd><code>H5Tequal</code> determines whether two datatype identifiers
refer to the same datatype.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id1</code>
<dd>ID of datatype to compare.
<dt><em>hid_t</em> <code>type_id2</code>
<dd>ID of datatype to compare.
</dl>
<dt><strong>Returns:</strong>
<dd>TRUE/FALSE/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-Lock">H5Tlock</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tlock</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Locks a type.
<dt><strong>Description:</strong>
<dd><code>H5Tlock</code> locks a type, making it read-only and non-destrucible.
This is normally done by the library for predefined data types so the
application doesn't inadvertently change or delete a predefined type.
Once a data type is locked it can never be unlocked.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to lock.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetClass">H5Tget_class</a>
<dt><strong>Signature:</strong>
<dd><em>H5T_class_t </em><code>H5Tget_class</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Returns the base class of a datatype.
<dt><strong>Description:</strong>
<dd><code>H5Tget_class</code> returns the base class of a datatype.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
</dl>
<dt><strong>Returns:</strong>
<dd>Non-negative type class on success, negative on failure.
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetSize">H5Tget_size</a>
<dt><strong>Signature:</strong>
<dd><em>size_t </em><code>H5Tget_size</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Returns the size of a datatype.
<dt><strong>Description:</strong>
<dd><code>H5Tget_size</code> returns the size of a datatype in bytes.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
</dl>
<dt><strong>Returns:</strong>
<dd>Positve size in bytes on success, 0 on failure.
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-SetSize">H5Tset_size</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tset_size</code>(<em>hid_t </em><code>type_id</code>,
<em>size_t</em><code>size</code>
)
<dt><strong>Purpose:</strong>
<dd>Sets the total size for an atomic data type.
<dt><strong>Description:</strong>
<dd><code>H5Tset_size</code> sets the total size in bytes for an
atomic data type (this
operation is not permitted on compound data types). If the size is
decreased so that the significant bits of the data type extend beyond
the edge of the new size, then the `offset' property is decreased
toward zero. If the `offset' becomes zero and the significant
bits of the data type still hang over the edge of the new size, then
the number of significant bits is decreased.
Adjusting the size of an H5T_STRING automatically sets the precision
to 8*size. All data types have a positive size.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to change size.
<dt><em>size_t</em> <code>size</code>
<dd>Size in bytes to modify datatype.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetOrder">H5Tget_order</a>
<dt><strong>Signature:</strong>
<dd><em>H5T_order_t </em><code>H5Tget_order</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Returns the byte order of an atomic datatype.
<dt><strong>Description:</strong>
<dd><code>H5Tget_order</code> returns the byte order of an atomic datatype.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
</dl>
<dt><strong>Returns:</strong>
<dd>Byte order constant on success, negative on failure
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-SetOrder">H5Tset_order</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tset_order</code>(<em>hid_t </em><code>type_id</code>,
<em>H5T_order_t</em><code>order</code>
)
<dt><strong>Purpose:</strong>
<dd>Sets the byte ordering of an atomic datatype.
<dt><strong>Description:</strong>
<dd><code>H5Tset_order</code> sets the byte ordering of an atomic datatype.
Byte orderings currently supported are:
<ul> <dl>
<dt>H5T_ORDER_LE
<dd> Little-endian byte ordering (default)
<dt>H5T_ORDER_BE
<dd> Big-endian byte ordering
<dt>H5T_ORDER_Vax
<dd> VAX-endianness byte ordering (not currently supported)
</dl> </ul>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to set.
<dt><em>H5T_order_t</em> <code>order</code>
<dd>Byte ordering constant.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetPrecision">H5Tget_precision</a>
<dt><strong>Signature:</strong>
<dd><em>size_t </em><code>H5Tget_precision</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Returns the precision of an atomic data type.
<dt><strong>Description:</strong>
<dd><code>H5Tget_precision</code> returns the precision of an atomic data type. The
precision is the number of significant bits which, unless padding is
present, is 8 times larger than the value returned by H5Tget_size().
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
</dl>
<dt><strong>Returns:</strong>
<dd>Number of significant bits on success, 0 on failure
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-SetPrecision">H5Tset_precision</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tset_precision</code>(<em>hid_t </em><code>type_id</code>,
<em>size_t</em><code>precision</code>
)
<dt><strong>Purpose:</strong>
<dd>Sets the precision of an atomic data type.
<dt><strong>Description:</strong>
<dd><code>H5Tset_precision</code> sets the precision of an atomic data type.
The precision is the number of significant bits which, unless padding
is present, is 8 times larger than the value returned by H5Tget_size().
<P>If the precision is increased then the offset is decreased and then
the size is increased to insure that significant bits do not "hang
over" the edge of the data type.
<P>Changing the precision of an H5T_STRING automatically changes the
size as well. The precision must be a multiple of 8.
<P>When decreasing the precision of a floating point type, set the
locations and sizes of the sign, mantissa, and exponent fields
first.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to set.
<dt><em>size_t</em> <code>precision</code>
<dd>Number of bits of precision for datatype.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetOffset">H5Tget_offset</a>
<dt><strong>Signature:</strong>
<dd><em>size_t </em><code>H5Tget_offset</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Retrieves the bit offset of the first significant bit.
<dt><strong>Description:</strong>
<dd><code>H5Tget_offset</code> retrieves the bit offset of the first significant bit.
The signficant bits of an atomic datum can be offset from the beginning
of the memory for that datum by an amount of padding. The `offset'
property specifies the number of bits of padding that appear to the
"right of" the value. That is, if we have a 32-bit datum with 16-bits
of precision having the value 0x1122 then it will be layed out in
memory as (from small byte address toward larger byte addresses):
<br>
<br>
<table border align=center cellpadding=4 width="80%">
<tr align=center>
<th width="20%">Byte Position</th>
<th width="20%">Big-Endian Offset=0</th>
<th width="20%">Big-Endian Offset=16</th>
<th width="20%">Little-Endian Offset=0</th>
<th width="20%">Little-Endian Offset=16</th>
</tr>
<tr align=center>
<td>0:</td>
<td>[ pad]</td>
<td>[0x11]</td>
<td>[0x22]</td>
<td>[ pad]</td>
</tr>
<tr align=center>
<td>1:</td>
<td>[ pad]</td>
<td>[0x22]</td>
<td>[0x11]</td>
<td>[ pad]</td>
</tr>
<tr align=center>
<td>2:</td>
<td>[0x11]</td>
<td>[ pad]</td>
<td>[ pad]</td>
<td>[0x22]</td>
</tr>
<tr align=center>
<td>3:</td>
<td>[0x22]</td>
<td>[ pad]</td>
<td>[ pad]</td>
<td>[0x11]</td>
</tr>
</table>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
</dl>
<dt><strong>Returns:</strong>
<dd>Positive offset value on success, 0 on failure.
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-SetOffset">H5Tset_offset</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tset_offset</code>(<em>hid_t </em><code>type_id</code>,
<em>size_t</em> <code>offset</code>
)
<dt><strong>Purpose:</strong>
<dd>Sets the bit offset of the first significant bit.
<dt><strong>Description:</strong>
<dd><code>H5Tset_offset</code> sets the bit offset of the first significant bit. The
signficant bits of an atomic datum can be offset from the beginning of
the memory for that datum by an amount of padding. The `offset'
property specifies the number of bits of padding that appear to the
"right of" the value. That is, if we have a 32-bit datum with 16-bits
of precision having the value 0x1122 then it will be layed out in
memory as (from small byte address toward larger byte addresses):
<br>
<br>
<table border align=center cellpadding=4 width="80%">
<tr align=center>
<th width="20%">Byte Position</th>
<th width="20%">Big-Endian Offset=0</th>
<th width="20%">Big-Endian Offset=16</th>
<th width="20%">Little-Endian Offset=0</th>
<th width="20%">Little-Endian Offset=16</th>
</tr>
<tr align=center>
<td>0:</td>
<td>[ pad]</td>
<td>[0x11]</td>
<td>[0x22]</td>
<td>[ pad]</td>
</tr>
<tr align=center>
<td>1:</td>
<td>[ pad]</td>
<td>[0x22]</td>
<td>[0x11]</td>
<td>[ pad]</td>
</tr>
<tr align=center>
<td>2:</td>
<td>[0x11]</td>
<td>[ pad]</td>
<td>[ pad]</td>
<td>[0x22]</td>
</tr>
<tr align=center>
<td>3:</td>
<td>[0x22]</td>
<td>[ pad]</td>
<td>[ pad]</td>
<td>[0x11]</td>
</tr>
</table>
<P>If the offset is incremented then the total size is
incremented also if necessary to prevent significant bits of
the value from hanging over the edge of the data type.
<P>The offset of an H5T_STRING cannot be set to anything but
zero.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to set.
<dt><em>size_t</em> <code>offset</code>
<dd>Offset of first significant bit.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetPad">H5Tget_pad</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tget_pad</code>(<em>hid_t </em><code>type_id</code>,
<em>H5T_pad_t *</em> <code>lsb</code>,
<em>H5T_pad_t *</em> <code>msb</code>
)
<dt><strong>Purpose:</strong>
<dd>Retrieves the padding type of the least and most-significant bit padding.
<dt><strong>Description:</strong>
<dd><code>H5Tget_pad</code> retrieves the padding type of the least and most-significant
bit padding. Valid types are:
<ul> <dl>
<dt>H5T_PAD_ZERO
<dd>Set background to zeros.
<dt>H5T_PAD_ONE
<dd>Set background to ones.
<dt>H5T_PAD_BACKGROUND
<dd>Leave background alone.
</dl> </ul>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
<dt><em>H5T_pad_t *</em> <code>lsb</code>
<dd>Pointer to location to return least-significant bit padding type.
<dt><em>H5T_pad_t *</em> <code>msb</code>
<dd>Pointer to location to return most-significant bit padding type.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-SetPad">H5Tset_pad</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tset_pad</code>(<em>hid_t </em><code>type_id</code>,
<em>H5T_pad_t</em> <code>lsb</code>,
<em>H5T_pad_t</em> <code>msb</code>
)
<dt><strong>Purpose:</strong>
<dd>Sets the least and most-significant bits padding types.
<dt><strong>Description:</strong>
<dd><code>H5Tset_pad</code> sets the least and most-significant bits padding types.
<ul> <dl>
<dt>H5T_PAD_ZERO
<dd>Set background to zeros.
<dt>H5T_PAD_ONE
<dd>Set background to ones.
<dt>H5T_PAD_BACKGROUND
<dd>Leave background alone.
</dl> </ul>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to set.
<dt><em>H5T_pad_t</em> <code>lsb</code>
<dd>Padding type for least-significant bits.
<dt><em>H5T_pad_t</em> <code>msb</code>
<dd>Padding type for most-significant bits.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetSign">H5Tget_sign</a>
<dt><strong>Signature:</strong>
<dd><em>H5T_sign_t </em><code>H5Tget_sign</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Retrieves the sign type for an integer type.
<dt><strong>Description:</strong>
<dd><code>H5Tget_sign</code> retrieves the sign type for an integer type.
Valid types are:
<ul> <dl>
<dt>H5T_SGN_NONE
<dd>Unsigned integer type.
<dt>H5T_SGN_2
<dd>Two's complement signed integer type.
</dl> </ul>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
</dl>
<dt><strong>Returns:</strong>
<dd>Non-negative sign type on success, negative on failure
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-SetSign">H5Tset_sign</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tset_sign</code>(<em>hid_t </em><code>type_id</code>,
<em>H5T_sign_t</em> <code>sign</code>
)
<dt><strong>Purpose:</strong>
<dd>Sets the sign proprety for an integer type.
<dt><strong>Description:</strong>
<dd><code>H5Tset_sign</code> sets the sign proprety for an integer type.
<ul> <dl>
<dt>H5T_SGN_NONE
<dd>Unsigned integer type.
<dt>H5T_SGN_2
<dd>Two's complement signed integer type.
</dl> </ul>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to set.
<dt><em>H5T_sign_t</em> <code>sign</code>
<dd>Sign type.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetFields">H5Tget_fields</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tget_fields</code>(<em>hid_t </em><code>type_id</code>,
<em>size_t *</em> <code>epos</code>,
<em>size_t *</em> <code>esize</code>,
<em>size_t *</em> <code>mpos</code>,
<em>size_t *</em> <code>msize</code>
)
<dt><strong>Purpose:</strong>
<dd>Retrieves floating point data type bit field information.
<dt><strong>Description:</strong>
<dd><code>H5Tget_fields</code> retrieves information about the locations of the various
bit fields of a floating point data type. The field positions are bit
positions in the significant region of the data type. Bits are
numbered with the least significant bit number zero.
Any (or even all) of the arguments can be null pointers.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
<dt><em>size_t *</em> <code>epos</code>
<dd>Pointer to location to return exponent bit-position.
<dt><em>size_t *</em> <code>esize</code>
<dd>Pointer to location to return size of exponent in bits.
<dt><em>size_t *</em> <code>mpos</code>
<dd>Pointer to location to return mantissa bit-position.
<dt><em>size_t *</em> <code>msize</code>
<dd>Pointer to location to return size of mantissa in bits.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-SetFields">H5Tset_fields</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tset_fields</code>(<em>hid_t </em><code>type_id</code>,
<em>size_t</em> <code>epos</code>,
<em>size_t</em> <code>esize</code>,
<em>size_t</em> <code>mpos</code>,
<em>size_t</em> <code>msize</code>
)
<dt><strong>Purpose:</strong>
<dd>Sets locations and sizes of floating point bit fields.
<dt><strong>Description:</strong>
<dd><code>H5Tset_fields</code> sets the locations and sizes of the various floating
point bit fields. The field positions are bit positions in the
significant region of the data type. Bits are numbered with the least
significant bit number zero.
<P>Fields are not allowed to extend beyond the number of bits of
precision, nor are they allowed to overlap with one another.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to set.
<dt><em>size_t</em> <code>epos</code>
<dd>Exponent bit position.
<dt><em>size_t</em> <code>esize</code>
<dd>Size of exponent in bits.
<dt><em>size_t</em> <code>mpos</code>
<dd>Mantissa bit position.
<dt><em>size_t</em> <code>msize</code>
<dd>Size of mantissa in bits.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetEbias">H5Tget_ebias</a>
<dt><strong>Signature:</strong>
<dd><em>size_t </em><code>H5Tget_ebias</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Retrieves the exponent bias of a floating-point type.
<dt><strong>Description:</strong>
<dd><code>H5Tget_ebias</code> retrieves the exponent bias of a floating-point type.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
</dl>
<dt><strong>Returns:</strong>
<dd>Positive value on success, 0 on failure.
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-SetEbias">H5Tset_ebias</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tset_ebias</code>(<em>hid_t </em><code>type_id</code>,
<em>size_t</em> <code>ebias</code>
)
<dt><strong>Purpose:</strong>
<dd>Sets the exponent bias of a floating-point type.
<dt><strong>Description:</strong>
<dd><code>H5Tset_ebias</code> sets the exponent bias of a floating-point type.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to set.
<dt><em>size_t</em> <code>ebias</code>
<dd>Exponent bias value.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetNorm">H5Tget_norm</a>
<dt><strong>Signature:</strong>
<dd><em>H5T_norm_t </em><code>H5Tget_norm</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Retrieves mantissa normalization of a floating-point datatype.
<dt><strong>Description:</strong>
<dd><code>H5Tget_norm</code> retrieves the mantissa normalization of a floating-point
datatype. Valid normalization values are:
<ul> <dl>
<dt>H5T_NORM_IMPLIED
<dd>MSB of mantissa isn't stored, always 1
<dt>H5T_NORM_MSBSET
<dd>MSB of mantissa is always 1
<dt>H5T_NORM_NONE
<dd>Mantissa is not normalized
</dl> </ul>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
</dl>
<dt><strong>Returns:</strong>
<dd>Non-negative normalization type on success, negative on failure
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-SetNorm">H5Tset_norm</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tset_norm</code>(<em>hid_t </em><code>type_id</code>,
<em>H5T_norm_t</em> <code>norm</code>
)
<dt><strong>Purpose:</strong>
<dd>Sets the mantissa normalization of a floating-point datatype.
<dt><strong>Description:</strong>
<dd><code>H5Tset_norm</code> sets the mantissa normalization of a floating-point
datatype. Valid normalization values are:
<ul> <dl>
<dt>H5T_NORM_IMPLIED
<dd>MSB of mantissa isn't stored, always 1
<dt>H5T_NORM_MSBSET
<dd>MSB of mantissa is always 1
<dt>H5T_NORM_NONE
<dd>Mantissa is not normalized
</dl> </ul>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to set.
<dt><em>H5T_norm_t</em> <code>norm</code>
<dd>Mantissa normalization type.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetInpad">H5Tget_inpad</a>
<dt><strong>Signature:</strong>
<dd><em>H5T_pad_t </em><code>H5Tget_inpad</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Retrieves the internal padding type for unused bits in floating-point datatypes.
<dt><strong>Description:</strong>
<dd><code>H5Tget_inpad</code> retrieves the internal padding type for
unused bits in floating-point datatypes.
Valid padding values are:
<ul> <dl>
<dt>H5T_PAD_ZERO
<dd>Set background to zeros.
<dt>H5T_PAD_ONE
<dd>Set background to ones.
<dt>H5T_PAD_BACKGROUND
<dd>Leave background alone.
</dl> </ul>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
</dl>
<dt><strong>Returns:</strong>
<dd>Non-negative padding type on success, negative on failure
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-SetInpad">H5Tset_inpad</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tset_inpad</code>(<em>hid_t </em><code>type_id</code>,
<em>H5T_pad_t</em> <code>inpad</code>
)
<dt><strong>Purpose:</strong>
<dd>Fills unused internal floating point bits.
<dt><strong>Description:</strong>
<dd>If any internal bits of a floating point type are unused
(that is, those significant bits which are not part of the
sign, exponent, or mantissa), then <code>H5Tset_inpad</code> will be filled
according to the value of the padding value property <code>inpad</code>.
Valid padding values are:
<ul> <dl>
<dt>H5T_PAD_ZERO
<dd>Set background to zeros.
<dt>H5T_PAD_ONE
<dd>Set background to ones.
<dt>H5T_PAD_BACKGROUND
<dd>Leave background alone.
</dl> </ul>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to modify.
<dt><em>H5T_pad_t</em> <code>pad</code>
<dd>Padding type.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetCset">H5Tget_cset</a>
<dt><strong>Signature:</strong>
<dd><em>H5T_cset_t </em><code>H5Tget_cset</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Retrieves the character set type of a string datatype.
<dt><strong>Description:</strong>
<dd><code>H5Tget_cset</code> retrieves the character set type of a string datatype.
Valid character set values are:
<ul> <dl>
<dt>H5T_CSET_ASCII
<dd>Character set is US ASCII
</dl> </ul>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
</dl>
<dt><strong>Returns:</strong>
<dd>Non-negative character set type on success, negative on failure
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-SetCset">H5Tset_cset</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tset_cset</code>(<em>hid_t </em><code>type_id</code>,
<em>H5T_cset_t</em> <code>cset</code>
)
<dt><strong>Purpose:</strong>
<dd>
<dt><strong>Description:</strong>
<dd>HDF5 is able to distinguish between character sets of different
nationalities and to convert between them to the extent possible.
Valid character set values are:
<ul> <dl>
<dt>H5T_CSET_ASCII
<dd>Character set is US ASCII
</dl> </ul>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to modify.
<dt><em>H5T_cset_t</em> <code>cset</code>
<dd>Character set type.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetStrpad">H5Tget_strpad</a>
<dt><strong>Signature:</strong>
<dd><em>H5T_str_t </em><code>H5Tget_strpad</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Retrieves the string padding method for a string datatype.
<dt><strong>Description:</strong>
<dd><code>H5Tget_strpad</code> retrieves the string padding method for a string datatype.
Valid string padding values are:
<ul> <dl>
<dt>H5T_STR_NULL
<dd>Pad with zeros (as C does)
<dt>H5T_STR_SPACE
<dd>Pad with spaces (as FORTRAN does)
</dl> </ul>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
</dl>
<dt><strong>Returns:</strong>
<dd>Non-negative string padding type on success, negative on failure
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-SetStrpad">H5Tset_strpad</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tset_strpad</code>(<em>hid_t </em><code>type_id</code>,
<em>H5T_str_t</em> <code>strpad</code>
)
<dt><strong>Purpose:</strong>
<dd>Defines the storage mechanism for character strings.
<dt><strong>Description:</strong>
<dd>The method used to store character strings differs with the
programming language: C usually null terminates strings while
Fortran left-justifies and space-pads strings.
<code>H5Tset_strpad</code> defines the storage mechanism for the string.
Valid string padding values are:
<ul> <dl>
<dt>H5T_STR_NULL
<dd>Pad with zeros (as C does)
<dt>H5T_STR_SPACE
<dd>Pad with spaces (as FORTRAN does)
</dl> </ul>
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to modify.
<dt><em>H5T_str_t</em> <code>strpad</code>
<dd>String padding type.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetNmembers">H5Tget_nmembers</a>
<dt><strong>Signature:</strong>
<dd><em>intn </em><code>H5Tget_nmembers</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Retrieves the number of fields in a compound datatype.
<dt><strong>Description:</strong>
<dd><code>H5Tget_nmembers</code> retrieves the number of fields a compound datatype has.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
</dl>
<dt><strong>Returns:</strong>
<dd>Number of members datatype has on success, negative on failure
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetMemberName">H5Tget_member_name</a>
<dt><strong>Signature:</strong>
<dd><em>char *</em> <code>H5Tget_member_name</code>(<em>hid_t </em><code>type_id</code>,
<em>intn</em> <code>fieldno</code>
)
<dt><strong>Purpose:</strong>
<dd>Retrieves the name of a field of a compound data type.
<dt><strong>Description:</strong>
<dd><code>H5Tget_member_name</code> retrieves the name of a field of a compound data type.
Fields are stored in no particular order with numbers 0 through N-1
where N is the value returned by H5Tget_nmembers(). The name of the
field is allocated with malloc() and the caller is responsible for
freeing the memory used by the name.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
<dt><em>intn</em> <code>fieldno</code>
<dd>Field number (indexed from 0) of the field name to retrieve.
</dl>
<dt><strong>Returns:</strong>
<dd>Valid pointer on success, NULL on failure
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetMemberDims">H5Tget_member_dims</a>
<dt><strong>Signature:</strong>
<dd><em>int</em> <code>H5Tget_member_dims</code>(<em>hid_t </em><code>type_id</code>,
<em>intn</em> <code>fieldno</code>,
<em>size_t *</em> <code>dims</code>,
<em>int *</em> <code>perm</code>
)
<dt><strong>Purpose:</strong>
<dd>Returns the dimensionality of the field.
<dt><strong>Description:</strong>
<dd><code>H5Tget_member_dims</code> returns the dimensionality of the field. The dimensions
and permuation vector are returned through arguments <code>dims</code>
and <code>perm</code>, both arrays of at least four elements. Either
(or even both) may be null pointers.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
<dt><em>intn</em> <code>fieldno</code>
<dd>Field number (indexed from 0) of the field dims to retrieve.
<dt><em>size_t *</em> <code>dims</code>
<dd>Pointer to buffer to store the dimensions of the field.
<dt><em>int *</em> <code>perm</code>
<dd>Pointer to buffer to store the permutation vector of the field.
</dl>
<dt><strong>Returns:</strong>
<dd>Number of dimensions on success, negative on failure.
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-GetMemberType">H5Tget_member_type</a>
<dt><strong>Signature:</strong>
<dd><em>hid_t</em> <code>H5Tget_member_type</code>(<em>hid_t </em><code>type_id</code>,
<em>intn</em> <code>fieldno</code>
)
<dt><strong>Purpose:</strong>
<dd>Returns the data type of the specified member.
<dt><strong>Description:</strong>
<dd><code>H5Tget_member_type</code> returns the data type of the specified member. The caller
should invoke H5Tclose() to release resources associated with the type.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to query.
<dt><em>intn</em> <code>fieldno</code>
<dd>Field number (indexed from 0) of the field type to retrieve.
</dl>
<dt><strong>Returns:</strong>
<dd>The ID of a copy of the datatype of the field, negative on failure.
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-Insert">H5Tinsert</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t</em> <code>H5Tinsert</code>(<em>hid_t </em><code>type_id</code>,
<em>const char *</em> <code>name</code>,
<em>off_t</em> <code>offset</code>,
<em>hid_t</em> <code>field_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Adds a new member to a compound data type.
<dt><strong>Description:</strong>
<dd><code>H5Tinsert</code> adds another member to the compound data type
<code>type_id</code>. The new member has a <code>name</code> which
must be unique within the compound data type. The <code>offset</code>
argument defines the start of the member in an instance of the compound
data type, and <code>field_id</code> is the type of the new member.
<P>Note: All members of a compound data type must be atomic; a
compound data type cannot have a member which is a compound data
type.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of compound datatype to modify.
<dt><em>const char *</em> <code>name</code>
<dd>Name of the field to insert.
<dt><em>off_t</em> <code>offset</code>
<dd>Offset in memory structure of the field to insert.
<dt><em>hid_t</em> <code>field_id</code>
<dd>Datatype ID of the field to insert.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-Pack">H5Tpack</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t</em> <code>H5Tpack</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Recursively removes padding from within a compound datatype.
<dt><strong>Description:</strong>
<dd><code>H5Tpack</code> recursively removes padding from within a compound
datatype to make it more efficient (space-wise) to store that data.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to modify.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-RegisterHard">H5Tregister_hard</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t</em> <code>H5Tregister_hard</code>(<em>const char
*</em> <code>name</code>, <em>hid_t </em><code>src_id</code>,
<em>hid_t</em> <code>dst_id</code>,
<em>H5T_conv_t</em> <code>func</code>
)
<dt><strong>Purpose:</strong>
<dd>Registers a hard conversion function.
<dt><strong>Description:</strong>
<dd><code>H5Tregister_hard</code> registers a hard conversion function for a data type
conversion path. The path is specified by the source and destination
datatypes <code>src_id</code> and <code>dst_id</code>. A conversion
path can only have one hard function, so <code>func</code> replaces any
previous hard function.
<P>If <code>func</code> is the null pointer then any hard function
registered for this path is removed from this path. The soft functions
are then used when determining which conversion function is appropriate
for this path. The <code>name</code> argument is used only
for debugging and should be a short identifier for the function.
<P>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, void *buf, void *bkg);
<dt><strong>Parameters:</strong>
<dl>
<dt><em>const char *</em> <code>name</code>
<dd>Name displayed in diagnostic output.
<dt><em>hid_t</em> <code>src_id</code>
<dd>ID of source datatype.
<dt><em>hid_t</em> <code>dst_id</code>
<dd>ID of destination datatype.
<dt><em>H5T_conv_t</em> <code>func</code>
<dd>Function to convert between source and destination datatypes.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-RegisterSoft">H5Tregister_soft</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t</em> <code>H5Tregister_soft</code>(<em>const char
*</em> <code>name</code>, <em>hid_t </em><code>src_id</code>,
<em>hid_t</em> <code>dst_id</code>,
<em>H5T_conv_t</em> <code>func</code>
)
<dt><strong>Purpose:</strong>
<dd>Registers a soft conversion function.
<dt><strong>Description:</strong>
<dd><code>H5Tregister_soft</code> registers a soft conversion function by adding it to the
end of the master soft list and replacing the soft function in all
applicable existing conversion paths. The <code>name</code>
is used only for debugging and should be a short identifier
for the function.
<P>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, void *buf, void *bkg);
<dt><strong>Parameters:</strong>
<dl>
<dt><em>const char *</em> <code>name</code>
<dd>Name displayed in diagnostic output.
<dt><em>hid_t</em> <code>src_id</code>
<dd>ID of source datatype.
<dt><em>hid_t</em> <code>dst_id</code>
<dd>ID of destination datatype.
<dt><em>H5T_conv_t</em> <code>func</code>
<dd>Function to convert between source and destination datatypes.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-Unregister">H5Tunregister</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t</em> <code>H5Tunregister</code>(<em>H5T_conv_t</em> <code>func</code>
)
<dt><strong>Purpose:</strong>
<dd>Removes a conversion function from all conversion paths.
<dt><strong>Description:</strong>
<dd><code>H5Tunregister</code> removes a conversion function from all conversion paths.
<P>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, void *buf, void *bkg);
<dt><strong>Parameters:</strong>
<dl>
<dt><em>H5T_conv_t</em> <code>func</code>
<dd>Function to remove from conversion paths.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-Close">H5Tclose</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t </em><code>H5Tclose</code>(<em>hid_t </em><code>type_id</code>
)
<dt><strong>Purpose:</strong>
<dd>Releases a datatype.
<dt><strong>Description:</strong>
<dd><code>H5Tclose</code> releases a datatype. Further access through the datatype
ID is illegal. Failure to release a datatype with this call will
result in resource leaks.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>hid_t</em> <code>type_id</code>
<dd>ID of datatype to release.
</dl>
<dt><strong>Returns:</strong>
<dd>zero/negative
</dl>
<hr>
<hr>
<b>Aha!! And here is the reference to sharing and that command that had us
so buffaloed, <code>H5Tshare</code>!</b><br>
To quote Quincy: "The H5Tshare() and H5Tis_shared() will be removed. Data types
will not be stored in the global heap. A new type of shared
message header will be added to the object headers that points to
another object header instead of the global heap..."
<hr>
<hr>
</b>UNUSED PORTIONS OF EMAIL NOTES.</b>
<br>
<code>....</code> in left margin indicates where material was
pulled out for inclusion above.
<HR>
<HR>
<pre>
Elena> Datatype Interface:
Elena> Do we have description of the named datatypes somewhere?
>From Datatypes.html...
html> 7. Sharing Data Types among Datasets
html>
html> If a file has lots of datasets which have a common data type
html> then the file could be made smaller by having all the datasets
html> share a single data type. Instead of storing a copy of the data
html> type in each dataset object header, a single data type is stored
html> and the object headers point to it. The space savings is
html> probably only significant for datasets with a compound data type
html> since the simple data types can be described with just a few
html> bytes anyway.
html>
html> To create a bunch of datasets that share a single data type just
html> create the datasets with a committed (named) data type.
html>
html> To create two datasets that share a common data type one just
html> commits the data type, giving it a name, and then uses that
html> data type to create the datasets.
html>
html> hid_t t1 = ...some transient type...;
html> H5Tcommit (file, "shared_type", t1);
html> hid_t dset1 = H5Dcreate (file, "dset1", t1, space, H5P_DEFAULT);
html> hid_t dset2 = H5Dcreate (file, "dset2", t1, space, H5P_DEFAULT);
html>
html>
html> And to create two additional datasets later which share the
html> same type as the first two datasets:
html>
html> hid_t dset1 = H5Dopen (file, "dset1");
html> hid_t t2 = H5Dget_type (dset1);
html> hid_t dset3 = H5Dcreate (file, "dset3", t2, space, H5P_DEFAULT);
html> hid_t dset4 = H5Dcreate (file, "dset4", t2, space, H5P_DEFAULT);
html>
html>
html> Example: Shared Types
Mail from Quincey summarizing shared data types:
Quincey> Hi Robb,
Quincey> Everything looks good, I just have a couple of minor comments below:
Quincey>
Quincey> > A very quick data types summary (so I can remember it next week :-)
Quincey> >
Quincey> > * Handles to named types are immutable.
Quincey> >
Quincey> > * A transient type handle can be converted to a named type handle
Quincey> > by calling H5Tcommit(). This can only be called for transient
Quincey> > types which are not locked or predefined.
Quincey> >
Quincey> > * H5Topen() returns a handle to a named immutable type.
Quincey> >
Quincey> > * H5Tcopy() returns a handle to a transient type.
Quincey> H5Tcreate also returns a handle to a transient type.
Quincey>
Quincey> > * Using a named type in H5Dcreate() causes the dataset object
Quincey> > header to point to the named type (shared). The link count on
Quincey> > the named type is incremented.
Quincey> >
Quincey> > * Using a transient type in H5Dcreate() causes the type to be
Quincey> > copied and stored in the dataset header (unshared).
Quincey> >
Quincey> > * Type handles returned from H5Dget_type() are immutable.
Quincey> >
Quincey> > * If the dataset is using a shared type (dataset object header
Quincey> > points to some other object header with a type message, e.g., a
Quincey> > named type) then H5Dget_type() returns a handle to that named
Quincey> > type.
Quincey> >
Quincey> > * If the dataset has a private type (data type is stored in the
Quincey> > dataset object header) then H5Dget_type() returns a handle to a
Quincey> > transient immutable type.
Quincey> >
Quincey> > * The name of a data type can be removed from a group, but unless
Quincey> > the reference count becomes zero the type continues to exist.
Quincey> > (Other objects work this way too).
Quincey> >
Quincey> > * H5Tcopy() applied to a dataset returns a transient, modifiable
Quincey> > copy of that dataset's data type.
Quincey> >
Quincey> > * H5Topen() applied to a dataset returns either a transient
Quincey> > immutable or named immutable data type depending on whether the
Quincey> > dataset has a shared data type.
Quincey> Hmm, do we want to allow this? It makes a certain amount of sense, but
Quincey> is a little unusual... :-)
Quincey>
Elena, we decided not not to allow H5Topen() on a dataset.
Quincey>
Quincey> > * The H5Tshare() and H5Tis_shared() will be removed. Data types
Quincey> > will not be stored in the global heap. A new type of shared
Quincey> > message header will be added to the object headers that points to
Quincey> > another object header instead of the global heap
Quincey>
Quincey> > * Still to discuss: Attributes on named data types?
Quincey> I think we should all them.
Quincey>
Elena, attributes work for named data types just like they do for
datasets.
Quincey>
Quincey> > * Still to discuss: compound types whose members point to other types.
Quincey> I like this concept a lot and this we should figure out a way to do it.
Quincey> This allows the "is a" relationship to be used very nicely for named datatypes.
Quincey>
Quincey> > * Still to discuss: datasets that point to data types in other
Quincey> > files by symbolic link.
Quincey> Probably a good idea also, just ugly to implement.
Quincey>
</pre>
<hr>
<hr>
<hr>
<address>
<a href="mailto:fbaker@ncsa.uiuc.edu">Frank Baker</a>
<br>
<a href="mailto:h5docs@ncsa.uiuc.edu">HDF5 Documentation</a>
<br>
Last modified: 9 July 1998
</body>
</html>
|