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

#include <KernelConfiguration.h>

Public Member Functions

 KernelConfiguration ()
 
 KernelConfiguration (const std::vector< ParameterPair > &pairs)
 
const std::vector< ParameterPair > & GetPairs () const
 
bool IsValid () const
 
std::string GeneratePrefix () const
 
std::string GetCompilerOptions () const
 
std::string GetString () const
 
void Merge (const KernelConfiguration &other)
 
std::vector< KernelConfigurationGenerateNeighbours (const std::string &parameter, const std::vector< ParameterPair > &pairs) const
 
bool operator== (const KernelConfiguration &other) const
 
bool operator!= (const KernelConfiguration &other) const
 

Detailed Description

Class which describes single kernel tuning configuration.

Constructor & Destructor Documentation

◆ KernelConfiguration() [1/2]

ktt::KernelConfiguration::KernelConfiguration ( )

Default constructor, creates invalid kernel configuration.

◆ KernelConfiguration() [2/2]

ktt::KernelConfiguration::KernelConfiguration ( const std::vector< ParameterPair > &  pairs)
explicit

Constructs kernel configuration with the specified parameter pairs.

Parameters
pairsValues of tuning parameters for the configuration.

Member Function Documentation

◆ GenerateNeighbours()

std::vector< KernelConfiguration > ktt::KernelConfiguration::GenerateNeighbours ( const std::string &  parameter,
const std::vector< ParameterPair > &  pairs 
) const

Generates neighbour configurations which differ in the specified parameter.

Parameters
parameterParameter which will be different in the generated configurations. All other parameters will remain identical.
pairsAll valid pairs for the previously specified parameter.
Returns
Generated neighbour configurations.

◆ GeneratePrefix()

std::string ktt::KernelConfiguration::GeneratePrefix ( ) const

Generates kernel source preprocessor definitions from configuration. Parameters where IsCompilerParameter() is true are excluded.

Returns
Kernel source preprocessor definitions.

◆ GetCompilerOptions()

std::string ktt::KernelConfiguration::GetCompilerOptions ( ) const

Returns compiler options for parameters where IsCompilerParameter() is true.

Returns
Compiler options for current configuration.

◆ GetPairs()

const std::vector< ParameterPair > & ktt::KernelConfiguration::GetPairs ( ) const

Returns values of tuning parameters for kernel configuration.

Returns
Values of tuning parameters. See ParameterPair for more information.

◆ GetString()

std::string ktt::KernelConfiguration::GetString ( ) const

Converts configuration to string.

Returns
String in format "parameter1String, parameter2String, ...".

◆ IsValid()

bool ktt::KernelConfiguration::IsValid ( ) const

Checks whether kernel configuration is valid.

Returns
True if kernel configuration is valid, false otherwise.

◆ Merge()

void ktt::KernelConfiguration::Merge ( const KernelConfiguration other)

Merges two configurations, adding paramater values from the specified configuration into this one. If the configurations share some parameters, the values of parameters from this configuration are preserved.

Parameters
otherConfiguration that will be merged into this one.

◆ operator!=()

bool ktt::KernelConfiguration::operator!= ( const KernelConfiguration other) const

Checks whether kernel configuration is equal to other. I.e., it has different parameter pairs or the pairs have different values.

Parameters
otherComparison target.
Returns
True if the configurations are not equal. False otherwise.

◆ operator==()

bool ktt::KernelConfiguration::operator== ( const KernelConfiguration other) const

Checks whether kernel configuration is equal to other. I.e., it has the same parameter pairs with the same values.

Parameters
otherComparison target.
Returns
True if the configurations are equal. False otherwise.

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