-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1143 from parthenon-hpc-lab/lroberts36/add-small-…
…riot Small: Quality of life changes for downstream codes
- Loading branch information
Showing
15 changed files
with
218 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
``TypeList``s | ||
============= | ||
Provides a wrapper class around a variadic pack of types to simplify | ||
performing compile time operations on the pack. There are templated | ||
types defined giving the type at a particular index in the pack, types | ||
for extracting sub-``TypeList``s of the original type list, and ``constexpr`` | ||
functions for getting the index of the first instance of a type in the | ||
pack. Additionally it provides a capability for iterating an ``auto`` lambda | ||
over the type list, which can be useful for calling a ``static`` function | ||
defined for each of the types on each of the types. *In the future, it | ||
would be nice to have the capability to make a unique type list from | ||
another type list (i.e. the unique one only a single instance of each type | ||
in the original type list)* | ||
|
||
``TypeList``s have many applications and are commonly found in many | ||
codebases, but in Parthenon one of the main use cases is for storing | ||
lists of types associated with field variables that are used in type | ||
based ``SparsePack``s. | ||
Robust | ||
====== | ||
Provides a number of functions for doing operations on floating point | ||
numbers that are bounded, avoid division by zero, etc. | ||
C++11 Style Concepts Implementation | ||
=================================== | ||
*This documentation needs to be written (see issue #695), but there are | ||
extensive comments in src/utlils/concepts_lite.hpp and examples of | ||
useage in tst/unit/test_concepts_lite.hpp* | ||
``Indexer`` | ||
=========== | ||
|
||
Provides functionality for iterating over an arbitrary dimensional | ||
hyper-rectangular index space using a flattened loop. Specific | ||
instantiations, e.g. ``Indexer5D``, are provided up to eight | ||
dimensions. Useage: | ||
|
||
.. code:: cpp | ||
Indexer4D idxer({0, 3}, {1, 2}, {0, 5}, {10, 16}); | ||
for (int flat_idx = 0; flat_idx < idxer.size(); ++flat_idx) { | ||
auto [i, j, k, l] = idxer(flat_idx); | ||
// Do stuff in the 4D index space... | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.