diff options
Diffstat (limited to 'doc/html/DataTypes.html')
-rw-r--r-- | doc/html/DataTypes.html | 188 |
1 files changed, 188 insertions, 0 deletions
diff --git a/doc/html/DataTypes.html b/doc/html/DataTypes.html new file mode 100644 index 0000000..80423ae --- /dev/null +++ b/doc/html/DataTypes.html @@ -0,0 +1,188 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + <head> + <title>DataTypes</title> + </head> + <body bgcolor="#F0F0F0"> + <body> + <font face="arial,helvetica" color="#555588"><h1>DataTypes</h1></font> + HDF and IEEEIO must be able to store any of the basic datatypes + available to a given computer architecture (various sized integers + and floating point numbers). In Fortran the datatype is + identified by an integer. In C we use <b>#defines</b>. In C++ we + use <b>enums</b>. There are also simple built-in utility operations + available which allow computation of data space used by these + various datatypes (<i> + <a href="#sizeof">sizeOf()</a>, + <a href="#nelements">nElements()</a>, + <a href="#nbytes">nBytes()</a> + </i>)<p> + +Here is how the types are related.<p> + +<table border=1> +<tr> +<td> <font face="arial,helvetica" color="#885533"><b>Datatype</b></font></td> +<td> <font face="arial,helvetica" color="#885533"><b>Num Bytes</b></font></td> +<td> <font face="arial,helvetica" color="#885533"><b>C++ TypeID</b></font></td> +<td> <font face="arial,helvetica" color="#885533"><b>C TypeID</b></font></td> +<td> <font face="arial,helvetica" color="#885533"><b>Fortran TypeID</b></font></td> +</tr> + +<tr> +<td>byte binary data <i>(not to be confused with text/strings)</i> +<td>1 +<td>Byte,Int8 +<td>BYTE,INT8 +<td>0 +<tr> + +<td>short (16bit) integer +<td>2 +<td>Int16 +<td>INT16 +<td>1 +<tr> +<td>32bit integer +<td>4 +<td>Int32 +<td>INT32 +<td>2 +<tr> +<td>64bit integer +<td>8 +<td>Int64 +<td>INT64 +<td>3 +<tr> +<td>single precision floating point +<td>4 +<td>Float32 +<td>FLOAT32 +<td>4 +<tr> +<td>double precision floating point +<td>8 +<td>Float64 +<td>FLOAT64 +<td>5 +<tr> +<td>unsigned byte +<td>1 +<td>uChar,uInt8 +<td>UCHAR,UINT8 +<td>6 +<tr> +<td>unsigned short (16 bit) integer +<td>2 +<td>uInt16 +<td>UINT16 +<td>7 +<tr> +<td>unsigned 32bit integer +<td>4 +<td>uInt32 +<td>UINT32 +<td>8 +<tr> +<td>unsigned 64bit integer +<td>8 +<td>uInt64 +<td>UINT64 +<td>9 +<tr> +<td>special byte type for text data <i>(to differentiate it from binary byte data)</i> +<td>1 +<td>Char,Char8,String +<td>CHAR,CHAR8,STRING +<td>10 +<tr> +<td>special type for unicode (16bit) text to differentiate from binary + unsigned integer data +<td>2 +<td>Unicode,Char16 +<td>UNICODE,CHAR16 +<td>11 + + </table><p> + + <hr> + <font face="arial,helvetica" color="#555588"><h2><a name="utils">Utility Subroutines</a></h2></font> + Various utility subroutines can be used to use the type + information to compute data array sizes. + <a name="nbytes"><u><h3>Number of Bytes in a Dataset</h3></u></a> + <DL> + <DD> + <DL> + <DT><b>C++ Call Format</b> + <DD><code>int IObase::nBytes(IObase::DataType datatype,int rank,int *dims)</code> + <DT><b>C Call Format</b> + <DD><code>int IOnBytes(int datatype,int rank,int *dims)</code> + <DT><b>F77 Call Format</b> + <DD> <code>INTEGER IO_NBYTES(INTEGER datatype,INTEGER + rank,INTEGER dims(*))</code></DL> + <hr> + <DL> + <DT><i>datatype</i>: + <DD>The datatype for elements of the array + <DT><i>rank</i>: + <DD>The number of dimensions of the array + <DT><i>dims</i>: + <DD>A vector of the dimensions of the array + <DT><font color="#885533"><b><i>returns</i></b></font> + <DD>Returns the number of bytes required to store the array + </DL> + <hr> + </DL> + + <a name="nelements"><u><h3>Number of Elements in a Dataset</h3></u></a> + <DL> + <DD> + <DL> + <DT><b>C++ Call Format</b> + <DD><code>int IObase::nElements(int rank,int *dims)</code> + <DT><b>C Call Format</b> + <DD><code>int IOnElements(int rank,int *dims)</code> + <DT><b>F77 Call Format</b> + <DD> <code>INTEGER IO_NELEMENTS(INTEGER rank,INTEGER dims(*))</code></DL> + <hr> + <DL> + <DT><i>rank</i>: + <DD>The number of dimensions of the array + <DT><i>dims</i>: + <DD>A vector of the dimensions of the array + <DT><font color="#885533"><b><i>returns</i></b></font> + <DD>Returns the number of elements required in the array + </DL> + <hr> + </DL> + + <a name="sizeof"><u><h3>Size of a DataType in Bytes</h3></u></a> + <DL> + <DD> + <DL> + <DT><b>C++ Call Format</b> + <DD><code>int IObase::sizeOf(IObase::DataType datatype)</code> + <DT><b>C Call Format</b> + <DD><code>int IOsizeOf(int datatype)</code> + <DT><b>F77 Call Format</b> + <DD> <code>INTEGER IO_SIZEOF(INTEGER datatype)</code></DL> + <hr> + <DL> + <DT><i>datatype</i>: + <DD>The datatype for elements of the array. + <DT><font color="#885533"><b><i>returns</i></b></font> + <DD>Returns the number of bytes used by an element of the + specified datatype. + </DL> + <hr> + </DL> + + <hr> + <address><a href="mailto:jshalf@ariel.ncsa.uiuc.edu"></a></address> + <!-- Created: Thu Jan 28 16:35:13 CST 1999 --> + <!-- hhmts start --> +Last modified: Wed Feb 3 22:02:45 CST 1999 +<!-- hhmts end --> + </body> +</html> |