1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-12-25 22:03:56 +01:00

Deploying to gh-pages from @ TREX-CoE/trexio@1d5c452071 🚀

This commit is contained in:
scemama 2021-05-19 20:03:41 +00:00
parent c7fd173205
commit cdab5498be
5 changed files with 157 additions and 148 deletions

View File

@ -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-19 Wed 14:18 -->
<!-- 2021-05-19 Wed 20:03 -->
<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-19 Wed 14:18</p>
<p class="date">Created: 2021-05-19 Wed 20:03</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -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-19 Wed 14:18 -->
<!-- 2021-05-19 Wed 20:03 -->
<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-19 Wed 14:18</p>
<p class="date">Created: 2021-05-19 Wed 20:03</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -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-19 Wed 14:18 -->
<!-- 2021-05-19 Wed 20:03 -->
<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="#orgb464ef6">1. Coding conventions</a>
<li><a href="#orgdc49748">1. Coding conventions</a>
<ul>
<li><a href="#org6c4020e">1.1. Memory allocation</a></li>
<li><a href="#orga7950fc">1.1. Memory allocation</a></li>
</ul>
</li>
<li><a href="#orgebec298">2. Front end</a>
<li><a href="#org2991b00">2. Front end</a>
<ul>
<li><a href="#org66241b9">2.1. Error handling</a></li>
<li><a href="#orga579bbc">2.2. Back ends</a></li>
<li><a href="#orgdf77c20">2.3. Read/write behavior</a></li>
<li><a href="#orgfaa145d">2.4. TREXIO file type</a></li>
<li><a href="#orgafd92d7">2.5. Polymorphism of the file handle</a></li>
<li><a href="#org2d60f32">2.6. File opening</a></li>
<li><a href="#org22d586d">2.7. File closing</a></li>
<li><a href="#orgdaf17ba">2.1. Error handling</a></li>
<li><a href="#org95544cf">2.2. Back ends</a></li>
<li><a href="#org2182097">2.3. Read/write behavior</a></li>
<li><a href="#org0e936a3">2.4. TREXIO file type</a></li>
<li><a href="#org7bbd997">2.5. Polymorphism of the file handle</a></li>
<li><a href="#org1a02f87">2.6. File opening</a></li>
<li><a href="#org9ba0774">2.7. File closing</a></li>
</ul>
</li>
<li><a href="#org5635014">3. Templates for front end</a>
<li><a href="#orga48506b">3. Templates for front end</a>
<ul>
<li><a href="#orga83c23a">3.1. Templates for front end has/read/write a dimension</a>
<li><a href="#org8530b55">3.1. Templates for front end has/read/write a dimension</a>
<ul>
<li><a href="#orgccedd43">3.1.1. C templates for front end</a></li>
<li><a href="#orgff65795">3.1.2. Fortran templates for front end</a></li>
<li><a href="#org960c8a7">3.1.1. C templates for front end</a></li>
<li><a href="#org4a10fc8">3.1.2. Fortran templates for front end</a></li>
</ul>
</li>
<li><a href="#org870a50f">3.2. Templates for front end has/read/write a dataset</a>
<li><a href="#org2c24725">3.2. Templates for front end has/read/write a dataset</a>
<ul>
<li><a href="#org1aa1261">3.2.1. C templates for front end</a></li>
<li><a href="#org21edd75">3.2.2. Fortran templates for front end</a></li>
<li><a href="#org8e87e91">3.2.1. C templates for front end</a></li>
<li><a href="#org2f13c87">3.2.2. Fortran templates for front end</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org9bdae9a">4. Fortran helper/wrapper functions</a></li>
<li><a href="#org7ec4413">4. Fortran helper/wrapper functions</a></li>
</ul>
</div>
</div>
<div id="outline-container-orgb464ef6" class="outline-2">
<h2 id="orgb464ef6"><span class="section-number-2">1</span> Coding conventions</h2>
<div id="outline-container-orgdc49748" class="outline-2">
<h2 id="orgdc49748"><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-org6c4020e" class="outline-3">
<h3 id="org6c4020e"><span class="section-number-3">1.1</span> Memory allocation</h3>
<div id="outline-container-orga7950fc" class="outline-3">
<h3 id="orga7950fc"><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
@ -400,8 +400,8 @@ The maximum string size for the filenames is 4096 characters.
</div>
</div>
<div id="outline-container-orgebec298" class="outline-2">
<h2 id="orgebec298"><span class="section-number-2">2</span> Front end</h2>
<div id="outline-container-org2991b00" class="outline-2">
<h2 id="org2991b00"><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.
@ -409,10 +409,10 @@ TREXIO front end is modular, which simplifies implementation of new back ends.
</p>
</div>
<div id="outline-container-org66241b9" class="outline-3">
<h3 id="org66241b9"><span class="section-number-3">2.1</span> Error handling</h3>
<div id="outline-container-orgdaf17ba" class="outline-3">
<h3 id="orgdaf17ba"><span class="section-number-3">2.1</span> Error handling</h3>
<div class="outline-text-3" id="text-2-1">
<table id="org71050c6" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org3332708" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
@ -694,8 +694,8 @@ The text strings are extracted from the previous table.
</div>
</div>
<div id="outline-container-orga579bbc" class="outline-3">
<h3 id="orga579bbc"><span class="section-number-3">2.2</span> Back ends</h3>
<div id="outline-container-org95544cf" class="outline-3">
<h3 id="org95544cf"><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:
@ -725,8 +725,8 @@ lines that correspond to the <code>TREXIO_JSON</code> back end (not implemented
</div>
</div>
</div>
<div id="outline-container-orgdf77c20" class="outline-3">
<h3 id="orgdf77c20"><span class="section-number-3">2.3</span> Read/write behavior</h3>
<div id="outline-container-org2182097" class="outline-3">
<h3 id="org2182097"><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
@ -754,8 +754,8 @@ concurrent programs, the behavior is not specified.
</p>
</div>
</div>
<div id="outline-container-orgfaa145d" class="outline-3">
<h3 id="orgfaa145d"><span class="section-number-3">2.4</span> TREXIO file type</h3>
<div id="outline-container-org0e936a3" class="outline-3">
<h3 id="org0e936a3"><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
@ -787,8 +787,8 @@ TREXIO files will have as a first argument the TREXIO file handle.
</div>
</div>
</div>
<div id="outline-container-orgafd92d7" class="outline-3">
<h3 id="orgafd92d7"><span class="section-number-3">2.5</span> Polymorphism of the file handle</h3>
<div id="outline-container-org7bbd997" class="outline-3">
<h3 id="org7bbd997"><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
@ -807,8 +807,8 @@ corresponding types for all back ends can be safely casted to
</div>
</div>
<div id="outline-container-org2d60f32" class="outline-3">
<h3 id="org2d60f32"><span class="section-number-3">2.6</span> File opening</h3>
<div id="outline-container-org1a02f87" class="outline-3">
<h3 id="org1a02f87"><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.
@ -861,16 +861,17 @@ should tend to avoid renaming the <code>.txt</code> data files.
<span style="color: #a020f0;">if</span> (mode != <span style="color: #8b2252;">'r'</span> &amp;&amp; mode != <span style="color: #8b2252;">'w'</span> &amp;&amp; mode != <span style="color: #8b2252;">'a'</span>) <span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
<span style="color: #228b22;">trexio_t</span>* <span style="color: #a0522d;">result</span> = <span style="color: #008b8b;">NULL</span>;
<span style="color: #228b22;">void</span>* <span style="color: #a0522d;">result_tmp</span> = <span style="color: #008b8b;">NULL</span>;
/* <span style="color: #b22222;">Allocate data structures </span>*/
<span style="color: #a020f0;">switch</span> (back_end) {
<span style="color: #a020f0;">case</span> TREXIO_TEXT:
result = (<span style="color: #228b22;">trexio_t</span>*) malloc (<span style="color: #a020f0;">sizeof</span>(trexio_text_t));
result_tmp = malloc(<span style="color: #a020f0;">sizeof</span>(trexio_text_t));
<span style="color: #a020f0;">break</span>;
<span style="color: #a020f0;">case</span> TREXIO_HDF5:
result = (<span style="color: #228b22;">trexio_t</span>*) malloc (<span style="color: #a020f0;">sizeof</span>(trexio_hdf5_t));
result_tmp = malloc(<span style="color: #a020f0;">sizeof</span>(trexio_hdf5_t));
<span style="color: #a020f0;">break</span>;
/*
<span style="color: #b22222;"> case TREXIO_JSON:</span>
@ -878,6 +879,7 @@ should tend to avoid renaming the <code>.txt</code> data files.
<span style="color: #b22222;"> break;</span>
*/
}
result = (<span style="color: #228b22;">trexio_t</span>*) result_tmp;
assert (result != <span style="color: #008b8b;">NULL</span>); /* <span style="color: #b22222;">TODO: Error handling </span>*/
@ -970,8 +972,8 @@ should tend to avoid renaming the <code>.txt</code> data files.
</div>
</div>
<div id="outline-container-org22d586d" class="outline-3">
<h3 id="org22d586d"><span class="section-number-3">2.7</span> File closing</h3>
<div id="outline-container-org9ba0774" class="outline-3">
<h3 id="org9ba0774"><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.
@ -994,7 +996,9 @@ output:
<span style="color: #a020f0;">if</span> (file == <span style="color: #008b8b;">NULL</span>) <span style="color: #a020f0;">return</span> TREXIO_FILE_ERROR;
<span style="color: #228b22;">trexio_exit_code</span> <span style="color: #a0522d;">rc</span>;
<span style="color: #228b22;">trexio_exit_code</span> <span style="color: #a0522d;">rc</span> = TREXIO_FAILURE;
assert(file-&gt;back_end &lt; TREXIO_INVALID_BACK_END);
/* <span style="color: #b22222;">Terminate the back end </span>*/
<span style="color: #a020f0;">switch</span> (file-&gt;back_end) {
@ -1011,8 +1015,6 @@ output:
<span style="color: #b22222;"> rc = trexio_json_deinit(file);</span>
<span style="color: #b22222;"> break;</span>
*/
<span style="color: #a020f0;">default</span>:
rc = TREXIO_FAILURE; /* <span style="color: #b22222;">Impossible case </span>*/
}
<span style="color: #a020f0;">if</span> (rc != TREXIO_SUCCESS) {
@ -1070,8 +1072,8 @@ output:
</div>
</div>
<div id="outline-container-org5635014" class="outline-2">
<h2 id="org5635014"><span class="section-number-2">3</span> Templates for front end</h2>
<div id="outline-container-orga48506b" class="outline-2">
<h2 id="orga48506b"><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>:
@ -1261,8 +1263,8 @@ or double precision for integer and floating point numbers.
</p>
</div>
<div id="outline-container-orga83c23a" class="outline-3">
<h3 id="orga83c23a"><span class="section-number-3">3.1</span> Templates for front end has/read/write a dimension</h3>
<div id="outline-container-org8530b55" class="outline-3">
<h3 id="org8530b55"><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.
@ -1331,8 +1333,8 @@ This section concerns API calls related to dimensioning variables.
</table>
</div>
<div id="outline-container-orgccedd43" class="outline-4">
<h4 id="orgccedd43"><span class="section-number-4">3.1.1</span> C templates for front end</h4>
<div id="outline-container-org960c8a7" class="outline-4">
<h4 id="org960c8a7"><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
@ -1500,6 +1502,8 @@ precision (see Table above).
<span style="color: #a020f0;">if</span> (file == <span style="color: #008b8b;">NULL</span>) <span style="color: #a020f0;">return</span> TREXIO_INVALID_ARG_1;
assert(file-&gt;back_end &lt; TREXIO_INVALID_BACK_END);
<span style="color: #a020f0;">switch</span> (file-&gt;back_end) {
<span style="color: #a020f0;">case</span> TREXIO_TEXT:
@ -1514,9 +1518,8 @@ precision (see Table above).
<span style="color: #b22222;"> return trexio_json_has_$group_num$(file);</span>
<span style="color: #b22222;"> break;</span>
*/
<span style="color: #a020f0;">default</span>:
<span style="color: #a020f0;">return</span> TREXIO_FAILURE; /* <span style="color: #b22222;">Impossible case </span>*/
}
<span style="color: #a020f0;">return</span> TREXIO_FAILURE;
}
</pre>
@ -1524,8 +1527,8 @@ precision (see Table above).
</div>
</div>
<div id="outline-container-orgff65795" class="outline-4">
<h4 id="orgff65795"><span class="section-number-4">3.1.2</span> Fortran templates for front end</h4>
<div id="outline-container-org4a10fc8" class="outline-4">
<h4 id="org4a10fc8"><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.
@ -1611,8 +1614,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-org870a50f" class="outline-3">
<h3 id="org870a50f"><span class="section-number-3">3.2</span> Templates for front end has/read/write a dataset</h3>
<div id="outline-container-org2c24725" class="outline-3">
<h3 id="org2c24725"><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.
@ -1681,8 +1684,8 @@ This section concerns API calls related to datasets.
</table>
</div>
<div id="outline-container-org1aa1261" class="outline-4">
<h4 id="org1aa1261"><span class="section-number-4">3.2.1</span> C templates for front end</h4>
<div id="outline-container-org8e87e91" class="outline-4">
<h4 id="org8e87e91"><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.
@ -1712,6 +1715,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
<span style="color: #228b22;">uint32_t</span> <span style="color: #a0522d;">rank</span> = $group_dset_rank$;
<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">dims</span>[$group_dset_rank$] = {$group_dset_dim_list$};
assert(file-&gt;back_end &lt; TREXIO_INVALID_BACK_END);
<span style="color: #a020f0;">switch</span> (file-&gt;back_end) {
<span style="color: #a020f0;">case</span> TREXIO_TEXT:
@ -1726,9 +1731,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
<span style="color: #b22222;"> return trexio_json_read_$group$_$group_dset$(file, $group_dset$, rank, dims);</span>
<span style="color: #b22222;"> break;</span>
*/
<span style="color: #a020f0;">default</span>:
<span style="color: #a020f0;">return</span> TREXIO_FAILURE; /* <span style="color: #b22222;">Impossible case </span>*/
}
<span style="color: #a020f0;">return</span> TREXIO_FAILURE;
}
</pre>
</div>
@ -1752,6 +1756,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
<span style="color: #228b22;">uint32_t</span> <span style="color: #a0522d;">rank</span> = $group_dset_rank$;
<span style="color: #228b22;">uint64_t</span> <span style="color: #a0522d;">dims</span>[$group_dset_rank$] = {$group_dset_dim_list$};
assert(file-&gt;back_end &lt; TREXIO_INVALID_BACK_END);
<span style="color: #a020f0;">switch</span> (file-&gt;back_end) {
<span style="color: #a020f0;">case</span> TREXIO_TEXT:
@ -1766,9 +1772,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
<span style="color: #b22222;"> return trexio_json_write_$group$_$group_dset$(file, $group_dset$, rank, dims);</span>
<span style="color: #b22222;"> break;</span>
*/
<span style="color: #a020f0;">default</span>:
<span style="color: #a020f0;">return</span> TREXIO_FAILURE; /* <span style="color: #b22222;">Impossible case </span>*/
}
<span style="color: #a020f0;">return</span> TREXIO_FAILURE;
}
</pre>
</div>
@ -1800,6 +1805,10 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
$group_dset_dtype_double$* $group_dset$_64 = CALLOC(dim_size, $group_dset_dtype_double$);
<span style="color: #a020f0;">if</span> ($group_dset$_64 == <span style="color: #008b8b;">NULL</span>) <span style="color: #a020f0;">return</span> TREXIO_ALLOCATION_FAILED;
assert(file-&gt;back_end &lt; TREXIO_INVALID_BACK_END);
rc = TREXIO_FAILURE;
<span style="color: #a020f0;">switch</span> (file-&gt;back_end) {
<span style="color: #a020f0;">case</span> TREXIO_TEXT:
@ -1814,8 +1823,6 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
<span style="color: #b22222;"> rc = trexio_json_read_$group$_$group_dset$(file, $group_dset$_64, rank, dims);</span>
<span style="color: #b22222;"> break;</span>
*/
<span style="color: #a020f0;">default</span>:
<span style="color: #a020f0;">return</span> TREXIO_FAILURE; /* <span style="color: #b22222;">Impossible case </span>*/
}
<span style="color: #a020f0;">if</span> (rc != TREXIO_SUCCESS){
@ -1865,6 +1872,9 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
$group_dset$_64[i] = ($group_dset_dtype_double$) $group_dset$[i];
}
assert(file-&gt;back_end &lt; TREXIO_INVALID_BACK_END);
rc = TREXIO_FAILURE;
<span style="color: #a020f0;">switch</span> (file-&gt;back_end) {
<span style="color: #a020f0;">case</span> TREXIO_TEXT:
@ -1879,8 +1889,6 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
<span style="color: #b22222;"> rc = trexio_json_write_$group$_$group_dset$(file, $group_dset$_64, rank, dims);</span>
<span style="color: #b22222;"> break;</span>
*/
<span style="color: #a020f0;">default</span>:
<span style="color: #a020f0;">return</span> TREXIO_FAILURE; /* <span style="color: #b22222;">Impossible case </span>*/
}
FREE($group_dset$_64);
@ -1917,6 +1925,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
<span style="color: #a020f0;">if</span> (file == <span style="color: #008b8b;">NULL</span>) <span style="color: #a020f0;">return</span> TREXIO_INVALID_ARG_1;
assert(file-&gt;back_end &lt; TREXIO_INVALID_BACK_END);
<span style="color: #a020f0;">switch</span> (file-&gt;back_end) {
<span style="color: #a020f0;">case</span> TREXIO_TEXT:
@ -1931,17 +1941,16 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
<span style="color: #b22222;"> return trexio_json_has_$group$_$group_dset$(file);</span>
<span style="color: #b22222;"> break;</span>
*/
<span style="color: #a020f0;">default</span>:
<span style="color: #a020f0;">return</span> TREXIO_FAILURE; /* <span style="color: #b22222;">Impossible case </span>*/
}
<span style="color: #a020f0;">return</span> TREXIO_FAILURE;
}
</pre>
</div>
</div>
</div>
<div id="outline-container-org21edd75" class="outline-4">
<h4 id="org21edd75"><span class="section-number-4">3.2.2</span> Fortran templates for front end</h4>
<div id="outline-container-org2f13c87" class="outline-4">
<h4 id="org2f13c87"><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>.
@ -2028,8 +2037,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
</div>
</div>
<div id="outline-container-org9bdae9a" class="outline-2">
<h2 id="org9bdae9a"><span class="section-number-2">4</span> Fortran helper/wrapper functions</h2>
<div id="outline-container-org7ec4413" class="outline-2">
<h2 id="org7ec4413"><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.
@ -2058,7 +2067,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-19 Wed 14:18</p>
<p class="date">Created: 2021-05-19 Wed 20:03</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -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-19 Wed 14:18 -->
<!-- 2021-05-19 Wed 20:03 -->
<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="#orgbaa0d93">1. HDF5 back end</a>
<li><a href="#orgd0756e7">1. HDF5 back end</a>
<ul>
<li><a href="#org4ed9dbd">1.1. Template for HDF5 definitions</a></li>
<li><a href="#org6ec356c">1.2. Template for HDF5 structures</a></li>
<li><a href="#org74dd7b1">1.3. Template for HDF5 init/deinit</a></li>
<li><a href="#orgd15e40b">1.4. Template for HDF5 has/read/write a number</a></li>
<li><a href="#org875aa99">1.5. Template for HDF5 has/read/write a dataset</a></li>
<li><a href="#orge174b55">1.1. Template for HDF5 definitions</a></li>
<li><a href="#org40291b2">1.2. Template for HDF5 structures</a></li>
<li><a href="#org3d47cb5">1.3. Template for HDF5 init/deinit</a></li>
<li><a href="#orga65a1ac">1.4. Template for HDF5 has/read/write a number</a></li>
<li><a href="#org0f8d9f4">1.5. Template for HDF5 has/read/write a dataset</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-orgbaa0d93" class="outline-2">
<h2 id="orgbaa0d93"><span class="section-number-2">1</span> HDF5 back end</h2>
<div id="outline-container-orgd0756e7" class="outline-2">
<h2 id="orgd0756e7"><span class="section-number-2">1</span> HDF5 back end</h2>
<div class="outline-text-2" id="text-1">
</div>
<div id="outline-container-org4ed9dbd" class="outline-3">
<h3 id="org4ed9dbd"><span class="section-number-3">1.1</span> Template for HDF5 definitions</h3>
<div id="outline-container-orge174b55" class="outline-3">
<h3 id="orge174b55"><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-org6ec356c" class="outline-3">
<h3 id="org6ec356c"><span class="section-number-3">1.2</span> Template for HDF5 structures</h3>
<div id="outline-container-org40291b2" class="outline-3">
<h3 id="org40291b2"><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-org74dd7b1" class="outline-3">
<h3 id="org74dd7b1"><span class="section-number-3">1.3</span> Template for HDF5 init/deinit</h3>
<div id="outline-container-org3d47cb5" class="outline-3">
<h3 id="org3d47cb5"><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-orgd15e40b" class="outline-3">
<h3 id="orgd15e40b"><span class="section-number-3">1.4</span> Template for HDF5 has/read/write a number</h3>
<div id="outline-container-orga65a1ac" class="outline-3">
<h3 id="orga65a1ac"><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>
@ -563,8 +563,8 @@ for the JavaScript code in this tag.
</div>
</div>
<div id="outline-container-org875aa99" class="outline-3">
<h3 id="org875aa99"><span class="section-number-3">1.5</span> Template for HDF5 has/read/write a dataset</h3>
<div id="outline-container-org0f8d9f4" class="outline-3">
<h3 id="org0f8d9f4"><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>
@ -698,7 +698,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-19 Wed 14:18</p>
<p class="date">Created: 2021-05-19 Wed 20:03</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -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-19 Wed 14:18 -->
<!-- 2021-05-19 Wed 20:03 -->
<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="#org5975d68">1. TEXT back end</a>
<li><a href="#org45642ac">1. TEXT back end</a>
<ul>
<li><a href="#orga0496ec">1.1. Template for group-related structures in text back end</a></li>
<li><a href="#org51508ac">1.2. Template for general structure in text back end</a></li>
<li><a href="#org1a746b9">1.3. Initialize function (constant part)</a></li>
<li><a href="#org3850b1e">1.4. Deinitialize function (templated part)</a></li>
<li><a href="#orgfc7d591">1.5. Template for text read struct</a></li>
<li><a href="#org4675a4a">1.6. Template for text flush struct</a></li>
<li><a href="#org7872582">1.7. Template for text free memory</a></li>
<li><a href="#orgb7977e3">1.8. Template for has/read/write the <code>$group_num$</code> attribute</a></li>
<li><a href="#orge14f1a6">1.9. Template for has/read/write the <code>$group_dset$</code> dataset</a></li>
<li><a href="#orgba28ad7">1.10. RDM struct (hard-coded)</a>
<li><a href="#org5b786b6">1.1. Template for group-related structures in text back end</a></li>
<li><a href="#org3f66a4a">1.2. Template for general structure in text back end</a></li>
<li><a href="#org09f6c43">1.3. Initialize function (constant part)</a></li>
<li><a href="#org40d9188">1.4. Deinitialize function (templated part)</a></li>
<li><a href="#org749469d">1.5. Template for text read struct</a></li>
<li><a href="#org5e1b9b6">1.6. Template for text flush struct</a></li>
<li><a href="#orgc429d48">1.7. Template for text free memory</a></li>
<li><a href="#org342afc4">1.8. Template for has/read/write the <code>$group_num$</code> attribute</a></li>
<li><a href="#org5457534">1.9. Template for has/read/write the <code>$group_dset$</code> dataset</a></li>
<li><a href="#orgd050afa">1.10. RDM struct (hard-coded)</a>
<ul>
<li><a href="#org49e9b52">1.10.1. Read the complete struct</a></li>
<li><a href="#org1060223">1.10.2. Flush the complete struct</a></li>
<li><a href="#org576d31d">1.10.3. Free memory</a></li>
<li><a href="#org51a8b69">1.10.4. Read/Write the one<sub>e</sub> attribute</a></li>
<li><a href="#orgf8e3672">1.10.5. Read/Write the two<sub>e</sub> attribute</a></li>
<li><a href="#org327082a">1.10.1. Read the complete struct</a></li>
<li><a href="#org54d487a">1.10.2. Flush the complete struct</a></li>
<li><a href="#orgfdf7283">1.10.3. Free memory</a></li>
<li><a href="#org9541462">1.10.4. Read/Write the one<sub>e</sub> attribute</a></li>
<li><a href="#org9069570">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-org5975d68" class="outline-2">
<h2 id="org5975d68"><span class="section-number-2">1</span> TEXT back end</h2>
<div id="outline-container-org45642ac" class="outline-2">
<h2 id="org45642ac"><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-orga0496ec" class="outline-3">
<h3 id="orga0496ec"><span class="section-number-3">1.1</span> Template for group-related structures in text back end</h3>
<div id="outline-container-org5b786b6" class="outline-3">
<h3 id="org5b786b6"><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-org51508ac" class="outline-3">
<h3 id="org51508ac"><span class="section-number-3">1.2</span> Template for general structure in text back end</h3>
<div id="outline-container-org3f66a4a" class="outline-3">
<h3 id="org3f66a4a"><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-org1a746b9" class="outline-3">
<h3 id="org1a746b9"><span class="section-number-3">1.3</span> Initialize function (constant part)</h3>
<div id="outline-container-org09f6c43" class="outline-3">
<h3 id="org09f6c43"><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>
@ -505,8 +505,8 @@ The file is written when closed, or when the flush function is called.
</div>
</div>
<div id="outline-container-org3850b1e" class="outline-3">
<h3 id="org3850b1e"><span class="section-number-3">1.4</span> Deinitialize function (templated part)</h3>
<div id="outline-container-org40d9188" class="outline-3">
<h3 id="org40d9188"><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>
@ -531,8 +531,8 @@ The file is written when closed, or when the flush function is called.
</div>
</div>
<div id="outline-container-orgfc7d591" class="outline-3">
<h3 id="orgfc7d591"><span class="section-number-3">1.5</span> Template for text read struct</h3>
<div id="outline-container-org749469d" class="outline-3">
<h3 id="org749469d"><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*
@ -698,8 +698,8 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
</div>
</div>
<div id="outline-container-org4675a4a" class="outline-3">
<h3 id="org4675a4a"><span class="section-number-3">1.6</span> Template for text flush struct</h3>
<div id="outline-container-org5e1b9b6" class="outline-3">
<h3 id="org5e1b9b6"><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>
@ -758,8 +758,8 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
</div>
</div>
<div id="outline-container-org7872582" class="outline-3">
<h3 id="org7872582"><span class="section-number-3">1.7</span> Template for text free memory</h3>
<div id="outline-container-orgc429d48" class="outline-3">
<h3 id="orgc429d48"><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.
@ -795,8 +795,8 @@ Memory is allocated when reading. The following function frees memory.
</div>
</div>
<div id="outline-container-orgb7977e3" class="outline-3">
<h3 id="orgb7977e3"><span class="section-number-3">1.8</span> Template for has/read/write the <code>$group_num$</code> attribute</h3>
<div id="outline-container-org342afc4" class="outline-3">
<h3 id="org342afc4"><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>
@ -858,8 +858,8 @@ Memory is allocated when reading. The following function frees memory.
</div>
</div>
<div id="outline-container-orge14f1a6" class="outline-3">
<h3 id="orge14f1a6"><span class="section-number-3">1.9</span> Template for has/read/write the <code>$group_dset$</code> dataset</h3>
<div id="outline-container-org5457534" class="outline-3">
<h3 id="org5457534"><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.
@ -956,12 +956,12 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
</div>
</div>
<div id="outline-container-orgba28ad7" class="outline-3">
<h3 id="orgba28ad7"><span class="section-number-3">1.10</span> RDM struct (hard-coded)</h3>
<div id="outline-container-orgd050afa" class="outline-3">
<h3 id="orgd050afa"><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-org49e9b52" class="outline-4">
<h4 id="org49e9b52"><span class="section-number-4">1.10.1</span> Read the complete struct</h4>
<div id="outline-container-org327082a" class="outline-4">
<h4 id="org327082a"><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>);
@ -1056,8 +1056,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
</div>
</div>
<div id="outline-container-org1060223" class="outline-4">
<h4 id="org1060223"><span class="section-number-4">1.10.2</span> Flush the complete struct</h4>
<div id="outline-container-org54d487a" class="outline-4">
<h4 id="org54d487a"><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>);
@ -1099,8 +1099,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
</div>
</div>
<div id="outline-container-org576d31d" class="outline-4">
<h4 id="org576d31d"><span class="section-number-4">1.10.3</span> Free memory</h4>
<div id="outline-container-orgfdf7283" class="outline-4">
<h4 id="orgfdf7283"><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.
@ -1136,8 +1136,8 @@ Memory is allocated when reading. The followig function frees memory.
</div>
</div>
<div id="outline-container-org51a8b69" class="outline-4">
<h4 id="org51a8b69"><span class="section-number-4">1.10.4</span> Read/Write the one<sub>e</sub> attribute</h4>
<div id="outline-container-org9541462" class="outline-4">
<h4 id="org9541462"><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.
@ -1203,8 +1203,8 @@ The <code>one_e</code> array is assumed allocated with the appropriate size.
</div>
</div>
<div id="outline-container-orgf8e3672" class="outline-4">
<h4 id="orgf8e3672"><span class="section-number-4">1.10.5</span> Read/Write the two<sub>e</sub> attribute</h4>
<div id="outline-container-org9069570" class="outline-4">
<h4 id="org9069570"><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
@ -1312,7 +1312,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-19 Wed 14:18</p>
<p class="date">Created: 2021-05-19 Wed 20:03</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>