00001
00006 #if !defined(INC_SPMV_TILED_BCSR_H)
00007 #define INC_SPMV_TILED_BCSR_H
00008
00009 #if !defined(INC_SPMV_BCSR_H)
00010 typedef struct tagSparseMatrixBCSR SparseMatrixBCSR;
00011 #endif
00012
00013
00014 typedef struct tagSparseMatrixTiledBCSR
00015 {
00016 const SparseMatrixBCSR *B;
00017
00018 int num_iters;
00019 int num_tiles;
00020 int *iter_ptr;
00021 int *dest_ind;
00022 } SparseMatrixTiledBCSR;
00023
00024
00025
00026
00027 #define TBCSR_MAX_ROWS 8
00028 #define TBCSR_MAX_COLS 8
00029
00030 typedef void (*SPMV_TBCSR_FP) (int bm,
00031
00032 int num_iters, int num_tiles,
00033 const int *iter_ptr, const int *dest_ind,
00034
00035 const int *ptr, const int *ind,
00036 const double *val,
00037
00038 const double *x, double *y, double *t);
00039
00040 extern SPMV_TBCSR_FP spmvTiledBlkCSRRoutines[];
00041
00042
00043
00044 extern void spmv_create_tiles_bcsr (const SparseMatrixBCSR * B,
00045 int num_iters, int num_tiles,
00046 SparseMatrixTiledBCSR * T);
00047
00048 extern void spmv_tiled_bcsr (const SparseMatrixTiledBCSR * A,
00049 const double *x, double *y, double *workspace);
00050
00051 extern void spmv_destroy_tiled_bcsr (SparseMatrixTiledBCSR * T);
00052
00053
00054 extern void spmv_save_rbtileinfo (const SparseMatrixTiledBCSR * T,
00055 const char *tileinfo);
00056 extern void spmv_read_rbtileinfo (const char *tileinfo,
00057 int *p_r, int *p_c, int *p_num_iters,
00058 int *p_num_tiles, int **p_iter_ptr,
00059 int **p_dest_ind);
00060
00061
00062
00063 #endif
00064
00065
00066
00067
00068
00069
00070
00071
00072