Halide 22.0.0 Halide compiler and libraries

AddAtomicMutex.h
Go to the documentation of this file.
1#ifndef HALIDE_ADD_ATOMIC_MUTEX_H
2#define HALIDE_ADD_ATOMIC_MUTEX_H
3
4#include "Expr.h"
5#include <map>
6
7/** \file
8 * Defines the lowering pass that insert mutex allocation code & locks
9 * for the atomic nodes that require mutex locks. It also checks whether
10 * the atomic operation is valid. It rejects algorithms that have indexing
11 * on left-hand-side which references the buffer itself, e.g.
12 * f(clamp(f(r), 0, 100)) = f(r) + 1
13 * If the SplitTuple pass does not lift out the Provide value as a let
14 * expression. This is confirmed by checking whether the Provide nodes
15 * inside an Atomic node have let binding values accessing the buffers
16 * inside the atomic node.
17 * Finally, it lifts the store indexing expressions inside the atomic node
18 * outside of the atomic to avoid side-effects inside those expressions
19 * being evaluated twice. */
20
21namespace Halide {
22namespace Internal {
23
24class Function;
25
26 Stmt add_atomic_mutex(Stmt s, const std::vector<Function> &outputs);
27
28} // namespace Internal
29} // namespace Halide
30
31#endif
Expr.h
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
Halide::Internal::ArgInfoKind::Function
@ Function
Halide::Internal::add_atomic_mutex
Stmt add_atomic_mutex(Stmt s, const std::vector< Function > &outputs)
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition: AbstractGenerator.h:19
Halide::LinkageType::Internal
@ Internal
Not visible externally, similar to 'static' linkage in C.
Halide::Internal::Stmt
A reference-counted handle to a statement node.
Definition: Expr.h:427