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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1736 - (show annotations)
Fri Aug 29 02:23:16 2008 UTC (10 years, 9 months ago) by gross
File MIME type: text/plain
File size: 2187 byte(s)
This fixes a problem which is typically arising when using reduced order
with MPI and a "small" number of elements per processor. In this case it
can happen that the couple matrix is not using all entries sent to the
processor. The old implementations assumed that the indices will cover
the entire input. This assumption has been removed.


1
2 /* $Id: Pattern.h 1306 2007-09-18 05:51:09Z ksteube $ */
3
4 /*******************************************************
5 *
6 * Copyright 2003-2007 by ACceSS MNRF
7 * Copyright 2007 by University of Queensland
8 *
9 * http://esscc.uq.edu.au
10 * Primary Business: Queensland, Australia
11 * Licensed under the Open Software License version 3.0
12 * http://www.opensource.org/licenses/osl-3.0.php
13 *
14 *******************************************************/
15
16 /**************************************************************/
17
18 /* Paso: pattern */
19
20 /**************************************************************/
21
22 /* Author: gross@access.edu.au */
23
24 /**************************************************************/
25
26 #ifndef INC_PASO_PATTERN
27 #define INC_PASO_PATTERN
28
29 #include "Common.h"
30
31 /**************************************************************/
32
33 #define PATTERN_FORMAT_DEFAULT 0
34 #define PATTERN_FORMAT_SYM 1
35 #define PATTERN_FORMAT_OFFSET1 2
36
37 typedef struct Paso_Pattern {
38 int type;
39 dim_t numOutput;
40 dim_t numInput;
41 dim_t input_block_size; /* logical block size in the input */
42 dim_t output_block_size; /* logical block size in the output */
43 dim_t block_size; /* = input_block_size * output_block_size */
44
45 dim_t len;
46 index_t* ptr;
47 index_t* index;
48 dim_t reference_counter;
49 } Paso_Pattern;
50
51 /* interfaces: */
52
53 Paso_Pattern* Paso_Pattern_alloc(int type, dim_t input_block_size, dim_t output_block_size, dim_t numOutput, dim_t numInput, index_t* ptr, index_t* index);
54 Paso_Pattern* Paso_Pattern_getReference(Paso_Pattern*);
55 void Paso_Pattern_free(Paso_Pattern*);
56 int Paso_comparIndex(const void *,const void *);
57 Paso_Pattern* Paso_Pattern_unrollBlocks(Paso_Pattern*,int, dim_t,dim_t);
58 Paso_Pattern* Paso_Pattern_getSubpattern(Paso_Pattern*,dim_t,dim_t,index_t*,index_t*);
59 bool_t Paso_Pattern_isEmpty(Paso_Pattern* in);
60 void Paso_Pattern_mis(Paso_Pattern* pattern_p, index_t* mis_marker);
61 void Paso_Pattern_reduceBandwidth(Paso_Pattern* self,index_t* oldToNew);
62 void Paso_Pattern_color(Paso_Pattern* patter, index_t* num_colors, index_t* colorOf);
63
64 #endif /* #ifndef INC_PASO_SYSTEMPATTERN */

  ViewVC Help
Powered by ViewVC 1.1.26