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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3312 - (hide annotations)
Tue Oct 26 07:54:58 2010 UTC (8 years, 11 months ago) by gross
File MIME type: text/plain
File size: 3030 byte(s)
last step for a clean up version of the AMG
1 ksteube 1313
2     /*******************************************************
3 ksteube 1811 *
4 jfenwick 2881 * Copyright (c) 2003-2010 by University of Queensland
5 ksteube 1811 * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7     *
8     * Primary Business: Queensland, Australia
9     * Licensed under the Open Software License version 3.0
10     * http://www.opensource.org/licenses/osl-3.0.php
11     *
12     *******************************************************/
13 ksteube 1313
14 ksteube 1811
15 ksteube 1313 /**************************************************************/
16    
17     /* Paso: pattern */
18    
19     /**************************************************************/
20    
21 jfenwick 2608 /* Author: Lutz Gross, l.gross@uq.edu.au */
22 ksteube 1313
23     /**************************************************************/
24    
25     #ifndef INC_PASO_PATTERN
26     #define INC_PASO_PATTERN
27    
28     #include "Common.h"
29 gross 3312 #include "Paso.h"
30 gross 3283 #include "IndexList.h"
31 ksteube 1313
32     /**************************************************************/
33    
34     typedef struct Paso_Pattern {
35     int type;
36 jfenwick 2965 dim_t numOutput; /* Number of rows the ptr array [CSR] for CSC it's the number of cols*/
37     dim_t numInput; /* Number of cols [CSR] */
38     dim_t len; /* number of non-zeros */
39     index_t* ptr; /* ptr[n] to ptr[n+1] lists indicies (in index) of non-zeros in row n*/
40     index_t* index; /* Non-major indicies of non-zeros (in CSR this will be col numbers) */
41 gross 3005 index_t *main_iptr; /* pointer to main diagonal entry */
42 gross 3094 dim_t numColors; /* number of colors */
43     index_t* coloring; /* coloring index: input with the same color are not connected */
44 ksteube 1313 dim_t reference_counter;
45     } Paso_Pattern;
46    
47 phornby 2071 PASO_DLL_API
48 gross 2551 Paso_Pattern* Paso_Pattern_alloc(int type, dim_t numOutput, dim_t numInput, index_t* ptr, index_t* index);
49 phornby 2071
50     PASO_DLL_API
51    
52     PASO_DLL_API
53 ksteube 1313 Paso_Pattern* Paso_Pattern_getReference(Paso_Pattern*);
54 phornby 2071
55     PASO_DLL_API
56 ksteube 1313 void Paso_Pattern_free(Paso_Pattern*);
57 phornby 2071
58     PASO_DLL_API
59 ksteube 1313 int Paso_comparIndex(const void *,const void *);
60 phornby 2071
61     PASO_DLL_API
62 ksteube 1313 Paso_Pattern* Paso_Pattern_unrollBlocks(Paso_Pattern*,int, dim_t,dim_t);
63 phornby 2071
64     PASO_DLL_API
65 ksteube 1313 Paso_Pattern* Paso_Pattern_getSubpattern(Paso_Pattern*,dim_t,dim_t,index_t*,index_t*);
66 phornby 2071
67     PASO_DLL_API
68 ksteube 1313 bool_t Paso_Pattern_isEmpty(Paso_Pattern* in);
69 phornby 2071
70     PASO_DLL_API
71 ksteube 1313 void Paso_Pattern_mis(Paso_Pattern* pattern_p, index_t* mis_marker);
72 phornby 2071
73     PASO_DLL_API
74 ksteube 1313 void Paso_Pattern_reduceBandwidth(Paso_Pattern* self,index_t* oldToNew);
75 phornby 2071
76     PASO_DLL_API
77 gross 1361 void Paso_Pattern_color(Paso_Pattern* patter, index_t* num_colors, index_t* colorOf);
78 artak 1881 Paso_Pattern* Paso_Pattern_multiply(int type, Paso_Pattern* A, Paso_Pattern* B);
79 phornby 2071
80     PASO_DLL_API
81 artak 1881 Paso_Pattern* Paso_Pattern_binop(int type, Paso_Pattern* A, Paso_Pattern* B);
82 ksteube 1313
83 gross 3005 PASO_DLL_API
84     index_t* Paso_Pattern_borrowMainDiagonalPointer(Paso_Pattern* A);
85 phornby 2071
86     PASO_DLL_API
87 gross 3283 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 phornby 2071
89     PASO_DLL_API
90 gross 3283 dim_t Paso_Pattern_getNumColors(Paso_Pattern* A);
91 phornby 2071
92     PASO_DLL_API
93 gross 3283 index_t* Paso_Pattern_borrowColoringPointer(Paso_Pattern* A);
94 phornby 2071
95     PASO_DLL_API
96 gross 3283 dim_t Paso_Pattern_maxDeg(Paso_Pattern* A);
97 phornby 2071
98 gross 3094 #endif /* #ifndef INC_PASO_PATTERN */

  ViewVC Help
Powered by ViewVC 1.1.26