Bolt
Flow Class Reference

Public Member Functions

void init (std::vector< std::string > graphPaths, DataType precision, AffinityPolicy affinityPolicy=AFFINITY_CPU_HIGH_PERFORMANCE, int cpuThreads=1, bool useGPU=true)
 initialize flow More...
 
void enqueue (Task task)
 
std::vector< Taskdequeue (bool block=false)
 
unsigned int size ()
 get the current number of unfinished tasks More...
 

Detailed Description

Definition at line 36 of file flow.h.

Member Function Documentation

◆ dequeue()

std::vector<Task> Flow::dequeue ( bool  block = false)

get already finished tasks

Parameters
blockset to blocked until all tasks has finished(default is false)
Returns
finishedTasks: array of already finished tasks

◆ enqueue()

void Flow::enqueue ( Task  task)
Parameters
taskpredefined flow task
Returns

◆ init()

void Flow::init ( std::vector< std::string >  graphPaths,
DataType  precision,
AffinityPolicy  affinityPolicy = AFFINITY_CPU_HIGH_PERFORMANCE,
int  cpuThreads = 1,
bool  useGPU = true 
)

initialize flow

Parameters
graphPathspredefined flow graph file path array
precisiondata process precision
affinityPolicyCPU affinity setting
cpuThreadsthe number of CPU cores to use(default is 1)
useGPUwhether to use ARM GPU(default is false)
Returns

◆ size()

unsigned int Flow::size ( )

get the current number of unfinished tasks

Returns
size : the number of unfinished tasks

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