SpECTRE Documentation Coverage Report
Current view: top level - Domain/Structure - DirectionalIdMap.hpp Hit Total Coverage
Commit: 9478b377b8678e85031859810205323c5f2fef1d Lines: 1 3 33.3 %
Date: 2024-05-08 02:31:17
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 <boost/functional/hash.hpp>
       7             : #include <pup.h>
       8             : 
       9             : #include "DataStructures/FixedHashMap.hpp"
      10             : #include "Domain/Structure/DirectionalId.hpp"
      11             : #include "Domain/Structure/MaxNumberOfNeighbors.hpp"
      12             : 
      13             : /// An optimized map with DirectionalId keys
      14             : template <size_t Dim, typename T>
      15           1 : class DirectionalIdMap : public FixedHashMap<maximum_number_of_neighbors(Dim),
      16             :                                              DirectionalId<Dim>, T> {
      17             :  public:
      18           0 :   using base =
      19             :       FixedHashMap<maximum_number_of_neighbors(Dim), DirectionalId<Dim>, T>;
      20             :   using base::base;
      21             : };
      22             : 
      23             : namespace PUP {
      24             : template <size_t Dim, typename T>
      25             : // NOLINTNEXTLINE(google-runtime-references)
      26             : void pup(PUP::er& p, DirectionalIdMap<Dim, T>& t) {
      27             :   pup(p, static_cast<typename DirectionalIdMap<Dim, T>::base&>(t));
      28             : }
      29             : 
      30             : template <size_t Dim, typename T>
      31             : // NOLINTNEXTLINE(google-runtime-references)
      32             : void operator|(PUP::er& p, DirectionalIdMap<Dim, T>& t) {
      33             :   p | static_cast<typename DirectionalIdMap<Dim, T>::base&>(t);
      34             : }
      35             : }  // namespace PUP

Generated by: LCOV version 1.14