ViennaCL - The Vienna Computing Library  1.5.1
Data Structures | Functions
viennacl::generator::autotune Namespace Reference

Provides the implementation for tuning the kernels for a particular device. More...

Data Structures

class  tuning_param
 class for a tuning parameter More...
class  tuning_config
 Tuning configuration. More...

Functions

template<class ProfileT >
double benchmark_impl (viennacl::scheduler::statement const &statement, code_generator::forced_profile_key_type key, ProfileT const &prof, unsigned int n_runs)
 Add the timing value for a given profile and an statement.
template<class ConfigType >
void benchmark (std::map< double, typename ConfigType::profile_type > *timings, scheduler::statement const &op, code_generator::forced_profile_key_type const &key, tuning_config< ConfigType > &config, unsigned int n_runs, std::ofstream *out)
 Fills a timing map for a given statement and a benchmark configuration.

Detailed Description

Provides the implementation for tuning the kernels for a particular device.


Function Documentation

void viennacl::generator::autotune::benchmark ( std::map< double, typename ConfigType::profile_type > *  timings,
scheduler::statement const &  op,
code_generator::forced_profile_key_type const &  key,
tuning_config< ConfigType > &  config,
unsigned int  n_runs,
std::ofstream *  out 
)

Fills a timing map for a given statement and a benchmark configuration.

Template Parameters:
OpTtype of the statement
ConfigTypetype of the benchmark configuration
Parameters:
timingsthe timings to fill
opthe given statement
keya key for forcing a particular kernel profile (i.e. to pick profile A for a device which would usually use profile B)
configthe given configuration
n_runsNumber of runs for the benchmark
outPointer to output file stream for writing to file (if not NULL)
double viennacl::generator::autotune::benchmark_impl ( viennacl::scheduler::statement const &  statement,
code_generator::forced_profile_key_type  key,
ProfileT const &  prof,
unsigned int  n_runs 
)

Add the timing value for a given profile and an statement.