Kernel Tuning Toolkit 2.3
 
Loading...
Searching...
No Matches
ktt::RandomSearcher Class Reference

#include <RandomSearcher.h>

Inheritance diagram for ktt::RandomSearcher:
ktt::Searcher

Public Member Functions

 RandomSearcher ()
 
void OnInitialize () override
 
bool CalculateNextConfiguration (const KernelResult &previousResult) override
 
KernelConfiguration GetCurrentConfiguration () const override
 
- Public Member Functions inherited from ktt::Searcher
virtual ~Searcher ()=default
 
virtual void OnReset ()
 
 Searcher ()
 
KernelConfiguration GetConfiguration (const uint64_t index) const
 
uint64_t GetIndex (const KernelConfiguration &configuration) const
 
KernelConfiguration GetRandomConfiguration () const
 
std::vector< KernelConfigurationGetNeighbourConfigurations (const KernelConfiguration &configuration, const uint64_t maxDifferences, const size_t maxNeighbours=3) const
 
uint64_t GetConfigurationsCount () const
 
uint64_t GetUnexploredConfigurationsCount () const
 
const std::set< uint64_t > & GetExploredIndices () const
 
bool IsInitialized () const
 
void Initialize (const ConfigurationData &data)
 
void Reset ()
 

Detailed Description

Searcher which explores configurations in random order.

Constructor & Destructor Documentation

◆ RandomSearcher()

ktt::RandomSearcher::RandomSearcher ( )

Initializes random searcher.

Member Function Documentation

◆ CalculateNextConfiguration()

bool ktt::RandomSearcher::CalculateNextConfiguration ( const KernelResult previousResult)
overridevirtual

Calculates the configuration which will be run next. Called after processing the current configuration if there are any remaining unexplored configurations.

Parameters
previousResultResult from the last tested configuration. See KernelResult for more information.
Returns
True if the next configuration was successfully calculated, false otherwise. If false is returned, configuration space exploration will be stopped.

Implements ktt::Searcher.

◆ GetCurrentConfiguration()

KernelConfiguration ktt::RandomSearcher::GetCurrentConfiguration ( ) const
overridevirtual

Returns current kernel configuration. Note that this may be called repeatedly before calculating next configuration. In that case, the returned configuration must always be the same.

Returns
Current configuration.

Implements ktt::Searcher.

◆ OnInitialize()

void ktt::RandomSearcher::OnInitialize ( )
overridevirtual

Called after searcher is initialized with kernel configurations. The first kernel configuration as well as custom searcher parameters should be initialized here.

Reimplemented from ktt::Searcher.


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