1 #ifndef PARALLEL_UTILITY_H
2 #define PARALLEL_UTILITY_H
12 #ifndef OV_USE_OLD_STL_HEADERS
61 static int copy( intArray & dest, Index *
D,
62 const intArray & src, Index *
S,
int nd );
64 static int copy( floatArray & dest, Index *D,
65 const floatArray & src, Index *S,
int nd );
67 static int copy( doubleArray & dest, Index *D,
68 const doubleArray & src, Index *S,
int nd );
76 Index & I1, Index & I2, Index & I3,
77 int & n1a,
int & n1b,
int & n2a,
int & n2b,
int & n3a,
int & n3b,
81 Index & I1, Index & I2, Index & I3,
85 Index & I1, Index & I2, Index & I3, Index &I4,
86 int & n1a,
int & n1b,
int & n2a,
int & n2b,
int & n3a,
int & n3b,
int & n4a,
int & n4b,
90 Index & I1, Index & I2, Index & I3, Index & I4,
94 Index & I1, Index & I2, Index & I3,
95 int & n1a,
int & n1b,
int & n2a,
int & n2b,
int & n3a,
int & n3b,
99 Index & I1, Index & I2, Index & I3,
103 static int redistribute(
const intArray & u, intArray & v,
const Range & P);
104 static int redistribute(
const floatArray & u, floatArray & v,
const Range & P);
105 static int redistribute(
const doubleArray & u, doubleArray & v,
const Range & P);
108 static int redistribute(
const intArray & u, intSerialArray & v );
109 static int redistribute(
const floatArray & u, floatSerialArray & v );
110 static int redistribute(
const doubleArray & u, doubleSerialArray & v );
122 IndexBox(
int i1a,
int i1b,
int i2a=0,
int i2b=0,
int i3a=0,
int i3b=0,
int i4a=0,
int i4b=0);
125 inline int base(
int d)
const {
return ab[d][0];}
126 inline int bound(
int d)
const {
return ab[d][1];}
130 inline int bb(
int side,
int d)
const {
return ab[d][side];}
132 void setBounds(
int i1a,
int i1b,
int i2a=0,
int i2b=0,
int i3a=0,
int i3b=0,
int i4a=0,
int i4b=0);
155 floatSerialArray & vLocal );
159 doubleSerialArray & vLocal );
163 intSerialArray & vLocal );
166 static int copyArray( floatArray & dest, Index *
D,
167 const floatArray & src, Index *
S,
int nd=4 );
168 static int copyArray( doubleArray & dest, Index *D,
169 const doubleArray & src, Index *S,
int nd=4 );
170 static int copyArray( intArray & dest, Index *D,
171 const intArray & src, Index *S,
int nd=4 );
175 static int copyArray(
const floatSerialArray & uLocal,
177 const intSerialArray & uProcessorSet,
180 static int copyArray(
const doubleSerialArray & uLocal,
182 const intSerialArray & uProcessorSet,
185 static int copyArray(
const intSerialArray & uLocal,
187 const intSerialArray & uProcessorSet,
192 static int copyArray( floatSerialArray & dest,
int destProcessor, floatSerialArray & src,
int srcProcessor );
193 static int copyArray( doubleSerialArray & dest,
int destProcessor, doubleSerialArray & src,
int srcProcessor );
194 static int copyArray( intSerialArray & dest,
int destProcessor, intSerialArray & src,
int srcProcessor );
212 static void copyCoarseToFine(
const floatArray & uc,
const floatArray & uf, Index *Iv,
213 floatSerialArray & uc2,
int *ratio,
int *ghost);
215 static void copyCoarseToFine(
const doubleArray & uc,
const doubleArray & uf, Index *Iv,
216 doubleSerialArray & uc2,
int *ratio,
int *ghost);
218 static void copyCoarseToFine(
const intArray & uc,
const intArray & uf, Index *Iv,
219 intSerialArray & uc2,
int *ratio,
int *ghost);
222 static void getAggregateArray( floatSerialArray & u, Index *Iv, floatSerialArray & u0,
int p0);
223 static void getAggregateArray( doubleSerialArray & u, Index *Iv, doubleSerialArray & u0,
int p0);
224 static void getAggregateArray( intSerialArray & u, Index *Iv, intSerialArray & u0,
int p0);