https://github.com/halide/Halide
Raw File
Tip revision: cc613924c7ea913f2bc31debc9f55316fbad40d9 authored by Steven Johnson on 15 April 2020, 17:21:10 UTC
Add HALIDE_STATIC_CONSTEXPR
Tip revision: cc61392
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