heurexport.h File Reference


Detailed Description

Matrix type-dependent part of the heuristic management module.

#include <oski/matrix.h>

Go to the source code of this file.

Heuristic type module implementations.

#define oski_HeurIsApplicable   MANGLE_MOD_(oski_HeurIsApplicable)
#define oski_HeurEstimateCost   MANGLE_MOD_(oski_HeurEstimateCost)
#define oski_HeurEvaluate   MANGLE_MOD_(oski_HeurEvaluate)
#define oski_HeurApplyResults   MANGLE_MOD_(oski_HeurApplyResults)

Defines

#define INC_OSKI_HEUREXPORT_H
 heurexport.h included.

Functions

int oski_HeurIsApplicable (const oski_matrix_t A)
 Heuristic module-specific implementation of oski_IsHeurApplicable().
double oski_HeurEstimateCost (const oski_matrix_t A)
 Heuristic module-specific implementation of oski_EstimateHeurCost().
void * oski_HeurEvaluate (const oski_matrix_t A)
 Heuristic module-specific implementation of oski_EvaluateHeur().
int oski_HeurApplyResults (const void *results, oski_matrix_t A)
 Heuristic module-specific implementation of oski_ApplyHeurResults().


Function Documentation

double oski_HeurEstimateCost const oski_matrix_t  A  ) 
 

Heuristic module-specific implementation of oski_EstimateHeurCost().

Todo:
This implementation currently assumes our pessimistic upper-bound on the heuristic evaluation cost of 40 x (the time to stream through the matrix), and should be changed to use a build-time benchmark.

void* oski_HeurEvaluate const oski_matrix_t  A  ) 
 

Heuristic module-specific implementation of oski_EvaluateHeur().

Returns:
Returns a oski_symmrb_t structure if the heuristic could be evaluated and returned a non-trivial block size (i.e., block size not equal to 1x1).
Note:
This heuristic uses the same approximate fill ratio used in the BCSR-heuristic case.

int oski_HeurIsApplicable const oski_matrix_t  A  ) 
 

Heuristic module-specific implementation of oski_IsHeurApplicable().

This implementation says register blocking is 'applicable' (i.e., could be considered) for the given matrix if all of the following conditions hold:

  1. The matrix has a CSR or CSC representation.

AND at least one of the following conditions holds:

  1. The user explicitly provided a hint that the structure has blocks (HINT_SINGLE_BLOCKSIZE, HINT_MULTIPLE_BLOCKSIZES), and that such blocks are aligned (HINT_ALIGNED_BLOCKS).
  2. The execution time is 'dominated' by sparse matrix-vector multiply. For the definnition of 'dominated', see IsTimeDominatedByMatMult().


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