Revision 1212efb878b5c42caedd4f37de4c0f6b3d19a12c authored by Steven Johnson on 06 January 2022, 00:46:45 UTC, committed by Steven Johnson on 06 January 2022, 00:46:45 UTC
1 parent b244a83
Raw File
Debug.cpp
#include "Debug.h"
#include "Util.h"

namespace Halide {
namespace Internal {

int debug::debug_level() {
    static int cached_debug_level = ([]() -> int {
        std::string lvl = get_env_variable("HL_DEBUG_CODEGEN");
        return !lvl.empty() ? atoi(lvl.c_str()) : 0;
    })();
    return cached_debug_level;
}

}  // namespace Internal
}  // namespace Halide
back to top