ParallelFor::BreakContext Class Reference

#include <parallelfor.h>

Inheritance diagram for ParallelFor::BreakContext:

详细描述

Context for ParallelFor loops that support cancellation.

Public Types

using  ResultValueType = Result < void >
-  Public Types inherited from ParallelFor::BaseContext
using  ResultValueType = void

公共成员函数

void  Break ( Result < void > result= OK )
Bool   IsCancelled () const
-  Public Member Functions inherited from ParallelFor::BaseContext
  BaseContext ()
template<typename INDEXTYPE >
void  PrivateInit (INDEXTYPE from, INDEXTYPE to, Int threadIndex, BreakCondition *breakCondition)
template<typename FN , typename CONTEXT , typename INDEXTYPE >
void  Invoke (FN &obj, INDEXTYPE i)
Bool   IsCancelled () const
Int   GetWorkerThreadIndex () const
void  UpdateWorkerThreadIndex ( Int threadIndex= JobRef::GetCurrentWorkerThreadIndex ())
Int   GetLocalThreadIndex () const
void  Break ( Result < void > result= OK )

静态公共成员函数

static ResultValueType   返回 ( Result < void > &&r)
-  Static Public Member Functions inherited from ParallelFor::BaseContext
static ResultValueType   返回 ( Result < void > &&r)

Additional Inherited Members

-  Public Attributes inherited from ParallelFor::BaseContext
Int   _from
Int   _to
Int   _workerThreadIndex
Int   _localContextIndex
Result < void >  _result
BreakCondition _breakCondition

Member Typedef Documentation

◆  ResultValueType

using ResultValueType = Result <void>

成员函数文档编制

◆  Break()

void Break ( Result < void >  result = OK )

Asks all ParallelFor threads to cancel.

参数
[in] result Used to return an optional error.

◆  IsCancelled()

Bool IsCancelled ( ) const

Returns true if the loop should be quit.

返回
True if the loop should be quit.

◆  Return()

static ResultValueType 返回 ( Result < void > &&  r )
static