ESScript  Revision_4488
Pattern.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15 
16 
17 /************************************************************************************/
18 
19 /* Paso: pattern */
20 
21 /************************************************************************************/
22 
23 /* Author: Lutz Gross, l.gross@uq.edu.au */
24 
25 /************************************************************************************/
26 
27 #ifndef INC_PASO_PATTERN
28 #define INC_PASO_PATTERN
29 
30 #include "Paso.h"
31 #include "IndexList.h"
32 
33 /************************************************************************************/
34 
35 typedef struct Paso_Pattern {
36  int type;
37  dim_t numOutput; /* Number of rows the ptr array [CSR] for CSC it's the number of cols*/
38  dim_t numInput; /* Number of cols [CSR] */
39  dim_t len; /* number of non-zeros */
40  index_t* ptr; /* ptr[n] to ptr[n+1] lists indices (in index) of non-zeros in row n*/
41  index_t* index; /* Non-major indices of non-zeros (in CSR this will be col numbers) */
42  index_t *main_iptr; /* pointer to main diagonal entry */
43  dim_t numColors; /* number of colors */
44  index_t* coloring; /* coloring index: input with the same color are not connected */
46 } Paso_Pattern;
47 
49 Paso_Pattern* Paso_Pattern_alloc(int type, dim_t numOutput, dim_t numInput, index_t* ptr, index_t* index);
50 
52 
55 
58 
60 int Paso_comparIndex(const void *,const void *);
61 
64 
67 
70 
72 void Paso_Pattern_mis(Paso_Pattern* pattern_p, index_t* mis_marker);
73 
76 
78 void Paso_Pattern_color(Paso_Pattern* patter, index_t* num_colors, index_t* colorOf);
80 
83 
86 
88 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);
89 
92 
95 
98 
99 #endif /* #ifndef INC_PASO_PATTERN */