https://github.com/halide/Halide
Raw File
Tip revision: 5008e6610f7a76effe053425a0dafb1d3bfa3d56 authored by Patricia Suriana on 07 June 2018, 23:30:43 UTC
Use user_warning instead of std::cerr
Tip revision: 5008e66
Debug.cpp
#include "Debug.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