Skip to content

Commit 33d8e68

Browse files
authored
Update documentation for v0.21.0 (#1229)
1 parent 28bbfb6 commit 33d8e68

File tree

7 files changed

+62
-151
lines changed

7 files changed

+62
-151
lines changed

Diff for: docs/_sources/getting_started/getting_started.rst.txt

+4
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ we won't discuss them now in detail. In brief:
338338
- In order to use the :math:`(i,j,k)` syntax we need to define the symbols to point to the respective dimensions.
339339
- A common pattern is to use the preprocessor flag ``__CUDACC__`` to distinguish between CPU and GPU code. We use this to set the :term:`Backend`.
340340

341+
The code example can be compiled using the following simple CMake script (requires an installation of GridTools, see :ref:`installation`).
342+
343+
.. literalinclude:: code/CMakeLists.txt
344+
341345
-------------------------------------
342346
Assembling Stencils: Smoothing Filter
343347
-------------------------------------

Diff for: docs/_sources/introduction/introduction.rst.txt

+20-17
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
.. _introduction:
44

5-
=====================
5+
============
66
Introduction
7-
=====================
7+
============
88

9-
-----------------------------
9+
-----------------
1010
What Is GridTools
11-
-----------------------------
11+
-----------------
1212

1313
The |GT| (GT) framework is a set of libraries and utilities to develop performance portable applications in which
1414
stencil operations on grids are central. The focus of the project is on regular and block-structured grids as are
@@ -46,9 +46,9 @@ abstract descriptions of a stencils, the DSL allows |GT| can apply architecture-
4646
computations in order to be optimal on the target hardware.
4747

4848

49-
^^^^^^^^^^^^^^^^^^^^^^^^^^^
49+
^^^^^^^^^^^^
5050
Dependencies
51-
^^^^^^^^^^^^^^^^^^^^^^^^^^^
51+
^^^^^^^^^^^^
5252

5353
|GT| requires at least a header-only installation of Boost_. Besides some boost utilities, it depends on ``boost::mpl`` and ``boost::fusion``.
5454

@@ -57,11 +57,18 @@ Additionally, |GT| requires a recent version of CMake_.
5757
.. _Boost: https://www.boost.org/
5858
.. _CMake: https://www.cmake.org/
5959

60-
|GT| requires a modern compiler. A list of supported compilers can be found on `github <https://github.com/eth-cscs/gridtools/wiki/Supported-Compilers>`_.
60+
|GT| requires a modern compiler. A list of supported compilers can be found on `github <https://github.com/GridTools/gridtools>`_.
6161

62-
^^^^^^^^^^^^^^^^^^^^
62+
63+
.. _installation:
64+
65+
--------------------
66+
Installation and Use
67+
--------------------
68+
69+
^^^^^^^^^^^^^
6370
Simple Script
64-
^^^^^^^^^^^^^^^^^^^^
71+
^^^^^^^^^^^^^
6572

6673
We first provide a sample of the commands needed to enable the multicore and CUDA backends, install them in ``/usr/local``,
6774
and run the gridtools tests.
@@ -75,10 +82,6 @@ and run the gridtools tests.
7582
make install -j4
7683
make test
7784
78-
-----------------------------
79-
Installation and Use
80-
-----------------------------
81-
8285
|GT| uses CMake as building system. The installation can be configured using `ccmake`. The following variables control the back-ends that will be supported by the runtime components of the installation, namely :ref:`GCL <halo-exchanges>`.
8386

8487
.. code-block:: shell
@@ -130,9 +133,9 @@ the following set of instructions:
130133
make -j4
131134
132135
133-
^^^^^^^^^^^^^^^^^^^^^
136+
^^^^^^^^^^^^^^^
134137
Using GridTools
135-
^^^^^^^^^^^^^^^^^^^^^
138+
^^^^^^^^^^^^^^^
136139

137140
Using |GT| follows standard CMake practices. To indicate where the |GT| can be found,
138141
CMake should be provided with the variable ``GridTools_DIR``,
@@ -156,8 +159,8 @@ Targets that need |GT| should link against ``GridTools::gridtools``. If the comm
156159
add_library(my_library source.cpp)
157160
target_link_libraries(my_library PUBLIC GridTools::gridtools)
158161
159-
-----------------------------
162+
------------
160163
Contributing
161-
-----------------------------
164+
------------
162165

163166
Contributions to the |GT| set of libraries are welcome. However, our policy is that we will be the official maintainers and providers of the GridTools code. We believe that this will provide our users with a clear reference point for support and guarantees on timely interactions. For this reason, we require that external contributions to |GT| will be accepted after their authors provide to us a signed copy of a copyright release form to ETH Zurich.

Diff for: docs/getting_started/getting_started.html

+11
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,17 @@ <h3>Full GridTools Laplacian<a class="headerlink" href="#full-gridtools-laplacia
676676
<li>In order to use the <span class="math">\((i,j,k)\)</span> syntax we need to define the symbols to point to the respective dimensions.</li>
677677
<li>A common pattern is to use the preprocessor flag <code class="docutils literal"><span class="pre">__CUDACC__</span></code> to distinguish between CPU and GPU code. We use this to set the <a class="reference internal" href="../glossary/glossary.html#term-backend"><span class="xref std std-term">Backend</span></a>.</li>
678678
</ul>
679+
<p>The code example can be compiled using the following simple CMake script (requires an installation of GridTools, see <a class="reference internal" href="../introduction/introduction.html#installation"><span class="std std-ref">Installation and Use</span></a>).</p>
680+
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cmake_minimum_required</span><span class="p">(</span><span class="n">VERSION</span> <span class="mf">3.12</span><span class="o">.</span><span class="mi">4</span><span class="p">)</span>
681+
682+
<span class="n">project</span><span class="p">(</span><span class="n">GridTools</span><span class="o">-</span><span class="n">laplacian</span> <span class="n">LANGUAGES</span> <span class="n">CXX</span><span class="p">)</span>
683+
684+
<span class="n">find_package</span><span class="p">(</span><span class="n">GridTools</span> <span class="mf">0.21</span><span class="o">.</span><span class="mi">0</span> <span class="n">REQUIRED</span><span class="p">)</span>
685+
686+
<span class="n">add_executable</span><span class="p">(</span><span class="n">gt_laplacian</span> <span class="n">test_gt_laplacian</span><span class="o">.</span><span class="n">cpp</span><span class="p">)</span>
687+
<span class="n">target_link_libraries</span><span class="p">(</span><span class="n">gt_laplacian</span> <span class="n">GridTools</span><span class="p">::</span><span class="n">gridtools</span><span class="p">)</span>
688+
</pre></div>
689+
</div>
679690
</div>
680691
</div>
681692
<div class="section" id="assembling-stencils-smoothing-filter">

Diff for: docs/introduction/introduction.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@
9999
<li class="toctree-l1 current"><a class="current reference internal" href="#">Introduction</a><ul>
100100
<li class="toctree-l2"><a class="reference internal" href="#what-is-gridtools">What Is GridTools</a><ul>
101101
<li class="toctree-l3"><a class="reference internal" href="#dependencies">Dependencies</a></li>
102-
<li class="toctree-l3"><a class="reference internal" href="#simple-script">Simple Script</a></li>
103102
</ul>
104103
</li>
105104
<li class="toctree-l2"><a class="reference internal" href="#installation-and-use">Installation and Use</a><ul>
105+
<li class="toctree-l3"><a class="reference internal" href="#simple-script">Simple Script</a></li>
106106
<li class="toctree-l3"><a class="reference internal" href="#using-gridtools">Using GridTools</a></li>
107107
</ul>
108108
</li>
@@ -216,8 +216,11 @@ <h2>What Is GridTools<a class="headerlink" href="#what-is-gridtools" title="Perm
216216
<h3>Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this headline"></a></h3>
217217
<p><cite>GridTools</cite> requires at least a header-only installation of <a class="reference external" href="https://www.boost.org/">Boost</a>. Besides some boost utilities, it depends on <code class="docutils literal"><span class="pre">boost::mpl</span></code> and <code class="docutils literal"><span class="pre">boost::fusion</span></code>.</p>
218218
<p>Additionally, <cite>GridTools</cite> requires a recent version of <a class="reference external" href="https://www.cmake.org/">CMake</a>.</p>
219-
<p><cite>GridTools</cite> requires a modern compiler. A list of supported compilers can be found on <a class="reference external" href="https://github.com/eth-cscs/gridtools/wiki/Supported-Compilers">github</a>.</p>
219+
<p><cite>GridTools</cite> requires a modern compiler. A list of supported compilers can be found on <a class="reference external" href="https://github.com/GridTools/gridtools">github</a>.</p>
220220
</div>
221+
</div>
222+
<div class="section" id="installation-and-use">
223+
<span id="installation"></span><h2>Installation and Use<a class="headerlink" href="#installation-and-use" title="Permalink to this headline"></a></h2>
221224
<div class="section" id="simple-script">
222225
<h3>Simple Script<a class="headerlink" href="#simple-script" title="Permalink to this headline"></a></h3>
223226
<p>We first provide a sample of the commands needed to enable the multicore and CUDA backends, install them in <code class="docutils literal"><span class="pre">/usr/local</span></code>,
@@ -230,10 +233,6 @@ <h3>Simple Script<a class="headerlink" href="#simple-script" title="Permalink to
230233
make <span class="nb">test</span>
231234
</pre></div>
232235
</div>
233-
</div>
234-
</div>
235-
<div class="section" id="installation-and-use">
236-
<h2>Installation and Use<a class="headerlink" href="#installation-and-use" title="Permalink to this headline"></a></h2>
237236
<p><cite>GridTools</cite> uses CMake as building system. The installation can be configured using <cite>ccmake</cite>. The following variables control the back-ends that will be supported by the runtime components of the installation, namely <a class="reference internal" href="../user_manual/user_manual.html#halo-exchanges"><span class="std std-ref">GCL</span></a>.</p>
238237
<div class="highlight-shell"><div class="highlight"><pre><span></span>GT_ENABLE_TARGET_CUDA <span class="c1"># For CUDA GPUs</span>
239238
GT_ENABLE_TARGET_X86 <span class="c1"># For cache based multicores and naive implementation</span>
@@ -271,6 +270,7 @@ <h2>Installation and Use<a class="headerlink" href="#installation-and-use" title
271270
make -j4
272271
</pre></div>
273272
</div>
273+
</div>
274274
<div class="section" id="using-gridtools">
275275
<h3>Using GridTools<a class="headerlink" href="#using-gridtools" title="Permalink to this headline"></a></h3>
276276
<p>Using <cite>GridTools</cite> follows standard CMake practices. To indicate where the <cite>GridTools</cite> can be found,

Diff for: docs/objects.inv

9 Bytes
Binary file not shown.

Diff for: docs/searchindex.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)