Compute Library
 21.02
IScheduler::Hints Class Reference

Scheduler hints. More...

#include <IScheduler.h>

Public Member Functions

 Hints (unsigned int split_dimension, StrategyHint strategy=StrategyHint::STATIC, int threshold=0)
 Constructor. More...
 
Hintsset_split_dimension (unsigned int split_dimension)
 Set the split_dimension hint. More...
 
unsigned int split_dimension () const
 Return the prefered split dimension. More...
 
Hintsset_strategy (StrategyHint strategy)
 Set the strategy hint. More...
 
StrategyHint strategy () const
 Return the prefered strategy to use to split workload. More...
 
int threshold () const
 Return the granule capping threshold to be used by dynamic scheduling. More...
 

Detailed Description

Scheduler hints.

Collection of preferences set by the function regarding how to split a given workload

Definition at line 68 of file IScheduler.h.

Constructor & Destructor Documentation

◆ Hints()

Hints ( unsigned int  split_dimension,
StrategyHint  strategy = StrategyHint::STATIC,
int  threshold = 0 
)
inline

Constructor.

Parameters
[in]split_dimensionDimension along which to split the kernel's execution window.
[in]strategy(Optional) Split strategy.
[in]threshold(Optional) Dynamic scheduling capping threshold.

Definition at line 77 of file IScheduler.h.

78  : _split_dimension(split_dimension), _strategy(strategy), _threshold(threshold)
79  {
80  }
int threshold() const
Return the granule capping threshold to be used by dynamic scheduling.
Definition: IScheduler.h:124
StrategyHint strategy() const
Return the prefered strategy to use to split workload.
Definition: IScheduler.h:116
unsigned int split_dimension() const
Return the prefered split dimension.
Definition: IScheduler.h:96

Member Function Documentation

◆ set_split_dimension()

Hints& set_split_dimension ( unsigned int  split_dimension)
inline

Set the split_dimension hint.

Parameters
[in]split_dimensionDimension along which to split the kernel's execution window.
Returns
the Hints object

Definition at line 87 of file IScheduler.h.

88  {
89  _split_dimension = split_dimension;
90  return *this;
91  }
unsigned int split_dimension() const
Return the prefered split dimension.
Definition: IScheduler.h:96

◆ set_strategy()

Hints& set_strategy ( StrategyHint  strategy)
inline

Set the strategy hint.

Parameters
[in]strategyPrefered strategy to use to split the workload
Returns
the Hints object

Definition at line 107 of file IScheduler.h.

108  {
109  _strategy = strategy;
110  return *this;
111  }
StrategyHint strategy() const
Return the prefered strategy to use to split workload.
Definition: IScheduler.h:116

◆ split_dimension()

unsigned int split_dimension ( ) const
inline

Return the prefered split dimension.

Returns
The split dimension

Definition at line 96 of file IScheduler.h.

Referenced by IScheduler::num_threads_hint(), SingleThreadScheduler::schedule(), and OMPScheduler::schedule_op().

97  {
98  return _split_dimension;
99  }

◆ strategy()

StrategyHint strategy ( ) const
inline

Return the prefered strategy to use to split workload.

Returns
The strategy

Definition at line 116 of file IScheduler.h.

Referenced by IScheduler::num_threads_hint(), and OMPScheduler::schedule_op().

117  {
118  return _strategy;
119  }

◆ threshold()

int threshold ( ) const
inline

Return the granule capping threshold to be used by dynamic scheduling.

Returns
The capping threshold

Definition at line 124 of file IScheduler.h.

Referenced by IScheduler::num_threads_hint().

125  {
126  return _threshold;
127  }

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