https://github.com/halide/Halide
Raw File
Tip revision: 1a53d6b68179ffa6cb456023ad00828effad4044 authored by Derek Gerstmann on 24 April 2023, 19:52:24 UTC
Merge branch 'main' into vulkan-phase2-runtime
Tip revision: 1a53d6b
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