/[escript]/trunk/paso/src/Pattern.h
ViewVC logotype

Diff of /trunk/paso/src/Pattern.h

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

revision 2881 by jfenwick, Thu Jan 28 02:03:15 2010 UTC revision 3312 by gross, Tue Oct 26 07:54:58 2010 UTC
# Line 26  Line 26 
26  #define INC_PASO_PATTERN  #define INC_PASO_PATTERN
27    
28  #include "Common.h"  #include "Common.h"
29    #include "Paso.h"
30    #include "IndexList.h"
31    
32  /**************************************************************/  /**************************************************************/
33    
 #define PATTERN_FORMAT_DEFAULT 0  
 #define PATTERN_FORMAT_SYM 1  
 #define PATTERN_FORMAT_OFFSET1 2  
   
34  typedef struct Paso_Pattern {  typedef struct Paso_Pattern {
35    int type;    int type;
36    dim_t numOutput;    dim_t numOutput;  /* Number of rows the ptr array [CSR] for CSC it's the number of cols*/
37    dim_t numInput;    dim_t numInput;   /* Number of cols [CSR] */
38    dim_t len;    dim_t len;        /* number of non-zeros */
39    index_t* ptr;    index_t* ptr;     /* ptr[n] to ptr[n+1] lists indicies (in index) of non-zeros in row n*/
40    index_t* index;    index_t* index;   /* Non-major indicies of non-zeros (in CSR this will be col numbers) */
41      index_t *main_iptr;  /* pointer to main diagonal entry */
42      dim_t numColors;    /* number of colors */
43      index_t* coloring;     /* coloring index: input with the same color are not connected */
44    dim_t reference_counter;    dim_t reference_counter;
45  } Paso_Pattern;  } Paso_Pattern;
46    
 #define INDEXLIST_LENGTH 85  
   
 typedef struct Paso_IndexList {  
   index_t index[INDEXLIST_LENGTH];  
   dim_t n;  
   struct Paso_IndexList *extension;  
 } Paso_IndexList;  
 /*  interfaces: */  
   
   
47  PASO_DLL_API  PASO_DLL_API
48  Paso_Pattern* Paso_Pattern_alloc(int type, dim_t numOutput, dim_t numInput, index_t* ptr, index_t* index);  Paso_Pattern* Paso_Pattern_alloc(int type, dim_t numOutput, dim_t numInput, index_t* ptr, index_t* index);
49    
# Line 89  Paso_Pattern* Paso_Pattern_multiply(int Line 80  Paso_Pattern* Paso_Pattern_multiply(int
80  PASO_DLL_API  PASO_DLL_API
81  Paso_Pattern* Paso_Pattern_binop(int type, Paso_Pattern* A, Paso_Pattern* B);  Paso_Pattern* Paso_Pattern_binop(int type, Paso_Pattern* A, Paso_Pattern* B);
82    
   
83  PASO_DLL_API  PASO_DLL_API
84  void Paso_IndexList_insertIndex(Paso_IndexList*, index_t);  index_t* Paso_Pattern_borrowMainDiagonalPointer(Paso_Pattern* A);
85    
86  PASO_DLL_API  PASO_DLL_API
87  void Paso_IndexList_toArray(Paso_IndexList*, index_t*, index_t, index_t, index_t);  Paso_Pattern* Paso_Pattern_fromIndexListArray(dim_t n0, Paso_IndexListArray* index_list_array,index_t range_min,index_t range_max, index_t index_offset);
88    
89  PASO_DLL_API  PASO_DLL_API
90  dim_t Paso_IndexList_count(Paso_IndexList*,  index_t, index_t);  dim_t Paso_Pattern_getNumColors(Paso_Pattern* A);
91    
92  PASO_DLL_API  PASO_DLL_API
93  void Paso_IndexList_free(Paso_IndexList*);  index_t* Paso_Pattern_borrowColoringPointer(Paso_Pattern* A);
94    
95  PASO_DLL_API  PASO_DLL_API
96  Paso_Pattern* Paso_IndexList_createPattern(dim_t n0, dim_t n,Paso_IndexList* index_list,index_t range_min,index_t range_max, index_t index_offset);  dim_t Paso_Pattern_maxDeg(Paso_Pattern* A);
97    
98  #endif /* #ifndef INC_PASO_SYSTEMPATTERN */  #endif /* #ifndef INC_PASO_PATTERN */

Legend:
Removed from v.2881  
changed lines
  Added in v.3312

  ViewVC Help
Powered by ViewVC 1.1.26