File multi_threading.hpp

class IMultiThreadingConfig
#include <multi_threading.hpp>

Defines an interface for all classes that allow to configure the multi-threading behavior of a parallelizable algorithm.

Subclassed by ManualMultiThreadingConfig, NoMultiThreadingConfig

Public Functions

inline virtual ~IMultiThreadingConfig()
virtual uint32 getNumThreads(const IFeatureMatrix &featureMatrix, uint32 numLabels) const = 0

Determines and returns the number of threads that can actually be used by a parallelizable algorithm, depending on the number of available CPU cores and whether multi-threading support was enabled at compile-time.

Parameters:
  • featureMatrix – A reference to an object of type IFeatureMatrix that provides access to the feature values of the training examples

  • numLabels – The total number of available labels

Returns:

The number of threads that can actually be used