Skip to content

Commit

Permalink
use only SVG images for generating documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Sep 21, 2020
1 parent c0d8588 commit 8699a5f
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 70 deletions.
Binary file removed documentation/images/example_mapping.pdf
Binary file not shown.
Binary file removed documentation/images/example_tree.pdf
Binary file not shown.
Binary file removed documentation/images/fused_tree_2.pdf
Binary file not shown.
Binary file removed documentation/images/layout_tree.pdf
Binary file not shown.
Binary file removed documentation/images/layout_tree_2.pdf
Binary file not shown.
Binary file removed documentation/images/logo.pdf
Binary file not shown.
Binary file removed documentation/images/padding_tree_2.pdf
Binary file not shown.
Binary file removed documentation/images/soa_tree_2.pdf
Binary file not shown.
Binary file removed documentation/images/start_tree_2.pdf
Binary file not shown.
Binary file removed documentation/images/ud_tree_2.pdf
Binary file not shown.
8 changes: 1 addition & 7 deletions documentation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. only:: html

.. image:: images/logo.svg

.. only:: latex

.. image:: images/logo.pdf
.. image:: images/logo.svg

Low Level Abstraction of Memory Access
======================================
Expand Down
8 changes: 1 addition & 7 deletions documentation/pages/domains.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,7 @@ example struct for storing a pixel value

This defines this tree

.. only:: html

.. image:: ../images/layout_tree.svg

.. only:: latex

.. image:: ../images/layout_tree.pdf
.. image:: ../images/layout_tree.svg

Unfortunately with C++ it is not possible yet to "iterate" over a struct at
compile time as it would be needed for LLAMA's mapping (although there are proposals to provide such a facility).
Expand Down
64 changes: 8 additions & 56 deletions documentation/pages/mappings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,7 @@ The LLAMA tree mapping is one approach to archieve the goal of mixing different
Furthermore, it tries to establish a general mapping description language and mapping definition framework.
Let's take the example datum domain from the :ref:`domain section<label-domains>`:

.. only:: html

.. image:: ../images/layout_tree.svg

.. only:: latex

.. image:: ../images/layout_tree.pdf
.. image:: ../images/layout_tree.svg

As already mentioned this is a compile time tree. The idea of the tree mapping
is now to extend this model to a compile time tree with run time annotations
Expand All @@ -90,35 +84,17 @@ This is best demonstrated by an example. First of all the user domain needs to b
represented as such an tree too. Let's assume a user domain of
:math:`128 \times 64`:

.. only:: html

.. image:: ../images/ud_tree_2.svg

.. only:: latex

.. image:: ../images/ud_tree_2.pdf
.. image:: ../images/ud_tree_2.svg

The datum domain is already a tree, but as it has no run time influence, only
:math:`1` is annotated for these tree nodes:

.. only:: html

.. image:: ../images/layout_tree_2.svg

.. only:: latex

.. image:: ../images/layout_tree_2.pdf
.. image:: ../images/layout_tree_2.svg

Now the two trees are connected so that we can represent user domain and datum
domain with one tree:

.. only:: html

.. image:: ../images/start_tree_2.svg

.. only:: latex

.. image:: ../images/start_tree_2.pdf
.. image:: ../images/start_tree_2.svg

The mapping works now in this way that the tree is "flattened" from left to
right using a breadth first traversal. Annotations represent repetitions of the node
Expand All @@ -129,46 +105,22 @@ approach, which is most probably not desired.
So we want to transform the tree before flattening it. A struct of array
approach may look like this:

.. only:: html

.. image:: ../images/soa_tree_2.svg

.. only:: latex

.. image:: ../images/soa_tree_2.pdf
.. image:: ../images/soa_tree_2.svg

Struct of array but with a padding after each 1024 elements may look like this:

.. only:: html

.. image:: ../images/padding_tree_2.svg

.. only:: latex

.. image:: ../images/padding_tree_2.pdf
.. image:: ../images/padding_tree_2.svg

The size of the leaf type in "pad" of course needs to be determined based on the
desired aligment and sub tree sizes.

Such a tree (with smaller user domain for easier drawing) …

.. only:: html

.. image:: ../images/example_tree.svg

.. only:: latex

.. image:: ../images/example_tree.pdf
.. image:: ../images/example_tree.svg

… may look like this mapped to memory:

.. only:: html

.. image:: ../images/example_mapping.svg

.. only:: latex

.. image:: ../images/example_mapping.pdf
.. image:: ../images/example_mapping.svg

In code a tree mapping is defined as :cpp:`llama::mapping::tree::Mapping`, but
takes one more template parameter for the type of a tuple of tree operations and
Expand Down

0 comments on commit 8699a5f

Please sign in to comment.