Skip to content
Snippets Groups Projects
Commit c2c2710a authored by Markus Blatt's avatar Markus Blatt
Browse files

Use full functions signature for clearness. Modifications were made for my last talk

[[Imported from SVN: r1735]]
parent 5b6a33a1
No related branches found
No related tags found
No related merge requests found
......@@ -19,11 +19,11 @@ template<typename T>
struct AddData {
typedef typename T::value_type IndexedType;
static double gather(const T& v, int i){
static const IndexedType& gather(const T& v, int i){
return v[i];
}
static void scatter(T& v, double item, int i){
static void scatter(T& v, const IndexedType& item, int i){
v[i]+=item;
}
};
......@@ -32,11 +32,11 @@ template<typename T>
struct CopyData {
typedef typename T::value_type IndexedType;
static double gather(const T& v, int i){
static const IndexedType& gather(const T& v, int i){
return v[i];
}
static void scatter(T& v, double item, int i){
static void scatter(T& v, const IndexedType& item, int i){
v[i]=item;
}
};
......@@ -127,7 +127,7 @@ void test()
//bCommRedist.forward<CopyData<Container> >(s,t);
// calculate on the redistributed array
doCalculations(t);
//bCommRedist.backward<AddData<Container> >(s,t);
bCommRedist.backward<AddData<Container> >(s,t);
}
#endif // HAVE_MPI
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment