SpECTRE Documentation Coverage Report
Current view: top level - Domain/Structure - DirectionMap.hpp Hit Total Coverage
Commit: 37c384043430860f87787999aa7399d01bb3d213 Lines: 1 3 33.3 %
Date: 2024-04-20 02:24:02
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : #pragma once
       5             : 
       6             : #include <pup.h>
       7             : 
       8             : #include "DataStructures/FixedHashMap.hpp"
       9             : #include "Domain/Structure/Direction.hpp"
      10             : 
      11             : /// \ingroup DataStructuresGroup
      12             : /// \ingroup ComputationalDomainGroup
      13             : /// An optimized map with Direction keys
      14             : template <size_t Dim, typename T>
      15           1 : class DirectionMap
      16             :     : public FixedHashMap<2 * Dim, Direction<Dim>, T, DirectionHash<Dim>> {
      17             :  public:
      18           0 :   using base = FixedHashMap<2 * Dim, Direction<Dim>, T, DirectionHash<Dim>>;
      19             :   using base::base;
      20             : };
      21             : 
      22             : namespace PUP {
      23             : template <size_t Dim, typename T>
      24             : // NOLINTNEXTLINE(google-runtime-references)
      25             : void pup(PUP::er& p, DirectionMap<Dim, T>& t) {
      26             :   pup(p, static_cast<typename DirectionMap<Dim, T>::base&>(t));
      27             : }
      28             : 
      29             : template <size_t Dim, typename T>
      30             : // NOLINTNEXTLINE(google-runtime-references)
      31             : void operator|(PUP::er& p, DirectionMap<Dim, T>& t) {
      32             :   p | static_cast<typename DirectionMap<Dim, T>::base&>(t);
      33             : }
      34             : }  // namespace PUP

Generated by: LCOV version 1.14