/[escript]/trunk/paso/src/SparseMatrix_MatrixVector.c
ViewVC logotype

Diff of /trunk/paso/src/SparseMatrix_MatrixVector.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1636 by phornby, Fri Jul 11 13:12:46 2008 UTC revision 1637 by ksteube, Mon Jul 14 05:34:59 2008 UTC
# Line 24  Line 24 
24  /**************************************************************/  /**************************************************************/
25    
26  #include "SparseMatrix.h"  #include "SparseMatrix.h"
27    #ifdef _OPENMP
28    #include <omp.h>
29    #endif
30    
31  /* CSC format with offset 0*/  /* CSC format with offset 0*/
32  void  Paso_SparseMatrix_MatrixVector_CSC_OFFSET0(double alpha,  void  Paso_SparseMatrix_MatrixVector_CSC_OFFSET0(double alpha,
# Line 258  void  Paso_SparseMatrix_MatrixVector_CSR Line 261  void  Paso_SparseMatrix_MatrixVector_CSR
261  {  {
262  /*#define PASO_DYNAMIC_SCHEDULING_MVM */  /*#define PASO_DYNAMIC_SCHEDULING_MVM */
263    
264  #if defined PASO_DYNAMIC_SCHEDULING_MVM && defined __OPENMP  #if defined PASO_DYNAMIC_SCHEDULING_MVM && defined _OPENMP
265  #define USE_DYNAMIC_SCHEDULING  #define USE_DYNAMIC_SCHEDULING
266  #endif  #endif
267    
268      char* chksz_chr=NULL;      char* chksz_chr=NULL;
269      dim_t chunk_size=1;      dim_t chunk_size=1;
270      dim_t nrow=A->numRows;      dim_t nrow=A->numRows;
271      dim_t np, len, rest, irow, local_n, p, n_chunks;      dim_t np=1, len, rest, irow, local_n, p, n_chunks;
272    #ifdef _OPENMP
273      np=omp_get_max_threads();      np=omp_get_max_threads();
274    #endif
275  #ifdef USE_DYNAMIC_SCHEDULING  #ifdef USE_DYNAMIC_SCHEDULING
276      chksz_chr=getenv("PASO_CHUNK_SIZE_MVM");      chksz_chr=getenv("PASO_CHUNK_SIZE_MVM");
277      if (chksz_chr!=NULL) sscanf(chksz_chr, "%d",&chunk_size);      if (chksz_chr!=NULL) sscanf(chksz_chr, "%d",&chunk_size);

Legend:
Removed from v.1636  
changed lines
  Added in v.1637

  ViewVC Help
Powered by ViewVC 1.1.26