LMCAS
Lamina Computer Algebra System
载入中...
搜索中...
未找到
LMCAS::InferenceEngine::DepthGuard类 参考

#include </home/runner/work/docs/docs/LMCAS/src/internal/inference_engine_impl.hpp>

LMCAS::InferenceEngine::DepthGuard 的协作图:

Public 成员函数

 DepthGuard (const DepthGuard &)=delete
 DepthGuard (const InferenceEngine &engine, const SymbolicNode &node)
 ~DepthGuard ()
DepthGuard & operator= (const DepthGuard &)=delete
bool should_abort () const

Private 属性

bool abort_ = false
const InferenceEngine & engine_
bool inserted_ = false
const SymbolicNode * node_

详细描述

在文件 inference_engine_impl.hpp 第 245 行定义.

构造及析构函数说明

◆ DepthGuard() [1/2]

LMCAS::InferenceEngine::DepthGuard::DepthGuard ( const InferenceEngine & engine,
const SymbolicNode & node )

在文件 inference_engine_core.cpp 第 23 行定义.

25 : engine_(engine), node_(&node) {
26 engine_.impl_->current_depth++;
27
28 if (engine_.impl_->current_depth > engine_.impl_->max_depth) {
29 abort_ = true;
30 return;
31 }
32
33 // Insert and detect cycles atomically. If allocation throws, restore the
34 // depth counter because a throwing constructor has no matching destructor.
35 try {
36 inserted_ = engine_.impl_->visited.insert(node_).second;
37 } catch (...) {
38 engine_.impl_->current_depth--;
39 if (engine_.impl_->current_depth == 0) {
40 engine_.impl_->visited.clear();
41 }
42 throw;
43 }
44 if (!inserted_) {
45 abort_ = true;
46 }
47}

引用了 abort_, engine_, inserted_ , 以及 node_.

被这些函数引用 DepthGuard() , 以及 operator=().

这是这个函数的调用关系图:

◆ ~DepthGuard()

LMCAS::InferenceEngine::DepthGuard::~DepthGuard ( )

在文件 inference_engine_core.cpp 第 49 行定义.

49 {
50 if (inserted_) {
51 engine_.impl_->visited.erase(node_);
52 }
53
54 engine_.impl_->current_depth--;
55
56 if (engine_.impl_->current_depth == 0) {
57 engine_.impl_->visited.clear();
58 }
59}

引用了 engine_, inserted_ , 以及 node_.

◆ DepthGuard() [2/2]

LMCAS::InferenceEngine::DepthGuard::DepthGuard ( const DepthGuard & )
delete

引用了 DepthGuard().

函数调用图:

成员函数说明

◆ operator=()

DepthGuard & LMCAS::InferenceEngine::DepthGuard::operator= ( const DepthGuard & )
delete

引用了 DepthGuard().

函数调用图:

◆ should_abort()

bool LMCAS::InferenceEngine::DepthGuard::should_abort ( ) const
inline

在文件 inference_engine_impl.hpp 第 250 行定义.

250{ return abort_; }

引用了 abort_.

类成员变量说明

◆ abort_

bool LMCAS::InferenceEngine::DepthGuard::abort_ = false
private

在文件 inference_engine_impl.hpp 第 258 行定义.

被这些函数引用 DepthGuard() , 以及 should_abort().

◆ engine_

const InferenceEngine& LMCAS::InferenceEngine::DepthGuard::engine_
private

在文件 inference_engine_impl.hpp 第 256 行定义.

被这些函数引用 DepthGuard() , 以及 ~DepthGuard().

◆ inserted_

bool LMCAS::InferenceEngine::DepthGuard::inserted_ = false
private

在文件 inference_engine_impl.hpp 第 259 行定义.

被这些函数引用 DepthGuard() , 以及 ~DepthGuard().

◆ node_

const SymbolicNode* LMCAS::InferenceEngine::DepthGuard::node_
private

在文件 inference_engine_impl.hpp 第 257 行定义.

被这些函数引用 DepthGuard() , 以及 ~DepthGuard().


该类的文档由以下文件生成: