Halide 21.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
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)
#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)
Value:
(::Halide::Internal::debug_is_active_impl((n), __FILE__, __FUNCTION__, __LINE__))
bool debug_is_active_impl(int verbosity, const char *file, const char *function, int 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
#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";
#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.

Referenced by Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::allocate_block(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::allocate_region(), Halide::Internal::IRMatcher::Rewriter< Instance >::build_replacement(), Halide::Runtime::Internal::HashMap::cleanup(), Halide::Runtime::Internal::BlockAllocator::collect(), Halide::Runtime::Internal::RegionAllocator::collect(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::collect(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::conform(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::conform_block_request(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::conform_region_request(), Halide::Runtime::Internal::copy_memory(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::create_crop(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::deallocate_block(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::deallocate_region(), Halide::Runtime::Internal::RegionAllocator::destroy(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::destroy(), Halide::Internal::IRMatcher::fuzz_test_rule(), Halide::Runtime::Internal::Vulkan::halide_vulkan_get_symbol(), Halide::Internal::HexagonAlignmentAnalyzer::is_aligned_impl(), Halide::Internal::GPUCompilationCache< ContextT, ModuleStateT >::kernel_state_setup(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::map(), Halide::Internal::IRMatcher::Rewriter< Instance >::operator()(), Halide::Internal::IRMatcher::Rewriter< Instance >::operator()(), Halide::Internal::IRMatcher::Rewriter< Instance >::operator()(), Halide::Internal::IRMatcher::Rewriter< Instance >::operator()(), Halide::Internal::IRMatcher::Rewriter< Instance >::operator()(), Halide::Internal::IRMatcher::Rewriter< Instance >::operator()(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::reclaim(), Halide::Runtime::Internal::HashMap::release(), Halide::Runtime::Internal::RegionAllocator::release(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::release(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::release(), Halide::Runtime::Internal::BlockStorage::remove(), Halide::Runtime::Internal::PointerTable::remove(), Halide::Runtime::Internal::BlockStorage::replace(), Halide::Runtime::Internal::PointerTable::replace(), Halide::Runtime::Internal::BlockAllocator::reserve(), Halide::Runtime::Internal::RegionAllocator::reserve(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::reserve(), Halide::Runtime::Internal::BlockStorage::resize(), Halide::Runtime::Internal::PointerTable::resize(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::retain(), Halide::Runtime::Internal::HashMap::store(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::unmap(), Halide::Runtime::Internal::Vulkan::vk_load_vulkan_device_functions(), Halide::Runtime::Internal::Vulkan::vk_load_vulkan_instance_functions(), and Halide::Runtime::Internal::Vulkan::vk_load_vulkan_loader_functions().