Open Qmin
0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
|
A class that tries to dynamically optimize a kernel parameter. More...
#include <kernelTuner.h>
Public Member Functions | |
kernelTuner (int start, int end, int step, int nSamples, int _period) | |
Base constructor takes (start,end,step) values to scan, sample number, and period. More... | |
~kernelTuner () | |
destroy the cuda events More... | |
void | begin () |
void | end () |
int | getParameter () |
return the parameter to use for the kernel More... | |
void | printTimingData () |
print timing data to screen More... | |
bool | samplingComplete () |
Is initial sampling complete? More... | |
Protected Types | |
enum | State { STARTUP, IDLE, SCANNING } |
names for the internal state More... | |
Protected Member Functions | |
int | computeOptimalParameter () |
Protected Attributes | |
int | parameterValue |
int | samplesPerValue |
int | period |
vector< int > | possibleParameters |
State | internalState |
int | currentSample |
int | currentParameterIndex |
int | callsSinceLastSample |
vector< vector< float > > | sampleData |
vector< float > | sampleMedian |
chrono::time_point< chrono::high_resolution_clock > | startTime |
chrono::time_point< chrono::high_resolution_clock > | endTime |
A class that tries to dynamically optimize a kernel parameter.
|
protected |
kernelTuner::kernelTuner | ( | int | start, |
int | end, | ||
int | step, | ||
int | nSamples, | ||
int | _period | ||
) |
Base constructor takes (start,end,step) values to scan, sample number, and period.
References callsSinceLastSample, currentParameterIndex, currentSample, end(), internalState, parameterValue, period, possibleParameters, resize(), sampleData, sampleMedian, samplesPerValue, and STARTUP.
kernelTuner::~kernelTuner | ( | ) |
destroy the cuda events
void kernelTuner::begin | ( | ) |
References IDLE, internalState, and startTime.
void kernelTuner::end | ( | ) |
References callsSinceLastSample, computeOptimalParameter(), currentParameterIndex, currentSample, endTime, IDLE, internalState, parameterValue, period, possibleParameters, sampleData, samplesPerValue, SCANNING, startTime, and STARTUP.
Referenced by kernelTuner().
|
inline |
return the parameter to use for the kernel
References parameterValue.
|
inline |
print timing data to screen
References parameterValue, possibleParameters, and sampleMedian.
|
inline |
Is initial sampling complete?
References internalState, and STARTUP.
|
protected |
References possibleParameters, sampleData, sampleMedian, and scalar.
Referenced by end().
|
protected |
Referenced by end(), getParameter(), kernelTuner(), and printTimingData().
|
protected |
Referenced by end(), and kernelTuner().
|
protected |
Referenced by end(), and kernelTuner().
|
protected |
Referenced by computeOptimalParameter(), end(), kernelTuner(), and printTimingData().
|
protected |
Referenced by begin(), end(), kernelTuner(), and samplingComplete().
|
protected |
Referenced by end(), and kernelTuner().
|
protected |
Referenced by end(), and kernelTuner().
|
protected |
Referenced by end(), and kernelTuner().
|
protected |
Referenced by computeOptimalParameter(), end(), and kernelTuner().
|
protected |
Referenced by computeOptimalParameter(), kernelTuner(), and printTimingData().
|
protected |
|
protected |
Referenced by end().