mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-12-25 13:53:55 +01:00
Deploying to gh-pages from @ TREX-CoE/trexio@d3b35ae453 🚀
This commit is contained in:
parent
2d5addfe26
commit
d995023743
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-05-06 Thu 07:26 -->
|
||||
<!-- 2021-05-06 Thu 07:37 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>TREXIO source code documentation</title>
|
||||
@ -341,7 +341,7 @@ and bug reports should be submitted at
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX-CoE</p>
|
||||
<p class="date">Created: 2021-05-06 Thu 07:26</p>
|
||||
<p class="date">Created: 2021-05-06 Thu 07:37</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-05-06 Thu 07:26 -->
|
||||
<!-- 2021-05-06 Thu 07:37 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>TREXIO source code documentation</title>
|
||||
@ -341,7 +341,7 @@ and bug reports should be submitted at
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX-CoE</p>
|
||||
<p class="date">Created: 2021-05-06 Thu 07:26</p>
|
||||
<p class="date">Created: 2021-05-06 Thu 07:37</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-05-06 Thu 07:26 -->
|
||||
<!-- 2021-05-06 Thu 07:37 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Front end API</title>
|
||||
@ -311,45 +311,45 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org83100e5">1. Coding conventions</a>
|
||||
<li><a href="#org324bf71">1. Coding conventions</a>
|
||||
<ul>
|
||||
<li><a href="#orgd94b748">1.1. Memory allocation</a></li>
|
||||
<li><a href="#orgddbad78">1.1. Memory allocation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org590b4b6">2. Front end</a>
|
||||
<li><a href="#org9358d5a">2. Front end</a>
|
||||
<ul>
|
||||
<li><a href="#orgf7f8d28">2.1. Error handling</a></li>
|
||||
<li><a href="#orgf9fca88">2.2. Back ends</a></li>
|
||||
<li><a href="#org530f256">2.3. Read/write behavior</a></li>
|
||||
<li><a href="#orgc3a8379">2.4. TREXIO file type</a></li>
|
||||
<li><a href="#org17a9030">2.5. Polymorphism of the file handle</a></li>
|
||||
<li><a href="#org269b651">2.6. File opening</a></li>
|
||||
<li><a href="#org1dfe065">2.7. File closing</a></li>
|
||||
<li><a href="#org35e18a4">2.1. Error handling</a></li>
|
||||
<li><a href="#org755df20">2.2. Back ends</a></li>
|
||||
<li><a href="#org04af806">2.3. Read/write behavior</a></li>
|
||||
<li><a href="#org6cb34b6">2.4. TREXIO file type</a></li>
|
||||
<li><a href="#orgf20bbab">2.5. Polymorphism of the file handle</a></li>
|
||||
<li><a href="#org2b10147">2.6. File opening</a></li>
|
||||
<li><a href="#org5fabc1b">2.7. File closing</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org32d637c">3. Templates for front end</a>
|
||||
<li><a href="#orgd9b5486">3. Templates for front end</a>
|
||||
<ul>
|
||||
<li><a href="#org4167bbf">3.1. Templates for front end has/read/write a dimension</a>
|
||||
<li><a href="#org9ac5112">3.1. Templates for front end has/read/write a dimension</a>
|
||||
<ul>
|
||||
<li><a href="#org1394ae1">3.1.1. C templates for front end</a></li>
|
||||
<li><a href="#org90fbeca">3.1.2. Fortran templates for front end</a></li>
|
||||
<li><a href="#org00d66fc">3.1.1. C templates for front end</a></li>
|
||||
<li><a href="#org53e05c6">3.1.2. Fortran templates for front end</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgb218410">3.2. Templates for front end has/read/write a dataset</a>
|
||||
<li><a href="#orgff92d19">3.2. Templates for front end has/read/write a dataset</a>
|
||||
<ul>
|
||||
<li><a href="#orgcd66ad0">3.2.1. C templates for front end</a></li>
|
||||
<li><a href="#orged759ce">3.2.2. Fortran templates for front end</a></li>
|
||||
<li><a href="#org74f7ebc">3.2.1. C templates for front end</a></li>
|
||||
<li><a href="#org308d938">3.2.2. Fortran templates for front end</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org2a63326">4. Fortran helper/wrapper functions</a></li>
|
||||
<li><a href="#org144dfdc">4. Fortran helper/wrapper functions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org83100e5" class="outline-2">
|
||||
<h2 id="org83100e5"><span class="section-number-2">1</span> Coding conventions</h2>
|
||||
<div id="outline-container-org324bf71" class="outline-2">
|
||||
<h2 id="org324bf71"><span class="section-number-2">1</span> Coding conventions</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<ul class="org-ul">
|
||||
<li>integer types will be defined using types given in <code>stdint.h</code></li>
|
||||
@ -364,8 +364,8 @@ for the JavaScript code in this tag.
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd94b748" class="outline-3">
|
||||
<h3 id="orgd94b748"><span class="section-number-3">1.1</span> Memory allocation</h3>
|
||||
<div id="outline-container-orgddbad78" class="outline-3">
|
||||
<h3 id="orgddbad78"><span class="section-number-3">1.1</span> Memory allocation</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<p>
|
||||
Memory allocation of structures can be facilitated by using the
|
||||
@ -399,8 +399,8 @@ The maximum string size for the filenames is 4096 characters.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org590b4b6" class="outline-2">
|
||||
<h2 id="org590b4b6"><span class="section-number-2">2</span> Front end</h2>
|
||||
<div id="outline-container-org9358d5a" class="outline-2">
|
||||
<h2 id="org9358d5a"><span class="section-number-2">2</span> Front end</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
All calls to TREXIO are thread-safe.
|
||||
@ -408,10 +408,10 @@ TREXIO front end is modular, which simplifies impelementation of new back ends.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf7f8d28" class="outline-3">
|
||||
<h3 id="orgf7f8d28"><span class="section-number-3">2.1</span> Error handling</h3>
|
||||
<div id="outline-container-org35e18a4" class="outline-3">
|
||||
<h3 id="org35e18a4"><span class="section-number-3">2.1</span> Error handling</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<table id="orgb3a40ab" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgc1512c0" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -612,8 +612,8 @@ The text strings are extracted from the previous table.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf9fca88" class="outline-3">
|
||||
<h3 id="orgf9fca88"><span class="section-number-3">2.2</span> Back ends</h3>
|
||||
<div id="outline-container-org755df20" class="outline-3">
|
||||
<h3 id="org755df20"><span class="section-number-3">2.2</span> Back ends</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
TREXIO has several back ends:
|
||||
@ -643,8 +643,8 @@ lines that correspond to the <code>TREXIO_JSON</code> back end (not implemented
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org530f256" class="outline-3">
|
||||
<h3 id="org530f256"><span class="section-number-3">2.3</span> Read/write behavior</h3>
|
||||
<div id="outline-container-org04af806" class="outline-3">
|
||||
<h3 id="org04af806"><span class="section-number-3">2.3</span> Read/write behavior</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<p>
|
||||
Every time a reading function is called, the data is read from the
|
||||
@ -672,8 +672,8 @@ concurrent programs, the behavior is not specified.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgc3a8379" class="outline-3">
|
||||
<h3 id="orgc3a8379"><span class="section-number-3">2.4</span> TREXIO file type</h3>
|
||||
<div id="outline-container-org6cb34b6" class="outline-3">
|
||||
<h3 id="org6cb34b6"><span class="section-number-3">2.4</span> TREXIO file type</h3>
|
||||
<div class="outline-text-3" id="text-2-4">
|
||||
<p>
|
||||
<code>trexio_s</code> is the the main type for TREXIO files, visible to the users
|
||||
@ -705,8 +705,8 @@ TREXIO files will have as a first argument the TREXIO file handle.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org17a9030" class="outline-3">
|
||||
<h3 id="org17a9030"><span class="section-number-3">2.5</span> Polymorphism of the file handle</h3>
|
||||
<div id="outline-container-orgf20bbab" class="outline-3">
|
||||
<h3 id="orgf20bbab"><span class="section-number-3">2.5</span> Polymorphism of the file handle</h3>
|
||||
<div class="outline-text-3" id="text-2-5">
|
||||
<p>
|
||||
Polymorphism of the <code>trexio_t</code> type is handled by ensuring that the
|
||||
@ -725,8 +725,8 @@ corresponding types for all back ends can be safely casted to
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org269b651" class="outline-3">
|
||||
<h3 id="org269b651"><span class="section-number-3">2.6</span> File opening</h3>
|
||||
<div id="outline-container-org2b10147" class="outline-3">
|
||||
<h3 id="org2b10147"><span class="section-number-3">2.6</span> File opening</h3>
|
||||
<div class="outline-text-3" id="text-2-6">
|
||||
<p>
|
||||
<code>trexio_open</code> creates a new TREXIO file or opens existing one.
|
||||
@ -888,8 +888,8 @@ should tend to avoid renaming the <code>.txt</code> data files.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1dfe065" class="outline-3">
|
||||
<h3 id="org1dfe065"><span class="section-number-3">2.7</span> File closing</h3>
|
||||
<div id="outline-container-org5fabc1b" class="outline-3">
|
||||
<h3 id="org5fabc1b"><span class="section-number-3">2.7</span> File closing</h3>
|
||||
<div class="outline-text-3" id="text-2-7">
|
||||
<p>
|
||||
<code>trexio_close</code> closes an existing <code>trexio_t</code> file.
|
||||
@ -988,8 +988,8 @@ output:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org32d637c" class="outline-2">
|
||||
<h2 id="org32d637c"><span class="section-number-2">3</span> Templates for front end</h2>
|
||||
<div id="outline-container-orgd9b5486" class="outline-2">
|
||||
<h2 id="orgd9b5486"><span class="section-number-2">3</span> Templates for front end</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
<p>
|
||||
Consider the following block of <code>trex.json</code>:
|
||||
@ -1150,8 +1150,8 @@ TREXIO supports I/O with single or double precision for integer and floating poi
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org4167bbf" class="outline-3">
|
||||
<h3 id="org4167bbf"><span class="section-number-3">3.1</span> Templates for front end has/read/write a dimension</h3>
|
||||
<div id="outline-container-org9ac5112" class="outline-3">
|
||||
<h3 id="org9ac5112"><span class="section-number-3">3.1</span> Templates for front end has/read/write a dimension</h3>
|
||||
<div class="outline-text-3" id="text-3-1">
|
||||
<p>
|
||||
This section concerns API calls related to dimensioning variables.
|
||||
@ -1220,8 +1220,8 @@ This section concerns API calls related to dimensioning variables.
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1394ae1" class="outline-4">
|
||||
<h4 id="org1394ae1"><span class="section-number-4">3.1.1</span> C templates for front end</h4>
|
||||
<div id="outline-container-org00d66fc" class="outline-4">
|
||||
<h4 id="org00d66fc"><span class="section-number-4">3.1.1</span> C templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-1-1">
|
||||
<p>
|
||||
The <code>C</code> templates that correspond to each of the abovementioned functions can be found below.
|
||||
@ -1410,8 +1410,8 @@ The basic (non-suffixed) API call on dimensioning variables deals with single pr
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org90fbeca" class="outline-4">
|
||||
<h4 id="org90fbeca"><span class="section-number-4">3.1.2</span> Fortran templates for front end</h4>
|
||||
<div id="outline-container-org53e05c6" class="outline-4">
|
||||
<h4 id="org53e05c6"><span class="section-number-4">3.1.2</span> Fortran templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-1-2">
|
||||
<p>
|
||||
The <code>Fortran</code> templates that provide an access to the <code>C</code> API calls from Fortran.
|
||||
@ -1498,8 +1498,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgb218410" class="outline-3">
|
||||
<h3 id="orgb218410"><span class="section-number-3">3.2</span> Templates for front end has/read/write a dataset</h3>
|
||||
<div id="outline-container-orgff92d19" class="outline-3">
|
||||
<h3 id="orgff92d19"><span class="section-number-3">3.2</span> Templates for front end has/read/write a dataset</h3>
|
||||
<div class="outline-text-3" id="text-3-2">
|
||||
<p>
|
||||
This section concerns API calls related to datasets.
|
||||
@ -1568,8 +1568,8 @@ This section concerns API calls related to datasets.
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcd66ad0" class="outline-4">
|
||||
<h4 id="orgcd66ad0"><span class="section-number-4">3.2.1</span> C templates for front end</h4>
|
||||
<div id="outline-container-org74f7ebc" class="outline-4">
|
||||
<h4 id="org74f7ebc"><span class="section-number-4">3.2.1</span> C templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-2-1">
|
||||
<p>
|
||||
The C templates that correspond to each of the abovementioned functions can be found below.
|
||||
@ -1827,8 +1827,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orged759ce" class="outline-4">
|
||||
<h4 id="orged759ce"><span class="section-number-4">3.2.2</span> Fortran templates for front end</h4>
|
||||
<div id="outline-container-org308d938" class="outline-4">
|
||||
<h4 id="org308d938"><span class="section-number-4">3.2.2</span> Fortran templates for front end</h4>
|
||||
<div class="outline-text-4" id="text-3-2-2">
|
||||
<p>
|
||||
The <code>Fortran</code> templates that provide an access to the <code>C</code> API calls from <code>Fortran</code>.
|
||||
@ -1915,8 +1915,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2a63326" class="outline-2">
|
||||
<h2 id="org2a63326"><span class="section-number-2">4</span> Fortran helper/wrapper functions</h2>
|
||||
<div id="outline-container-org144dfdc" class="outline-2">
|
||||
<h2 id="org144dfdc"><span class="section-number-2">4</span> Fortran helper/wrapper functions</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<p>
|
||||
The function below adapts the original C-based <code>trexio_open</code> for Fortran.
|
||||
@ -1945,7 +1945,7 @@ Note, that Fortran interface calls the main <code>TREXIO</code> API, which is wr
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX-CoE</p>
|
||||
<p class="date">Created: 2021-05-06 Thu 07:26</p>
|
||||
<p class="date">Created: 2021-05-06 Thu 07:37</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-05-06 Thu 07:26 -->
|
||||
<!-- 2021-05-06 Thu 07:37 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>HDF5 back end</title>
|
||||
@ -311,25 +311,25 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org58aa630">1. HDF5 back end</a>
|
||||
<li><a href="#orgc8ec331">1. HDF5 back end</a>
|
||||
<ul>
|
||||
<li><a href="#org09757c0">1.1. Template for HDF5 definitions</a></li>
|
||||
<li><a href="#orge7e0ca1">1.2. Template for HDF5 structures</a></li>
|
||||
<li><a href="#org88cf9b5">1.3. Template for HDF5 init/deinit</a></li>
|
||||
<li><a href="#org0e18ab9">1.4. Template for HDF5 has/read/write a number</a></li>
|
||||
<li><a href="#org23d6da4">1.5. Template for HDF5 has/read/write a dataset</a></li>
|
||||
<li><a href="#org69d09a6">1.1. Template for HDF5 definitions</a></li>
|
||||
<li><a href="#org7054a23">1.2. Template for HDF5 structures</a></li>
|
||||
<li><a href="#org1521628">1.3. Template for HDF5 init/deinit</a></li>
|
||||
<li><a href="#orgaf63ee3">1.4. Template for HDF5 has/read/write a number</a></li>
|
||||
<li><a href="#orgee42d27">1.5. Template for HDF5 has/read/write a dataset</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org58aa630" class="outline-2">
|
||||
<h2 id="org58aa630"><span class="section-number-2">1</span> HDF5 back end</h2>
|
||||
<div id="outline-container-orgc8ec331" class="outline-2">
|
||||
<h2 id="orgc8ec331"><span class="section-number-2">1</span> HDF5 back end</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
<div id="outline-container-org09757c0" class="outline-3">
|
||||
<h3 id="org09757c0"><span class="section-number-3">1.1</span> Template for HDF5 definitions</h3>
|
||||
<div id="outline-container-org69d09a6" class="outline-3">
|
||||
<h3 id="org69d09a6"><span class="section-number-3">1.1</span> Template for HDF5 definitions</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #483d8b;">#define</span> $GROUP$_GROUP_NAME <span style="color: #8b2252;">"$group$"</span>
|
||||
@ -340,8 +340,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge7e0ca1" class="outline-3">
|
||||
<h3 id="orge7e0ca1"><span class="section-number-3">1.2</span> Template for HDF5 structures</h3>
|
||||
<div id="outline-container-org7054a23" class="outline-3">
|
||||
<h3 id="org7054a23"><span class="section-number-3">1.2</span> Template for HDF5 structures</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">trexio_hdf5_s</span> {
|
||||
@ -356,8 +356,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org88cf9b5" class="outline-3">
|
||||
<h3 id="org88cf9b5"><span class="section-number-3">1.3</span> Template for HDF5 init/deinit</h3>
|
||||
<div id="outline-container-org1521628" class="outline-3">
|
||||
<h3 id="org1521628"><span class="section-number-3">1.3</span> Template for HDF5 init/deinit</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -440,8 +440,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0e18ab9" class="outline-3">
|
||||
<h3 id="org0e18ab9"><span class="section-number-3">1.4</span> Template for HDF5 has/read/write a number</h3>
|
||||
<div id="outline-container-orgaf63ee3" class="outline-3">
|
||||
<h3 id="orgaf63ee3"><span class="section-number-3">1.4</span> Template for HDF5 has/read/write a number</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -515,7 +515,7 @@ for the JavaScript code in this tag.
|
||||
<span style="color: #a020f0;">if</span> (infile_num != num) {
|
||||
|
||||
<span style="color: #a020f0;">if</span> (infile_num != 0) {
|
||||
printf(<span style="color: #8b2252;">"%llu -> %llu %s \n"</span>, num, infile_num,
|
||||
printf(<span style="color: #8b2252;">"%lu -> %lu %s \n"</span>, num, infile_num,
|
||||
<span style="color: #8b2252;">"This variable already exists. Overwriting it is not supported"</span>);
|
||||
<span style="color: #a020f0;">return</span> TREXIO_FAILURE;
|
||||
|
||||
@ -564,8 +564,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org23d6da4" class="outline-3">
|
||||
<h3 id="org23d6da4"><span class="section-number-3">1.5</span> Template for HDF5 has/read/write a dataset</h3>
|
||||
<div id="outline-container-orgee42d27" class="outline-3">
|
||||
<h3 id="orgee42d27"><span class="section-number-3">1.5</span> Template for HDF5 has/read/write a dataset</h3>
|
||||
<div class="outline-text-3" id="text-1-5">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -699,7 +699,7 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX-CoE</p>
|
||||
<p class="date">Created: 2021-05-06 Thu 07:26</p>
|
||||
<p class="date">Created: 2021-05-06 Thu 07:37</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-05-06 Thu 07:26 -->
|
||||
<!-- 2021-05-06 Thu 07:37 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>TEXT back end</title>
|
||||
@ -311,24 +311,24 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org7dc3f1f">1. TEXT back end</a>
|
||||
<li><a href="#org380a32e">1. TEXT back end</a>
|
||||
<ul>
|
||||
<li><a href="#org670c2d5">1.1. Template for group-related structures in text back end</a></li>
|
||||
<li><a href="#orgf7dc9df">1.2. Template for general structure in text back end</a></li>
|
||||
<li><a href="#orgad59742">1.3. Initialize function (constant part)</a></li>
|
||||
<li><a href="#org1020f33">1.4. Deinitialize function (templated part)</a></li>
|
||||
<li><a href="#org2da2348">1.5. Template for text read struct</a></li>
|
||||
<li><a href="#orgd7e9164">1.6. Template for text flush struct</a></li>
|
||||
<li><a href="#org450577e">1.7. Template for text free memory</a></li>
|
||||
<li><a href="#org2ee2f2b">1.8. Template for has/read/write the <code>$group_num$</code> attribute</a></li>
|
||||
<li><a href="#orged6a8bd">1.9. Template for has/read/write the <code>$group_dset$</code> dataset</a></li>
|
||||
<li><a href="#org7bd8598">1.10. RDM struct (hard-coded)</a>
|
||||
<li><a href="#orgde59557">1.1. Template for group-related structures in text back end</a></li>
|
||||
<li><a href="#org3780722">1.2. Template for general structure in text back end</a></li>
|
||||
<li><a href="#orgeeb2c5f">1.3. Initialize function (constant part)</a></li>
|
||||
<li><a href="#orgee22292">1.4. Deinitialize function (templated part)</a></li>
|
||||
<li><a href="#orgef457ac">1.5. Template for text read struct</a></li>
|
||||
<li><a href="#orgc7fefcc">1.6. Template for text flush struct</a></li>
|
||||
<li><a href="#orga9e3ad9">1.7. Template for text free memory</a></li>
|
||||
<li><a href="#org45a3c08">1.8. Template for has/read/write the <code>$group_num$</code> attribute</a></li>
|
||||
<li><a href="#org5485d73">1.9. Template for has/read/write the <code>$group_dset$</code> dataset</a></li>
|
||||
<li><a href="#orgf4b42a0">1.10. RDM struct (hard-coded)</a>
|
||||
<ul>
|
||||
<li><a href="#org9ecec20">1.10.1. Read the complete struct</a></li>
|
||||
<li><a href="#orgea20d9f">1.10.2. Flush the complete struct</a></li>
|
||||
<li><a href="#org2bfdd42">1.10.3. Free memory</a></li>
|
||||
<li><a href="#org5c16c75">1.10.4. Read/Write the one<sub>e</sub> attribute</a></li>
|
||||
<li><a href="#orge4472a8">1.10.5. Read/Write the two<sub>e</sub> attribute</a></li>
|
||||
<li><a href="#org88f1395">1.10.1. Read the complete struct</a></li>
|
||||
<li><a href="#org351e7da">1.10.2. Flush the complete struct</a></li>
|
||||
<li><a href="#org89f5463">1.10.3. Free memory</a></li>
|
||||
<li><a href="#org2826dac">1.10.4. Read/Write the one<sub>e</sub> attribute</a></li>
|
||||
<li><a href="#orgf985094">1.10.5. Read/Write the two<sub>e</sub> attribute</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -337,8 +337,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7dc3f1f" class="outline-2">
|
||||
<h2 id="org7dc3f1f"><span class="section-number-2">1</span> TEXT back end</h2>
|
||||
<div id="outline-container-org380a32e" class="outline-2">
|
||||
<h2 id="org380a32e"><span class="section-number-2">1</span> TEXT back end</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
The "file" produced by the text back end is a directory with one
|
||||
@ -359,8 +359,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org670c2d5" class="outline-3">
|
||||
<h3 id="org670c2d5"><span class="section-number-3">1.1</span> Template for group-related structures in text back end</h3>
|
||||
<div id="outline-container-orgde59557" class="outline-3">
|
||||
<h3 id="orgde59557"><span class="section-number-3">1.1</span> Template for group-related structures in text back end</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> $group$_s {
|
||||
@ -376,8 +376,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf7dc9df" class="outline-3">
|
||||
<h3 id="orgf7dc9df"><span class="section-number-3">1.2</span> Template for general structure in text back end</h3>
|
||||
<div id="outline-container-org3780722" class="outline-3">
|
||||
<h3 id="org3780722"><span class="section-number-3">1.2</span> Template for general structure in text back end</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">rdm_s</span> {
|
||||
@ -403,8 +403,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgad59742" class="outline-3">
|
||||
<h3 id="orgad59742"><span class="section-number-3">1.3</span> Initialize function (constant part)</h3>
|
||||
<div id="outline-container-orgeeb2c5f" class="outline-3">
|
||||
<h3 id="orgeeb2c5f"><span class="section-number-3">1.3</span> Initialize function (constant part)</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -511,8 +511,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1020f33" class="outline-3">
|
||||
<h3 id="org1020f33"><span class="section-number-3">1.4</span> Deinitialize function (templated part)</h3>
|
||||
<div id="outline-container-orgee22292" class="outline-3">
|
||||
<h3 id="orgee22292"><span class="section-number-3">1.4</span> Deinitialize function (templated part)</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -536,8 +536,8 @@ The file is written when closed, or when the flush function is called.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2da2348" class="outline-3">
|
||||
<h3 id="org2da2348"><span class="section-number-3">1.5</span> Template for text read struct</h3>
|
||||
<div id="outline-container-orgef457ac" class="outline-3">
|
||||
<h3 id="orgef457ac"><span class="section-number-3">1.5</span> Template for text read struct</h3>
|
||||
<div class="outline-text-3" id="text-1-5">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">$group$_t*
|
||||
@ -632,7 +632,7 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
|
||||
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
|
||||
rc = fscanf(f, <span style="color: #8b2252;">"%llu\n"</span>, &($group$->dims_$group_dset$[i]));
|
||||
rc = fscanf(f, <span style="color: #8b2252;">"%lu\n"</span>, &($group$->dims_$group_dset$[i]));
|
||||
assert(!(rc != 1));
|
||||
<span style="color: #a020f0;">if</span> (rc != 1) {
|
||||
FREE(buffer);
|
||||
@ -658,7 +658,7 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
|
||||
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||
}
|
||||
|
||||
rc = fscanf(f, <span style="color: #8b2252;">"%llu"</span>, &($group$->$group_num$));
|
||||
rc = fscanf(f, <span style="color: #8b2252;">"%lu"</span>, &($group$->$group_num$));
|
||||
assert(!(rc != 1));
|
||||
<span style="color: #a020f0;">if</span> (rc != 1) {
|
||||
FREE(buffer);
|
||||
@ -734,8 +734,8 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd7e9164" class="outline-3">
|
||||
<h3 id="orgd7e9164"><span class="section-number-3">1.6</span> Template for text flush struct</h3>
|
||||
<div id="outline-container-orgc7fefcc" class="outline-3">
|
||||
<h3 id="orgc7fefcc"><span class="section-number-3">1.6</span> Template for text flush struct</h3>
|
||||
<div class="outline-text-3" id="text-1-6">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -764,14 +764,14 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
|
||||
<span style="color: #a020f0;">if</span> ($group$->rank_$group_dset$ != 0) size_$group_dset$ = 1;
|
||||
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">unsigned</span> <span style="color: #228b22;">int</span> <span style="color: #a0522d;">i</span>=0; i<$group$->rank_$group_dset$; ++i){
|
||||
fprintf(f, <span style="color: #8b2252;">"dims_$group_dset$ %u %llu\n"</span>, i, $group$->dims_$group_dset$[i]);
|
||||
fprintf(f, <span style="color: #8b2252;">"dims_$group_dset$ %u %lu\n"</span>, i, $group$->dims_$group_dset$[i]);
|
||||
size_$group_dset$ *= $group$->dims_$group_dset$[i];
|
||||
}
|
||||
|
||||
// <span style="color: #b22222;">END REPEAT GROUP_DSET</span>
|
||||
|
||||
// <span style="color: #b22222;">START REPEAT GROUP_NUM</span>
|
||||
fprintf(f, <span style="color: #8b2252;">"$group_num$ %llu\n"</span>, $group$->$group_num$);
|
||||
fprintf(f, <span style="color: #8b2252;">"$group_num$ %lu\n"</span>, $group$->$group_num$);
|
||||
// <span style="color: #b22222;">END REPEAT GROUP_NUM</span>
|
||||
|
||||
/* <span style="color: #b22222;">Write arrays </span>*/
|
||||
@ -793,8 +793,8 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org450577e" class="outline-3">
|
||||
<h3 id="org450577e"><span class="section-number-3">1.7</span> Template for text free memory</h3>
|
||||
<div id="outline-container-orga9e3ad9" class="outline-3">
|
||||
<h3 id="orga9e3ad9"><span class="section-number-3">1.7</span> Template for text free memory</h3>
|
||||
<div class="outline-text-3" id="text-1-7">
|
||||
<p>
|
||||
Memory is allocated when reading. The following function frees memory.
|
||||
@ -835,8 +835,8 @@ Memory is allocated when reading. The following function frees memory.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2ee2f2b" class="outline-3">
|
||||
<h3 id="org2ee2f2b"><span class="section-number-3">1.8</span> Template for has/read/write the <code>$group_num$</code> attribute</h3>
|
||||
<div id="outline-container-org45a3c08" class="outline-3">
|
||||
<h3 id="org45a3c08"><span class="section-number-3">1.8</span> Template for has/read/write the <code>$group_num$</code> attribute</h3>
|
||||
<div class="outline-text-3" id="text-1-8">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||
@ -898,8 +898,8 @@ Memory is allocated when reading. The following function frees memory.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orged6a8bd" class="outline-3">
|
||||
<h3 id="orged6a8bd"><span class="section-number-3">1.9</span> Template for has/read/write the <code>$group_dset$</code> dataset</h3>
|
||||
<div id="outline-container-org5485d73" class="outline-3">
|
||||
<h3 id="org5485d73"><span class="section-number-3">1.9</span> Template for has/read/write the <code>$group_dset$</code> dataset</h3>
|
||||
<div class="outline-text-3" id="text-1-9">
|
||||
<p>
|
||||
The <code>group_dset</code> array is assumed allocated with the appropriate size.
|
||||
@ -996,12 +996,12 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7bd8598" class="outline-3">
|
||||
<h3 id="org7bd8598"><span class="section-number-3">1.10</span> RDM struct (hard-coded)</h3>
|
||||
<div id="outline-container-orgf4b42a0" class="outline-3">
|
||||
<h3 id="orgf4b42a0"><span class="section-number-3">1.10</span> RDM struct (hard-coded)</h3>
|
||||
<div class="outline-text-3" id="text-1-10">
|
||||
</div>
|
||||
<div id="outline-container-org9ecec20" class="outline-4">
|
||||
<h4 id="org9ecec20"><span class="section-number-4">1.10.1</span> Read the complete struct</h4>
|
||||
<div id="outline-container-org88f1395" class="outline-4">
|
||||
<h4 id="org88f1395"><span class="section-number-4">1.10.1</span> Read the complete struct</h4>
|
||||
<div class="outline-text-4" id="text-1-10-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">rdm_t</span>* <span style="color: #0000ff;">trexio_text_read_rdm</span>(<span style="color: #228b22;">trexio_text_t</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">file</span>);
|
||||
@ -1109,8 +1109,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgea20d9f" class="outline-4">
|
||||
<h4 id="orgea20d9f"><span class="section-number-4">1.10.2</span> Flush the complete struct</h4>
|
||||
<div id="outline-container-org351e7da" class="outline-4">
|
||||
<h4 id="org351e7da"><span class="section-number-4">1.10.2</span> Flush the complete struct</h4>
|
||||
<div class="outline-text-4" id="text-1-10-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span> <span style="color: #0000ff;">trexio_text_flush_rdm</span>(<span style="color: #228b22;">trexio_text_t</span>* <span style="color: #a020f0;">const</span> <span style="color: #a0522d;">file</span>);
|
||||
@ -1153,8 +1153,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2bfdd42" class="outline-4">
|
||||
<h4 id="org2bfdd42"><span class="section-number-4">1.10.3</span> Free memory</h4>
|
||||
<div id="outline-container-org89f5463" class="outline-4">
|
||||
<h4 id="org89f5463"><span class="section-number-4">1.10.3</span> Free memory</h4>
|
||||
<div class="outline-text-4" id="text-1-10-3">
|
||||
<p>
|
||||
Memory is allocated when reading. The followig function frees memory.
|
||||
@ -1199,8 +1199,8 @@ Memory is allocated when reading. The followig function frees memory.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5c16c75" class="outline-4">
|
||||
<h4 id="org5c16c75"><span class="section-number-4">1.10.4</span> Read/Write the one<sub>e</sub> attribute</h4>
|
||||
<div id="outline-container-org2826dac" class="outline-4">
|
||||
<h4 id="org2826dac"><span class="section-number-4">1.10.4</span> Read/Write the one<sub>e</sub> attribute</h4>
|
||||
<div class="outline-text-4" id="text-1-10-4">
|
||||
<p>
|
||||
The <code>one_e</code> array is assumed allocated with the appropriate size.
|
||||
@ -1266,8 +1266,8 @@ The <code>one_e</code> array is assumed allocated with the appropriate size.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge4472a8" class="outline-4">
|
||||
<h4 id="orge4472a8"><span class="section-number-4">1.10.5</span> Read/Write the two<sub>e</sub> attribute</h4>
|
||||
<div id="outline-container-orgf985094" class="outline-4">
|
||||
<h4 id="orgf985094"><span class="section-number-4">1.10.5</span> Read/Write the two<sub>e</sub> attribute</h4>
|
||||
<div class="outline-text-4" id="text-1-10-5">
|
||||
<p>
|
||||
<code>two_e</code> is a sparse data structure, which can be too large to fit
|
||||
@ -1316,7 +1316,7 @@ file for each sparse float structure.
|
||||
fseek(f, (<span style="color: #228b22;">long</span>) <span style="color: #228b22;">offset</span> * <span style="color: #a0522d;">line_length</span>, <span style="color: #a0522d;">SEEK_SET</span>);
|
||||
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<size ; ++i) {
|
||||
<span style="color: #228b22;">int</span> <span style="color: #a0522d;">rc</span> = fscanf(f, <span style="color: #8b2252;">"%9lld %9lld %9lld %9lld %24le\n"</span>,
|
||||
<span style="color: #228b22;">int</span> <span style="color: #a0522d;">rc</span> = fscanf(f, <span style="color: #8b2252;">"%9ld %9ld %9ld %9ld %24le\n"</span>,
|
||||
&index[4*i],
|
||||
&index[4*i+1],
|
||||
&index[4*i+2],
|
||||
@ -1355,7 +1355,7 @@ file for each sparse float structure.
|
||||
fseek(f, (<span style="color: #228b22;">long</span>) <span style="color: #228b22;">offset</span> * <span style="color: #a0522d;">line_length</span>, <span style="color: #a0522d;">SEEK_SET</span>);
|
||||
|
||||
<span style="color: #a020f0;">for</span> (<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">i</span>=0 ; i<size ; ++i) {
|
||||
<span style="color: #228b22;">int</span> <span style="color: #a0522d;">rc</span> = fprintf(f, <span style="color: #8b2252;">"%9lld %9lld %9lld %9lld %24le\n"</span>,
|
||||
<span style="color: #228b22;">int</span> <span style="color: #a0522d;">rc</span> = fprintf(f, <span style="color: #8b2252;">"%9ld %9ld %9ld %9ld %24le\n"</span>,
|
||||
index[4*i],
|
||||
index[4*i+1],
|
||||
index[4*i+2],
|
||||
@ -1375,7 +1375,7 @@ file for each sparse float structure.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX-CoE</p>
|
||||
<p class="date">Created: 2021-05-06 Thu 07:26</p>
|
||||
<p class="date">Created: 2021-05-06 Thu 07:37</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user