https://github.com/halide/Halide
Raw File
Tip revision: d01bf4e977e398d72b04a4e67839bed4787dd679 authored by Steven Johnson on 21 January 2021, 22:12:36 UTC
Merge branch 'master' into abadams/switch_stmt
Tip revision: d01bf4e
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