/[escript]/branches/doubleplusgood/paso/src/Distribution.h
ViewVC logotype

Contents of /branches/doubleplusgood/paso/src/Distribution.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4257 - (show annotations)
Wed Feb 27 03:42:40 2013 UTC (6 years, 9 months ago) by jfenwick
File MIME type: text/plain
File size: 2596 byte(s)
Some simple experiments for c++ Finley

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: distribution */
20
21 /************************************************************************************/
22
23 /* Author: Lutz Gross, l.gross@uq.edu.au */
24
25 /************************************************************************************/
26
27 #ifndef INC_PASO_DISTRIBUTION
28 #define INC_PASO_DISTRIBUTION
29
30 #include "Common.h"
31 #include "esysUtils/Esys_MPI.h"
32
33 /****************************************************
34 describes the distribution of a vector stored
35 on the local process
36 ****************************************************/
37 struct Paso_Distribution
38 {
39 index_t *first_component; /* process i has nodes with global indices first_component[i+1] to first_component[i]. */
40 dim_t reference_counter;
41 Esys_MPIInfo *mpi_info;
42 };
43
44 typedef struct Paso_Distribution Paso_Distribution;
45
46 /***************************************
47 Function prototypes
48 **************************************/
49
50
51 PASO_DLL_API
52 Paso_Distribution* Paso_Distribution_alloc( Esys_MPIInfo *mpi_info, index_t* first_component, index_t m, index_t b);
53
54 PASO_DLL_API
55 void Paso_Distribution_free( Paso_Distribution *in );
56
57 PASO_DLL_API
58 Paso_Distribution* Paso_Distribution_getReference( Paso_Distribution *in );
59
60 PASO_DLL_API
61 index_t Paso_Distribution_getFirstComponent(Paso_Distribution *in );
62
63 PASO_DLL_API
64 index_t Paso_Distribution_getLastComponent(Paso_Distribution *in );
65
66 PASO_DLL_API
67 dim_t Paso_Distribution_getGlobalNumComponents(Paso_Distribution *in );
68
69 PASO_DLL_API
70 dim_t Paso_Distribution_getMyNumComponents(Paso_Distribution *in );
71
72 PASO_DLL_API
73 dim_t Paso_Distribution_getMinGlobalComponents(Paso_Distribution *in );
74
75 PASO_DLL_API
76 dim_t Paso_Distribution_getMaxGlobalComponents(Paso_Distribution *in );
77
78 PASO_DLL_API
79 double* Paso_Distribution_createRandomVector(Paso_Distribution *in, const dim_t block );
80
81 PASO_DLL_API
82 dim_t Paso_Distribution_numPositives(const double* x, const Paso_Distribution *in, const dim_t block );
83
84 #endif
85

  ViewVC Help
Powered by ViewVC 1.1.26