https://github.com/halide/Halide
Raw File
Tip revision: 7a0cc0c6539a9f03015d59768407dc7f409beeed authored by Alexander Root on 18 November 2020, 18:31:08 UTC
nit: add line break
Tip revision: 7a0cc0c
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