heurexport.h File Reference

Matrix type-dependent part of the heuristic management module. More...

#include <oski/matrix.h>

Go to the source code of this file.

Defines

#define INC_OSKI_HEUREXPORT_H
 heurexport.h included.
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)

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().


Detailed Description

Matrix type-dependent part of the heuristic management module.


Define Documentation

#define INC_OSKI_HEUREXPORT_H

heurexport.h included.


Function Documentation

double oski_HeurEstimateCost ( const oski_matrix_t  A  ) 

Heuristic module-specific implementation of oski_EstimateHeurCost().

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.

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.

References oski_matstruct_t::time_stream.

void* oski_HeurEvaluate ( const oski_matrix_t  A  ) 

Heuristic module-specific implementation of oski_EvaluateHeur().

Heuristic module-specific implementation of oski_EvaluateHeur().

Returns:
Returns a oski_mregblock_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.
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.

References oski_mregblock_t::c, ERR_OUT_OF_MEMORY, oski_matstruct_t::input_mat, oski_fillprofile_BCSR_t::max_c, oski_profile_MBCSRMatMult_t::max_c, oski_fillprofile_BCSR_t::max_r, oski_profile_MBCSRMatMult_t::max_r, OSKI_ERR, oski_Free, oski_Malloc, oski_PrintDebugMessage(), PROF_FILLBCSR_GET, PROF_MBCSR_GET, oski_matstruct_t::props, oski_mregblock_t::r, and oski_fillprofile_BCSR_t::ratio.

int oski_HeurIsApplicable ( const oski_matrix_t  A  ) 

Heuristic module-specific implementation of oski_IsHeurApplicable().

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().

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.
  2. The matrix uses non-symmetric storage.

References oski_structhint_t::block_size, oski_matstruct_t::input_mat, INVALID_ID, INVALID_MAT, oski_structhint_t::is_unaligned, oski_structhint_t::num_sizes, OSKI_IND_ID, oski_LookupMatTypeId(), oski_PrintDebugMessage(), OSKI_VAL_ID, oski_matstruct_t::structhints, oski_matstruct_t::time_stream, oski_matstruct_t::trace, oski_matspecific_t::type_id, and oski_matstruct_t::workhints.


Generated on Fri Apr 8 22:35:19 2011 for BeBOP Optimized Sparse Kernel Interface Library by  doxygen 1.5.9