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@20d551a70b 🚀
This commit is contained in:
parent
2218fbe113
commit
bd60673602
@ -3,7 +3,7 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- 2021-05-06 Thu 11:40 -->
|
<!-- 2021-05-06 Thu 16:09 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>TREXIO source code documentation</title>
|
<title>TREXIO source code documentation</title>
|
||||||
@ -341,7 +341,7 @@ and bug reports should be submitted at
|
|||||||
</div>
|
</div>
|
||||||
<div id="postamble" class="status">
|
<div id="postamble" class="status">
|
||||||
<p class="author">Author: TREX-CoE</p>
|
<p class="author">Author: TREX-CoE</p>
|
||||||
<p class="date">Created: 2021-05-06 Thu 11:40</p>
|
<p class="date">Created: 2021-05-06 Thu 16:09</p>
|
||||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- 2021-05-06 Thu 11:40 -->
|
<!-- 2021-05-06 Thu 16:09 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>TREXIO source code documentation</title>
|
<title>TREXIO source code documentation</title>
|
||||||
@ -341,7 +341,7 @@ and bug reports should be submitted at
|
|||||||
</div>
|
</div>
|
||||||
<div id="postamble" class="status">
|
<div id="postamble" class="status">
|
||||||
<p class="author">Author: TREX-CoE</p>
|
<p class="author">Author: TREX-CoE</p>
|
||||||
<p class="date">Created: 2021-05-06 Thu 11:40</p>
|
<p class="date">Created: 2021-05-06 Thu 16:09</p>
|
||||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- 2021-05-06 Thu 11:40 -->
|
<!-- 2021-05-06 Thu 16:09 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>Front end API</title>
|
<title>Front end API</title>
|
||||||
@ -311,45 +311,45 @@ for the JavaScript code in this tag.
|
|||||||
<h2>Table of Contents</h2>
|
<h2>Table of Contents</h2>
|
||||||
<div id="text-table-of-contents">
|
<div id="text-table-of-contents">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#orgad74340">1. Coding conventions</a>
|
<li><a href="#org8e18a60">1. Coding conventions</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org27bd8ba">1.1. Memory allocation</a></li>
|
<li><a href="#orgf3b535e">1.1. Memory allocation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#org9a79cff">2. Front end</a>
|
<li><a href="#org4667f04">2. Front end</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#orgb020fdb">2.1. Error handling</a></li>
|
<li><a href="#orgd8b4f52">2.1. Error handling</a></li>
|
||||||
<li><a href="#org7733d40">2.2. Back ends</a></li>
|
<li><a href="#org302d0f8">2.2. Back ends</a></li>
|
||||||
<li><a href="#orgc562bae">2.3. Read/write behavior</a></li>
|
<li><a href="#org497d5ec">2.3. Read/write behavior</a></li>
|
||||||
<li><a href="#org5595dcd">2.4. TREXIO file type</a></li>
|
<li><a href="#org0c0086a">2.4. TREXIO file type</a></li>
|
||||||
<li><a href="#orgc8da2c3">2.5. Polymorphism of the file handle</a></li>
|
<li><a href="#org5aa6793">2.5. Polymorphism of the file handle</a></li>
|
||||||
<li><a href="#org330ff0e">2.6. File opening</a></li>
|
<li><a href="#orgfd67c82">2.6. File opening</a></li>
|
||||||
<li><a href="#orgd7f5e2b">2.7. File closing</a></li>
|
<li><a href="#org577d346">2.7. File closing</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#org422242e">3. Templates for front end</a>
|
<li><a href="#org3e056e6">3. Templates for front end</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#orge4cf86d">3.1. Templates for front end has/read/write a dimension</a>
|
<li><a href="#org39ae1c7">3.1. Templates for front end has/read/write a dimension</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org1230d5b">3.1.1. C templates for front end</a></li>
|
<li><a href="#orgbed5135">3.1.1. C templates for front end</a></li>
|
||||||
<li><a href="#orgc907d1a">3.1.2. Fortran templates for front end</a></li>
|
<li><a href="#orgeb9dd51">3.1.2. Fortran templates for front end</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#orgcc7647f">3.2. Templates for front end has/read/write a dataset</a>
|
<li><a href="#orgf34149f">3.2. Templates for front end has/read/write a dataset</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org84abf16">3.2.1. C templates for front end</a></li>
|
<li><a href="#org0ccf02e">3.2.1. C templates for front end</a></li>
|
||||||
<li><a href="#org40cf81f">3.2.2. Fortran templates for front end</a></li>
|
<li><a href="#org2a19f3b">3.2.2. Fortran templates for front end</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#org5cbd51c">4. Fortran helper/wrapper functions</a></li>
|
<li><a href="#org36ce01a">4. Fortran helper/wrapper functions</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgad74340" class="outline-2">
|
<div id="outline-container-org8e18a60" class="outline-2">
|
||||||
<h2 id="orgad74340"><span class="section-number-2">1</span> Coding conventions</h2>
|
<h2 id="org8e18a60"><span class="section-number-2">1</span> Coding conventions</h2>
|
||||||
<div class="outline-text-2" id="text-1">
|
<div class="outline-text-2" id="text-1">
|
||||||
<ul class="org-ul">
|
<ul class="org-ul">
|
||||||
<li>integer types will be defined using types given in <code>stdint.h</code></li>
|
<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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org27bd8ba" class="outline-3">
|
<div id="outline-container-orgf3b535e" class="outline-3">
|
||||||
<h3 id="org27bd8ba"><span class="section-number-3">1.1</span> Memory allocation</h3>
|
<h3 id="orgf3b535e"><span class="section-number-3">1.1</span> Memory allocation</h3>
|
||||||
<div class="outline-text-3" id="text-1-1">
|
<div class="outline-text-3" id="text-1-1">
|
||||||
<p>
|
<p>
|
||||||
Memory allocation of structures can be facilitated by using the
|
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>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-org9a79cff" class="outline-2">
|
<div id="outline-container-org4667f04" class="outline-2">
|
||||||
<h2 id="org9a79cff"><span class="section-number-2">2</span> Front end</h2>
|
<h2 id="org4667f04"><span class="section-number-2">2</span> Front end</h2>
|
||||||
<div class="outline-text-2" id="text-2">
|
<div class="outline-text-2" id="text-2">
|
||||||
<p>
|
<p>
|
||||||
All calls to TREXIO are thread-safe.
|
All calls to TREXIO are thread-safe.
|
||||||
@ -408,10 +408,10 @@ TREXIO front end is modular, which simplifies impelementation of new back ends.
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgb020fdb" class="outline-3">
|
<div id="outline-container-orgd8b4f52" class="outline-3">
|
||||||
<h3 id="orgb020fdb"><span class="section-number-3">2.1</span> Error handling</h3>
|
<h3 id="orgd8b4f52"><span class="section-number-3">2.1</span> Error handling</h3>
|
||||||
<div class="outline-text-3" id="text-2-1">
|
<div class="outline-text-3" id="text-2-1">
|
||||||
<table id="orgf2c2e5e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
<table id="orga634e0e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||||
|
|
||||||
|
|
||||||
<colgroup>
|
<colgroup>
|
||||||
@ -512,6 +512,12 @@ TREXIO front end is modular, which simplifies impelementation of new back ends.
|
|||||||
<td class="org-right">12</td>
|
<td class="org-right">12</td>
|
||||||
<td class="org-left">'Invalid exit code'</td>
|
<td class="org-left">'Invalid exit code'</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="org-left"><code>TREXIO_NUM_ALREADY_EXISTS</code></td>
|
||||||
|
<td class="org-right">13</td>
|
||||||
|
<td class="org-left">'This variable already exists'</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -586,6 +592,9 @@ The text strings are extracted from the previous table.
|
|||||||
<span style="color: #a020f0;">case</span> TREXIO_INVALID_NUM:
|
<span style="color: #a020f0;">case</span> TREXIO_INVALID_NUM:
|
||||||
<span style="color: #a020f0;">return</span> <span style="color: #8b2252;">"Invalid exit code"</span>;
|
<span style="color: #a020f0;">return</span> <span style="color: #8b2252;">"Invalid exit code"</span>;
|
||||||
<span style="color: #a020f0;">break</span>;
|
<span style="color: #a020f0;">break</span>;
|
||||||
|
<span style="color: #a020f0;">case</span> TREXIO_NUM_ALREADY_EXISTS:
|
||||||
|
<span style="color: #a020f0;">return</span> <span style="color: #8b2252;">"This variable already exists"</span>;
|
||||||
|
<span style="color: #a020f0;">break</span>;
|
||||||
}
|
}
|
||||||
<span style="color: #a020f0;">return</span> <span style="color: #8b2252;">"Unknown error"</span>;
|
<span style="color: #a020f0;">return</span> <span style="color: #8b2252;">"Unknown error"</span>;
|
||||||
}
|
}
|
||||||
@ -612,8 +621,8 @@ The text strings are extracted from the previous table.
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org7733d40" class="outline-3">
|
<div id="outline-container-org302d0f8" class="outline-3">
|
||||||
<h3 id="org7733d40"><span class="section-number-3">2.2</span> Back ends</h3>
|
<h3 id="org302d0f8"><span class="section-number-3">2.2</span> Back ends</h3>
|
||||||
<div class="outline-text-3" id="text-2-2">
|
<div class="outline-text-3" id="text-2-2">
|
||||||
<p>
|
<p>
|
||||||
TREXIO has several back ends:
|
TREXIO has several back ends:
|
||||||
@ -643,8 +652,8 @@ lines that correspond to the <code>TREXIO_JSON</code> back end (not implemented
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-orgc562bae" class="outline-3">
|
<div id="outline-container-org497d5ec" class="outline-3">
|
||||||
<h3 id="orgc562bae"><span class="section-number-3">2.3</span> Read/write behavior</h3>
|
<h3 id="org497d5ec"><span class="section-number-3">2.3</span> Read/write behavior</h3>
|
||||||
<div class="outline-text-3" id="text-2-3">
|
<div class="outline-text-3" id="text-2-3">
|
||||||
<p>
|
<p>
|
||||||
Every time a reading function is called, the data is read from the
|
Every time a reading function is called, the data is read from the
|
||||||
@ -672,8 +681,8 @@ concurrent programs, the behavior is not specified.
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-org5595dcd" class="outline-3">
|
<div id="outline-container-org0c0086a" class="outline-3">
|
||||||
<h3 id="org5595dcd"><span class="section-number-3">2.4</span> TREXIO file type</h3>
|
<h3 id="org0c0086a"><span class="section-number-3">2.4</span> TREXIO file type</h3>
|
||||||
<div class="outline-text-3" id="text-2-4">
|
<div class="outline-text-3" id="text-2-4">
|
||||||
<p>
|
<p>
|
||||||
<code>trexio_s</code> is the the main type for TREXIO files, visible to the users
|
<code>trexio_s</code> is the the main type for TREXIO files, visible to the users
|
||||||
@ -705,8 +714,8 @@ TREXIO files will have as a first argument the TREXIO file handle.
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-orgc8da2c3" class="outline-3">
|
<div id="outline-container-org5aa6793" class="outline-3">
|
||||||
<h3 id="orgc8da2c3"><span class="section-number-3">2.5</span> Polymorphism of the file handle</h3>
|
<h3 id="org5aa6793"><span class="section-number-3">2.5</span> Polymorphism of the file handle</h3>
|
||||||
<div class="outline-text-3" id="text-2-5">
|
<div class="outline-text-3" id="text-2-5">
|
||||||
<p>
|
<p>
|
||||||
Polymorphism of the <code>trexio_t</code> type is handled by ensuring that the
|
Polymorphism of the <code>trexio_t</code> type is handled by ensuring that the
|
||||||
@ -725,8 +734,8 @@ corresponding types for all back ends can be safely casted to
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org330ff0e" class="outline-3">
|
<div id="outline-container-orgfd67c82" class="outline-3">
|
||||||
<h3 id="org330ff0e"><span class="section-number-3">2.6</span> File opening</h3>
|
<h3 id="orgfd67c82"><span class="section-number-3">2.6</span> File opening</h3>
|
||||||
<div class="outline-text-3" id="text-2-6">
|
<div class="outline-text-3" id="text-2-6">
|
||||||
<p>
|
<p>
|
||||||
<code>trexio_open</code> creates a new TREXIO file or opens existing one.
|
<code>trexio_open</code> creates a new TREXIO file or opens existing one.
|
||||||
@ -888,8 +897,8 @@ should tend to avoid renaming the <code>.txt</code> data files.
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgd7f5e2b" class="outline-3">
|
<div id="outline-container-org577d346" class="outline-3">
|
||||||
<h3 id="orgd7f5e2b"><span class="section-number-3">2.7</span> File closing</h3>
|
<h3 id="org577d346"><span class="section-number-3">2.7</span> File closing</h3>
|
||||||
<div class="outline-text-3" id="text-2-7">
|
<div class="outline-text-3" id="text-2-7">
|
||||||
<p>
|
<p>
|
||||||
<code>trexio_close</code> closes an existing <code>trexio_t</code> file.
|
<code>trexio_close</code> closes an existing <code>trexio_t</code> file.
|
||||||
@ -988,8 +997,8 @@ output:
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org422242e" class="outline-2">
|
<div id="outline-container-org3e056e6" class="outline-2">
|
||||||
<h2 id="org422242e"><span class="section-number-2">3</span> Templates for front end</h2>
|
<h2 id="org3e056e6"><span class="section-number-2">3</span> Templates for front end</h2>
|
||||||
<div class="outline-text-2" id="text-3">
|
<div class="outline-text-2" id="text-3">
|
||||||
<p>
|
<p>
|
||||||
Consider the following block of <code>trex.json</code>:
|
Consider the following block of <code>trex.json</code>:
|
||||||
@ -1150,8 +1159,8 @@ TREXIO supports I/O with single or double precision for integer and floating poi
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="outline-container-orge4cf86d" class="outline-3">
|
<div id="outline-container-org39ae1c7" class="outline-3">
|
||||||
<h3 id="orge4cf86d"><span class="section-number-3">3.1</span> Templates for front end has/read/write a dimension</h3>
|
<h3 id="org39ae1c7"><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">
|
<div class="outline-text-3" id="text-3-1">
|
||||||
<p>
|
<p>
|
||||||
This section concerns API calls related to dimensioning variables.
|
This section concerns API calls related to dimensioning variables.
|
||||||
@ -1220,8 +1229,8 @@ This section concerns API calls related to dimensioning variables.
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org1230d5b" class="outline-4">
|
<div id="outline-container-orgbed5135" class="outline-4">
|
||||||
<h4 id="org1230d5b"><span class="section-number-4">3.1.1</span> C templates for front end</h4>
|
<h4 id="orgbed5135"><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">
|
<div class="outline-text-4" id="text-3-1-1">
|
||||||
<p>
|
<p>
|
||||||
The <code>C</code> templates that correspond to each of the abovementioned functions can be found below.
|
The <code>C</code> templates that correspond to each of the abovementioned functions can be found below.
|
||||||
@ -1410,8 +1419,8 @@ The basic (non-suffixed) API call on dimensioning variables deals with single pr
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgc907d1a" class="outline-4">
|
<div id="outline-container-orgeb9dd51" class="outline-4">
|
||||||
<h4 id="orgc907d1a"><span class="section-number-4">3.1.2</span> Fortran templates for front end</h4>
|
<h4 id="orgeb9dd51"><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">
|
<div class="outline-text-4" id="text-3-1-2">
|
||||||
<p>
|
<p>
|
||||||
The <code>Fortran</code> templates that provide an access to the <code>C</code> API calls from Fortran.
|
The <code>Fortran</code> templates that provide an access to the <code>C</code> API calls from Fortran.
|
||||||
@ -1498,8 +1507,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="outline-container-orgcc7647f" class="outline-3">
|
<div id="outline-container-orgf34149f" class="outline-3">
|
||||||
<h3 id="orgcc7647f"><span class="section-number-3">3.2</span> Templates for front end has/read/write a dataset</h3>
|
<h3 id="orgf34149f"><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">
|
<div class="outline-text-3" id="text-3-2">
|
||||||
<p>
|
<p>
|
||||||
This section concerns API calls related to datasets.
|
This section concerns API calls related to datasets.
|
||||||
@ -1568,8 +1577,8 @@ This section concerns API calls related to datasets.
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org84abf16" class="outline-4">
|
<div id="outline-container-org0ccf02e" class="outline-4">
|
||||||
<h4 id="org84abf16"><span class="section-number-4">3.2.1</span> C templates for front end</h4>
|
<h4 id="org0ccf02e"><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">
|
<div class="outline-text-4" id="text-3-2-1">
|
||||||
<p>
|
<p>
|
||||||
The C templates that correspond to each of the abovementioned functions can be found below.
|
The C templates that correspond to each of the abovementioned functions can be found below.
|
||||||
@ -1827,8 +1836,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org40cf81f" class="outline-4">
|
<div id="outline-container-org2a19f3b" class="outline-4">
|
||||||
<h4 id="org40cf81f"><span class="section-number-4">3.2.2</span> Fortran templates for front end</h4>
|
<h4 id="org2a19f3b"><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">
|
<div class="outline-text-4" id="text-3-2-2">
|
||||||
<p>
|
<p>
|
||||||
The <code>Fortran</code> templates that provide an access to the <code>C</code> API calls from <code>Fortran</code>.
|
The <code>Fortran</code> templates that provide an access to the <code>C</code> API calls from <code>Fortran</code>.
|
||||||
@ -1915,8 +1924,8 @@ These templates are based on the use of <code>iso_c_binding</code>. Pointers hav
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org5cbd51c" class="outline-2">
|
<div id="outline-container-org36ce01a" class="outline-2">
|
||||||
<h2 id="org5cbd51c"><span class="section-number-2">4</span> Fortran helper/wrapper functions</h2>
|
<h2 id="org36ce01a"><span class="section-number-2">4</span> Fortran helper/wrapper functions</h2>
|
||||||
<div class="outline-text-2" id="text-4">
|
<div class="outline-text-2" id="text-4">
|
||||||
<p>
|
<p>
|
||||||
The function below adapts the original C-based <code>trexio_open</code> for Fortran.
|
The function below adapts the original C-based <code>trexio_open</code> for Fortran.
|
||||||
@ -1945,7 +1954,7 @@ Note, that Fortran interface calls the main <code>TREXIO</code> API, which is wr
|
|||||||
</div>
|
</div>
|
||||||
<div id="postamble" class="status">
|
<div id="postamble" class="status">
|
||||||
<p class="author">Author: TREX-CoE</p>
|
<p class="author">Author: TREX-CoE</p>
|
||||||
<p class="date">Created: 2021-05-06 Thu 11:40</p>
|
<p class="date">Created: 2021-05-06 Thu 16:09</p>
|
||||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- 2021-05-06 Thu 11:40 -->
|
<!-- 2021-05-06 Thu 16:09 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>HDF5 back end</title>
|
<title>HDF5 back end</title>
|
||||||
@ -311,25 +311,25 @@ for the JavaScript code in this tag.
|
|||||||
<h2>Table of Contents</h2>
|
<h2>Table of Contents</h2>
|
||||||
<div id="text-table-of-contents">
|
<div id="text-table-of-contents">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org1d4b0d0">1. HDF5 back end</a>
|
<li><a href="#org6262305">1. HDF5 back end</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org8fb8fb4">1.1. Template for HDF5 definitions</a></li>
|
<li><a href="#org07793d4">1.1. Template for HDF5 definitions</a></li>
|
||||||
<li><a href="#orgf649511">1.2. Template for HDF5 structures</a></li>
|
<li><a href="#org11b0ec3">1.2. Template for HDF5 structures</a></li>
|
||||||
<li><a href="#orgd0c9ae5">1.3. Template for HDF5 init/deinit</a></li>
|
<li><a href="#orgb192786">1.3. Template for HDF5 init/deinit</a></li>
|
||||||
<li><a href="#orgb7b9c66">1.4. Template for HDF5 has/read/write a number</a></li>
|
<li><a href="#org80c8bf4">1.4. Template for HDF5 has/read/write a number</a></li>
|
||||||
<li><a href="#org5296f23">1.5. Template for HDF5 has/read/write a dataset</a></li>
|
<li><a href="#org992ea72">1.5. Template for HDF5 has/read/write a dataset</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org1d4b0d0" class="outline-2">
|
<div id="outline-container-org6262305" class="outline-2">
|
||||||
<h2 id="org1d4b0d0"><span class="section-number-2">1</span> HDF5 back end</h2>
|
<h2 id="org6262305"><span class="section-number-2">1</span> HDF5 back end</h2>
|
||||||
<div class="outline-text-2" id="text-1">
|
<div class="outline-text-2" id="text-1">
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-org8fb8fb4" class="outline-3">
|
<div id="outline-container-org07793d4" class="outline-3">
|
||||||
<h3 id="org8fb8fb4"><span class="section-number-3">1.1</span> Template for HDF5 definitions</h3>
|
<h3 id="org07793d4"><span class="section-number-3">1.1</span> Template for HDF5 definitions</h3>
|
||||||
<div class="outline-text-3" id="text-1-1">
|
<div class="outline-text-3" id="text-1-1">
|
||||||
<div class="org-src-container">
|
<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>
|
<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>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgf649511" class="outline-3">
|
<div id="outline-container-org11b0ec3" class="outline-3">
|
||||||
<h3 id="orgf649511"><span class="section-number-3">1.2</span> Template for HDF5 structures</h3>
|
<h3 id="org11b0ec3"><span class="section-number-3">1.2</span> Template for HDF5 structures</h3>
|
||||||
<div class="outline-text-3" id="text-1-2">
|
<div class="outline-text-3" id="text-1-2">
|
||||||
<div class="org-src-container">
|
<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> {
|
<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>
|
||||||
|
|
||||||
|
|
||||||
<div id="outline-container-orgd0c9ae5" class="outline-3">
|
<div id="outline-container-orgb192786" class="outline-3">
|
||||||
<h3 id="orgd0c9ae5"><span class="section-number-3">1.3</span> Template for HDF5 init/deinit</h3>
|
<h3 id="orgb192786"><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="outline-text-3" id="text-1-3">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
<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>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgb7b9c66" class="outline-3">
|
<div id="outline-container-org80c8bf4" class="outline-3">
|
||||||
<h3 id="orgb7b9c66"><span class="section-number-3">1.4</span> Template for HDF5 has/read/write a number</h3>
|
<h3 id="org80c8bf4"><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="outline-text-3" id="text-1-4">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||||
@ -515,9 +515,8 @@ for the JavaScript code in this tag.
|
|||||||
<span style="color: #a020f0;">if</span> (infile_num != num) {
|
<span style="color: #a020f0;">if</span> (infile_num != num) {
|
||||||
|
|
||||||
<span style="color: #a020f0;">if</span> (infile_num != 0) {
|
<span style="color: #a020f0;">if</span> (infile_num != 0) {
|
||||||
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_NUM_ALREADY_EXISTS;
|
||||||
<span style="color: #a020f0;">return</span> TREXIO_FAILURE;
|
|
||||||
|
|
||||||
} <span style="color: #a020f0;">else</span> {
|
} <span style="color: #a020f0;">else</span> {
|
||||||
|
|
||||||
@ -564,8 +563,8 @@ for the JavaScript code in this tag.
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org5296f23" class="outline-3">
|
<div id="outline-container-org992ea72" class="outline-3">
|
||||||
<h3 id="org5296f23"><span class="section-number-3">1.5</span> Template for HDF5 has/read/write a dataset</h3>
|
<h3 id="org992ea72"><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="outline-text-3" id="text-1-5">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
||||||
@ -699,7 +698,7 @@ for the JavaScript code in this tag.
|
|||||||
</div>
|
</div>
|
||||||
<div id="postamble" class="status">
|
<div id="postamble" class="status">
|
||||||
<p class="author">Author: TREX-CoE</p>
|
<p class="author">Author: TREX-CoE</p>
|
||||||
<p class="date">Created: 2021-05-06 Thu 11:40</p>
|
<p class="date">Created: 2021-05-06 Thu 16:09</p>
|
||||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- 2021-05-06 Thu 11:40 -->
|
<!-- 2021-05-06 Thu 16:09 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>TEXT back end</title>
|
<title>TEXT back end</title>
|
||||||
@ -311,24 +311,24 @@ for the JavaScript code in this tag.
|
|||||||
<h2>Table of Contents</h2>
|
<h2>Table of Contents</h2>
|
||||||
<div id="text-table-of-contents">
|
<div id="text-table-of-contents">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#orgfe6a377">1. TEXT back end</a>
|
<li><a href="#org160da65">1. TEXT back end</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org383889c">1.1. Template for group-related structures in text back end</a></li>
|
<li><a href="#org71d8c40">1.1. Template for group-related structures in text back end</a></li>
|
||||||
<li><a href="#org123c6e2">1.2. Template for general structure in text back end</a></li>
|
<li><a href="#org4d9f9dc">1.2. Template for general structure in text back end</a></li>
|
||||||
<li><a href="#org95ca1b2">1.3. Initialize function (constant part)</a></li>
|
<li><a href="#org8954080">1.3. Initialize function (constant part)</a></li>
|
||||||
<li><a href="#org6492e9f">1.4. Deinitialize function (templated part)</a></li>
|
<li><a href="#org8fbeb2e">1.4. Deinitialize function (templated part)</a></li>
|
||||||
<li><a href="#orgdf1c700">1.5. Template for text read struct</a></li>
|
<li><a href="#org082e290">1.5. Template for text read struct</a></li>
|
||||||
<li><a href="#orgcc930a8">1.6. Template for text flush struct</a></li>
|
<li><a href="#org1b7b737">1.6. Template for text flush struct</a></li>
|
||||||
<li><a href="#org8fce63e">1.7. Template for text free memory</a></li>
|
<li><a href="#org17f8aba">1.7. Template for text free memory</a></li>
|
||||||
<li><a href="#org0c22155">1.8. Template for has/read/write the <code>$group_num$</code> attribute</a></li>
|
<li><a href="#org4d176d6">1.8. Template for has/read/write the <code>$group_num$</code> attribute</a></li>
|
||||||
<li><a href="#org0dd6338">1.9. Template for has/read/write the <code>$group_dset$</code> dataset</a></li>
|
<li><a href="#org67bfd92">1.9. Template for has/read/write the <code>$group_dset$</code> dataset</a></li>
|
||||||
<li><a href="#org9a9c2f7">1.10. RDM struct (hard-coded)</a>
|
<li><a href="#orgc7a263f">1.10. RDM struct (hard-coded)</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org46fd354">1.10.1. Read the complete struct</a></li>
|
<li><a href="#orgfeefc63">1.10.1. Read the complete struct</a></li>
|
||||||
<li><a href="#orgec0e7c0">1.10.2. Flush the complete struct</a></li>
|
<li><a href="#orgada1d1c">1.10.2. Flush the complete struct</a></li>
|
||||||
<li><a href="#org5200dbb">1.10.3. Free memory</a></li>
|
<li><a href="#org345475b">1.10.3. Free memory</a></li>
|
||||||
<li><a href="#org9a3bd5b">1.10.4. Read/Write the one<sub>e</sub> attribute</a></li>
|
<li><a href="#org4adf1ad">1.10.4. Read/Write the one<sub>e</sub> attribute</a></li>
|
||||||
<li><a href="#org61969e3">1.10.5. Read/Write the two<sub>e</sub> attribute</a></li>
|
<li><a href="#orgf59c378">1.10.5. Read/Write the two<sub>e</sub> attribute</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -337,8 +337,8 @@ for the JavaScript code in this tag.
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgfe6a377" class="outline-2">
|
<div id="outline-container-org160da65" class="outline-2">
|
||||||
<h2 id="orgfe6a377"><span class="section-number-2">1</span> TEXT back end</h2>
|
<h2 id="org160da65"><span class="section-number-2">1</span> TEXT back end</h2>
|
||||||
<div class="outline-text-2" id="text-1">
|
<div class="outline-text-2" id="text-1">
|
||||||
<p>
|
<p>
|
||||||
The "file" produced by the text back end is a directory with one
|
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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org383889c" class="outline-3">
|
<div id="outline-container-org71d8c40" class="outline-3">
|
||||||
<h3 id="org383889c"><span class="section-number-3">1.1</span> Template for group-related structures in text back end</h3>
|
<h3 id="org71d8c40"><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="outline-text-3" id="text-1-1">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-c"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> $group$_s {
|
<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>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org123c6e2" class="outline-3">
|
<div id="outline-container-org4d9f9dc" class="outline-3">
|
||||||
<h3 id="org123c6e2"><span class="section-number-3">1.2</span> Template for general structure in text back end</h3>
|
<h3 id="org4d9f9dc"><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="outline-text-3" id="text-1-2">
|
||||||
<div class="org-src-container">
|
<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> {
|
<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>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org95ca1b2" class="outline-3">
|
<div id="outline-container-org8954080" class="outline-3">
|
||||||
<h3 id="org95ca1b2"><span class="section-number-3">1.3</span> Initialize function (constant part)</h3>
|
<h3 id="org8954080"><span class="section-number-3">1.3</span> Initialize function (constant part)</h3>
|
||||||
<div class="outline-text-3" id="text-1-3">
|
<div class="outline-text-3" id="text-1-3">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
<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>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org6492e9f" class="outline-3">
|
<div id="outline-container-org8fbeb2e" class="outline-3">
|
||||||
<h3 id="org6492e9f"><span class="section-number-3">1.4</span> Deinitialize function (templated part)</h3>
|
<h3 id="org8fbeb2e"><span class="section-number-3">1.4</span> Deinitialize function (templated part)</h3>
|
||||||
<div class="outline-text-3" id="text-1-4">
|
<div class="outline-text-3" id="text-1-4">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
<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>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgdf1c700" class="outline-3">
|
<div id="outline-container-org082e290" class="outline-3">
|
||||||
<h3 id="orgdf1c700"><span class="section-number-3">1.5</span> Template for text read struct</h3>
|
<h3 id="org082e290"><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="outline-text-3" id="text-1-5">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-c">$group$_t*
|
<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>;
|
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = fscanf(f, <span style="color: #8b2252;">"%lu\n"</span>, &($group$->dims_$group_dset$[i]));
|
rc = fscanf(f, <span style="color: #8b2252;">"%"</span> SCNu64 <span style="color: #8b2252;">"\n"</span>, &($group$->dims_$group_dset$[i]));
|
||||||
assert(!(rc != 1));
|
assert(!(rc != 1));
|
||||||
<span style="color: #a020f0;">if</span> (rc != 1) {
|
<span style="color: #a020f0;">if</span> (rc != 1) {
|
||||||
FREE(buffer);
|
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>;
|
<span style="color: #a020f0;">return</span> <span style="color: #008b8b;">NULL</span>;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = fscanf(f, <span style="color: #8b2252;">"%lu"</span>, &($group$->$group_num$));
|
rc = fscanf(f, <span style="color: #8b2252;">"%"</span> SCNu64 <span style="color: #8b2252;">""</span>, &($group$->$group_num$));
|
||||||
assert(!(rc != 1));
|
assert(!(rc != 1));
|
||||||
<span style="color: #a020f0;">if</span> (rc != 1) {
|
<span style="color: #a020f0;">if</span> (rc != 1) {
|
||||||
FREE(buffer);
|
FREE(buffer);
|
||||||
@ -734,8 +734,8 @@ trexio_text_read_$group$ (<span style="color: #228b22;">trexio_text_t</span>* <s
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgcc930a8" class="outline-3">
|
<div id="outline-container-org1b7b737" class="outline-3">
|
||||||
<h3 id="orgcc930a8"><span class="section-number-3">1.6</span> Template for text flush struct</h3>
|
<h3 id="org1b7b737"><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="outline-text-3" id="text-1-6">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
<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;">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){
|
<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 %lu\n"</span>, i, $group$->dims_$group_dset$[i]);
|
fprintf(f, <span style="color: #8b2252;">"dims_$group_dset$ %u %"</span> PRIu64 <span style="color: #8b2252;">"\n"</span>, i, $group$->dims_$group_dset$[i]);
|
||||||
size_$group_dset$ *= $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;">END REPEAT GROUP_DSET</span>
|
||||||
|
|
||||||
// <span style="color: #b22222;">START REPEAT GROUP_NUM</span>
|
// <span style="color: #b22222;">START REPEAT GROUP_NUM</span>
|
||||||
fprintf(f, <span style="color: #8b2252;">"$group_num$ %lu\n"</span>, $group$->$group_num$);
|
fprintf(f, <span style="color: #8b2252;">"$group_num$ %"</span> PRIu64 <span style="color: #8b2252;">"\n"</span>, $group$->$group_num$);
|
||||||
// <span style="color: #b22222;">END REPEAT GROUP_NUM</span>
|
// <span style="color: #b22222;">END REPEAT GROUP_NUM</span>
|
||||||
|
|
||||||
/* <span style="color: #b22222;">Write arrays </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>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org8fce63e" class="outline-3">
|
<div id="outline-container-org17f8aba" class="outline-3">
|
||||||
<h3 id="org8fce63e"><span class="section-number-3">1.7</span> Template for text free memory</h3>
|
<h3 id="org17f8aba"><span class="section-number-3">1.7</span> Template for text free memory</h3>
|
||||||
<div class="outline-text-3" id="text-1-7">
|
<div class="outline-text-3" id="text-1-7">
|
||||||
<p>
|
<p>
|
||||||
Memory is allocated when reading. The following function frees memory.
|
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>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org0c22155" class="outline-3">
|
<div id="outline-container-org4d176d6" class="outline-3">
|
||||||
<h3 id="org0c22155"><span class="section-number-3">1.8</span> Template for has/read/write the <code>$group_num$</code> attribute</h3>
|
<h3 id="org4d176d6"><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="outline-text-3" id="text-1-8">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-c"><span style="color: #228b22;">trexio_exit_code</span>
|
<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>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org0dd6338" class="outline-3">
|
<div id="outline-container-org67bfd92" class="outline-3">
|
||||||
<h3 id="org0dd6338"><span class="section-number-3">1.9</span> Template for has/read/write the <code>$group_dset$</code> dataset</h3>
|
<h3 id="org67bfd92"><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">
|
<div class="outline-text-3" id="text-1-9">
|
||||||
<p>
|
<p>
|
||||||
The <code>group_dset</code> array is assumed allocated with the appropriate size.
|
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>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org9a9c2f7" class="outline-3">
|
<div id="outline-container-orgc7a263f" class="outline-3">
|
||||||
<h3 id="org9a9c2f7"><span class="section-number-3">1.10</span> RDM struct (hard-coded)</h3>
|
<h3 id="orgc7a263f"><span class="section-number-3">1.10</span> RDM struct (hard-coded)</h3>
|
||||||
<div class="outline-text-3" id="text-1-10">
|
<div class="outline-text-3" id="text-1-10">
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-org46fd354" class="outline-4">
|
<div id="outline-container-orgfeefc63" class="outline-4">
|
||||||
<h4 id="org46fd354"><span class="section-number-4">1.10.1</span> Read the complete struct</h4>
|
<h4 id="orgfeefc63"><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="outline-text-4" id="text-1-10-1">
|
||||||
<div class="org-src-container">
|
<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>);
|
<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>);
|
||||||
@ -1055,7 +1055,7 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
|||||||
assert (rc == 1);
|
assert (rc == 1);
|
||||||
assert (strcmp(buffer, <span style="color: #8b2252;">"dim_one_e"</span>) == 0);
|
assert (strcmp(buffer, <span style="color: #8b2252;">"dim_one_e"</span>) == 0);
|
||||||
|
|
||||||
rc = fscanf(f, <span style="color: #8b2252;">"%lu"</span>, &(rdm->dim_one_e));
|
rc = fscanf(f, <span style="color: #8b2252;">"%"</span> SCNu64 <span style="color: #8b2252;">""</span>, &(rdm->dim_one_e));
|
||||||
assert (rc == 1);
|
assert (rc == 1);
|
||||||
|
|
||||||
/* <span style="color: #b22222;">Allocate arrays </span>*/
|
/* <span style="color: #b22222;">Allocate arrays </span>*/
|
||||||
@ -1109,8 +1109,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgec0e7c0" class="outline-4">
|
<div id="outline-container-orgada1d1c" class="outline-4">
|
||||||
<h4 id="orgec0e7c0"><span class="section-number-4">1.10.2</span> Flush the complete struct</h4>
|
<h4 id="orgada1d1c"><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="outline-text-4" id="text-1-10-2">
|
||||||
<div class="org-src-container">
|
<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>);
|
<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>);
|
||||||
@ -1133,7 +1133,7 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
|||||||
fseek(f, 0L, SEEK_SET);
|
fseek(f, 0L, SEEK_SET);
|
||||||
|
|
||||||
/* <span style="color: #b22222;">Write the dimensioning variables </span>*/
|
/* <span style="color: #b22222;">Write the dimensioning variables </span>*/
|
||||||
fprintf(f, <span style="color: #8b2252;">"num %lu\n"</span>, rdm->dim_one_e);
|
fprintf(f, <span style="color: #8b2252;">"num %"</span> PRIu64 <span style="color: #8b2252;">"\n"</span>, rdm->dim_one_e);
|
||||||
|
|
||||||
/* <span style="color: #b22222;">Write arrays </span>*/
|
/* <span style="color: #b22222;">Write arrays </span>*/
|
||||||
fprintf(f, <span style="color: #8b2252;">"one_e\n"</span>);
|
fprintf(f, <span style="color: #8b2252;">"one_e\n"</span>);
|
||||||
@ -1153,8 +1153,8 @@ The <code>group_dset</code> array is assumed allocated with the appropriate size
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org5200dbb" class="outline-4">
|
<div id="outline-container-org345475b" class="outline-4">
|
||||||
<h4 id="org5200dbb"><span class="section-number-4">1.10.3</span> Free memory</h4>
|
<h4 id="org345475b"><span class="section-number-4">1.10.3</span> Free memory</h4>
|
||||||
<div class="outline-text-4" id="text-1-10-3">
|
<div class="outline-text-4" id="text-1-10-3">
|
||||||
<p>
|
<p>
|
||||||
Memory is allocated when reading. The followig function frees memory.
|
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>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org9a3bd5b" class="outline-4">
|
<div id="outline-container-org4adf1ad" class="outline-4">
|
||||||
<h4 id="org9a3bd5b"><span class="section-number-4">1.10.4</span> Read/Write the one<sub>e</sub> attribute</h4>
|
<h4 id="org4adf1ad"><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">
|
<div class="outline-text-4" id="text-1-10-4">
|
||||||
<p>
|
<p>
|
||||||
The <code>one_e</code> array is assumed allocated with the appropriate size.
|
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>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org61969e3" class="outline-4">
|
<div id="outline-container-orgf59c378" class="outline-4">
|
||||||
<h4 id="org61969e3"><span class="section-number-4">1.10.5</span> Read/Write the two<sub>e</sub> attribute</h4>
|
<h4 id="orgf59c378"><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">
|
<div class="outline-text-4" id="text-1-10-5">
|
||||||
<p>
|
<p>
|
||||||
<code>two_e</code> is a sparse data structure, which can be too large to fit
|
<code>two_e</code> is a sparse data structure, which can be too large to fit
|
||||||
@ -1375,7 +1375,7 @@ file for each sparse float structure.
|
|||||||
</div>
|
</div>
|
||||||
<div id="postamble" class="status">
|
<div id="postamble" class="status">
|
||||||
<p class="author">Author: TREX-CoE</p>
|
<p class="author">Author: TREX-CoE</p>
|
||||||
<p class="date">Created: 2021-05-06 Thu 11:40</p>
|
<p class="date">Created: 2021-05-06 Thu 16:09</p>
|
||||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user