CGraph
Protected Member Functions | Private Attributes | Friends | List of all members
GStaticEngine Class Reference

将待执行的图中的所有结点进行拓扑排序(setup),排序结果存储在element_mat_; 然后将element_mat_各个拓扑排序好的结点提交到微线程或者线程池,等待执行完成获取结果(run) More...

#include <GStaticEngine.h>

Inheritance diagram for GStaticEngine:
Inheritance graph
[legend]
Collaboration diagram for GStaticEngine:
Collaboration graph
[legend]

Protected Member Functions

 GStaticEngine ()=default
 
CStatus setup (const GSortedGElementPtrSet &elements) override
 对elements内的元素进行拓扑排序,排序结果存入element_mat_ More...
 
CStatus run () override
 未绑定线程的微任务在macros排队执行;其他任务提交到线程池 TODO(bill.lee): 拓扑排序完,但是提交到线程池和微线程的线程怎么保证按照拓扑排序的顺序执行? 如果不能保证按照拓扑排序的顺序串行执行,那setup的意义在哪? More...
 
- Protected Member Functions inherited from GEngine
 GEngine ()=default
 
CVoid link (const GSortedGElementPtrSet &elements)
 

Private Attributes

GElementPtrMat2D element_mat_ {}
 

Friends

class CAllocator
 
class GElementManager
 

Additional Inherited Members

- Public Member Functions inherited from CObject
 CObject ()=default
 
virtual CStatus init ()
 
virtual CStatus destroy ()
 
virtual ~CObject ()=default
 
- Static Protected Member Functions inherited from GEngine
static GElementPtrArr getTopo (const GSortedGElementPtrSet &elements)
 
static CBool isDag (const GSortedGElementPtrSet &elements)
 
- Protected Attributes inherited from GEngine
UThreadPoolPtr thread_pool_ { nullptr }
 
CSize linked_size_ = 0
 

Detailed Description

将待执行的图中的所有结点进行拓扑排序(setup),排序结果存储在element_mat_; 然后将element_mat_各个拓扑排序好的结点提交到微线程或者线程池,等待执行完成获取结果(run)

Constructor & Destructor Documentation

◆ GStaticEngine()

GStaticEngine::GStaticEngine ( )
explicitprotecteddefault

Member Function Documentation

◆ run()

CStatus GStaticEngine::run ( )
overrideprotectedvirtual

未绑定线程的微任务在macros排队执行;其他任务提交到线程池 TODO(bill.lee): 拓扑排序完,但是提交到线程池和微线程的线程怎么保证按照拓扑排序的顺序执行? 如果不能保证按照拓扑排序的顺序串行执行,那setup的意义在哪?

Returns
CStatus

Implements CObject.

Here is the call graph for this function:

◆ setup()

CGRAPH_NAMESPACE_BEGIN CStatus GStaticEngine::setup ( const GSortedGElementPtrSet elements)
overrideprotectedvirtual

对elements内的元素进行拓扑排序,排序结果存入element_mat_

Parameters
elements
Returns
CStatus

Implements GEngine.

Friends And Related Function Documentation

◆ CAllocator

friend class CAllocator
friend

◆ GElementManager

friend class GElementManager
friend

Member Data Documentation

◆ element_mat_

GElementPtrMat2D GStaticEngine::element_mat_ {}
private

The documentation for this class was generated from the following files: