Halide 22.0.0 Halide compiler and libraries

Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions
Debug.h File Reference

Defines functions for debug logging during code generation. More...

`#include <cstdlib>`
`#include <iostream>`
`#include <string>`

Go to the source code of this file.

## Classes
struct | Halide::Internal::PrintSpan< T >
| Allow easily printing the contents of containers, or std::vector-like containers, in debug output. More...
struct | Halide::Internal::PrintSpanLn< T >
| Allow easily printing the contents of spans, or std::vector-like spans, in debug output. More...

## Namespaces
namespace | Halide
| This file defines the class FunctionDAG, which is our representation of a Halide pipeline, and contains methods to using Halide's bounds tools to query properties of it.
namespace | Halide::Internal

## Macros
#define | debug_is_active(n) (::Halide::Internal::debug_is_active_impl((n), __FILE__, __FUNCTION__, __LINE__))
#define | debug(n)
| For optional debugging during codegen, use the debug macro as follows:

## Functions
std::ostream & | Halide::operator<< (std::ostream &stream, const Expr &)
| Emit an expression on an output stream (such as std::cout) in human-readable form.
std::ostream & | Halide::operator<< (std::ostream &stream, const Type &)
| Emit a halide type on an output stream (such as std::cout) in human-readable form.
std::ostream & | Halide::operator<< (std::ostream &stream, const Module &)
| Emit a halide Module on an output stream (such as std::cout) in human-readable form.
std::ostream & | Halide::operator<< (std::ostream &stream, const Target &)
| Emit a halide Target in a human readable form.
std::ostream & | Halide::Internal::operator<< (std::ostream &stream, const Stmt &)
| Emit a halide statement on an output stream (such as std::cout) in a human-readable form.
std::ostream & | Halide::Internal::operator<< (std::ostream &stream, const LoweredFunc &)
| Emit a halide LoweredFunc in a human readable format.
bool | Halide::Internal::debug_is_active_impl (int verbosity, const char *file, const char *function, int line)
template<typename T >
| Halide::Internal::PrintSpan (const T &) -> PrintSpan< T >
template<typename StreamT , typename T >
StreamT & | Halide::Internal::operator<< (StreamT &stream, const PrintSpan< T > &wrapper)
template<typename T >
| Halide::Internal::PrintSpanLn (const T &) -> PrintSpanLn< T >
template<typename StreamT , typename T >
StreamT & | Halide::Internal::operator<< (StreamT &stream, const PrintSpanLn< T > &wrapper)

## Detailed Description

Defines functions for debug logging during code generation.

Definition in file Debug.h.

## Macro Definition Documentation

## ◆ debug_is_active

#define debug_is_active | ( |  | n | ) | (::Halide::Internal::debug_is_active_impl((n), __FILE__, __FUNCTION__, __LINE__))

Definition at line 36 of file Debug.h.

## ◆ debug

#define debug | ( |  | n | ) |

Value:
/* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \
if (debug_is_active((n))) std::cerr
debug_is_active
#define debug_is_active(n)
Definition Debug.h:36

For optional debugging during codegen, use the debug macro as follows:

debug(verbosity) << "The expression is " << expr << "\n";
debug
#define debug(n)
For optional debugging during codegen, use the debug macro as follows:
Definition Debug.h:52

verbosity of 0 always prints, 1 should print after every major stage, 2 should be used for more detail, and 3 should be used for tracing everything that occurs. The verbosity with which to print is determined by the value of the environment variable HL_DEBUG_CODEGEN

Definition at line 52 of file Debug.h.