19 auto clousure_id()
const {
return m_clousure_id; }
20 auto type()
const {
return m_type; }
21 auto name()
const {
return std::string_view{m_name}; }
22 const auto& var_usages()
const {
return m_var_usages; }
23 span<const ComputeGraphDependency> deps()
const;
27 virtual void graphviz_var_usages(std::ostream& o,
33 using S = std::shared_ptr<T>;
39 std::string_view name,
40 const std::function<
void()> f)
42 , m_clousure_id(clousure_id)
48 std::function<void()> m_closure;
49 std::map<VarId, ComputeGraphVarUsage> m_var_usages;
51 uint64_t m_access_graph_index;
54 ComputeGraphNodeType m_type;
55 size_t m_deps_begin = 0;
56 size_t m_deps_count = 0;
58 void operator()() { m_closure(); }
60 std::vector<ComputeGraphNodeBase*> m_graph_nodes;
61 void set_deps_range(
size_t begin,
size_t count);