SpECTRE Documentation Coverage Report
Current view: top level - Parallel - MaxInlineMethodsReached.hpp Hit Total Coverage
Commit: d0fc80462417e83e5cddfa1b9901bb4a9b6af4d6 Lines: 0 1 0.0 %
Date: 2024-03-29 00:33:31
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 <cstddef>
       7             : #include <utility>
       8             : 
       9             : namespace Parallel::detail {
      10             : 
      11             : // Allow 64 inline entry method calls before we fall back to Charm++. This is
      12             : // done to avoid blowing the stack.
      13             : inline bool max_inline_entry_methods_reached() {
      14             : #ifndef SPECTRE_PROFILING
      15             :   thread_local size_t approx_stack_depth = 0;
      16             :   approx_stack_depth++;
      17             :   if (approx_stack_depth < 64) {
      18             :     return false;
      19             :   }
      20             :   approx_stack_depth = 0;
      21             : #endif
      22             :   return true;
      23             : }
      24             : }  // namespace Parallel::detail

Generated by: LCOV version 1.14