tune.c File Reference


Detailed Description

Tuning module implementation.

Current list of heuristics:

Basic structure of a heuristic:

#include <math.h>
#include <oski/common.h>
#include <oski/simplelist.h>
#include <oski/heur_internal.h>
#include <oski/heur_typedep.h>
#include <oski/heurexport.h>
#include <oski/trace.h>
#include <oski/tune.h>
#include <oski/timer.h>
#include <oski/matrix.h>
#include <oski/vecview.h>
#include <oski/xforms.h>

Defines

#define BEST_FRAC_OBSERVED   .25
 Fraction of observed workload available for tuning.
#define BEST_FRAC_WORKLOAD   .25
 Fraction of hint workload available for tuning.

Functions

static double ComputeTuningBudget (oski_matrix_t A_tunable)
 Returns the estimated number of seconds available for tuning.
static int ChooseFastest (oski_matrix_t A_tunable)
 Determines whether the heuristic-selected data structure leads to faster execution times than the input data structure.
static void FreeTunedMat (oski_matrix_t A_tunable)
int oski_TuneMat (oski_matrix_t A_tunable)
 Tune the matrix object using all hints and implicit profiling data.


Function Documentation

static int ChooseFastest oski_matrix_t  A_tunable  )  [static]
 

Determines whether the heuristic-selected data structure leads to faster execution times than the input data structure.

Returns:
1 if the tuned implementation is faster, and 0 otherwise.
Todo:
Implement this routine, given that we will need to allocate temporary vectors.

static double ComputeTuningBudget oski_matrix_t  A_tunable  )  [static]
 

Returns the estimated number of seconds available for tuning.

The estimate is based on the larger of the following two quantities:

  • Estimated time to execute the trace determined by the workload hints.
  • The actual accumulated kernel execution time so far.


Generated on Wed Sep 19 16:41:23 2007 for BeBOP Optimized Sparse Kernel Interface Library by  doxygen 1.4.6