SpECTRE Documentation Coverage Report
Current view: top level - Parallel - MaxInlineMethodsReached.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 0.0 % 1 0
Test Date: 2026-10-22 17:29:42
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 2.0-1