Skip to content
Snippets Groups Projects
Unverified Commit 6a7a6385 authored by Steffen Seckler's avatar Steffen Seckler
Browse files

get

parent 35fd1f03
Branches
Tags
1 merge request!5introduce ALL_LB interface
Pipeline #21186 failed
...@@ -437,25 +437,25 @@ template <class T, class W> void ALL<T,W>::setup(ALL_LB_t method) ...@@ -437,25 +437,25 @@ template <class T, class W> void ALL<T,W>::setup(ALL_LB_t method)
{ {
case ALL_LB_t::TENSOR: case ALL_LB_t::TENSOR:
balancer.reset(new ALL_Tensor_LB<T,W>(dimension,work_array->at(0),gamma)); balancer.reset(new ALL_Tensor_LB<T,W>(dimension,work_array->at(0),gamma));
((ALL_Tensor_LB<T,W>&)*balancer).set_vertices(outline->data()); ((ALL_Tensor_LB<T,W>*)balancer.get())->set_vertices(outline->data());
break; break;
case ALL_LB_t::STAGGERED: case ALL_LB_t::STAGGERED:
balancer.reset(new ALL_Staggered_LB<T,W>(dimension,work_array->at(0),gamma)); balancer.reset(new ALL_Staggered_LB<T,W>(dimension,work_array->at(0),gamma));
((ALL_Staggered_LB<T,W>&)*balancer).set_vertices(outline->data()); ((ALL_Staggered_LB<T,W>*)balancer.get())->set_vertices(outline->data());
break; break;
case ALL_LB_t::UNSTRUCTURED: case ALL_LB_t::UNSTRUCTURED:
balancer.reset(new ALL_Unstructured_LB<T,W>(dimension,work_array->at(0),gamma)); balancer.reset(new ALL_Unstructured_LB<T,W>(dimension,work_array->at(0),gamma));
((ALL_Unstructured_LB<T,W>&)*balancer).set_vertices(vertices); ((ALL_Unstructured_LB<T,W>*)balancer.get())->set_vertices(vertices);
break; break;
case ALL_LB_t::VORONOI: case ALL_LB_t::VORONOI:
#ifdef ALL_VORONOI #ifdef ALL_VORONOI
balancer.reset(new ALL_Voronoi_LB<T,W>(dimension,work_array->at(0),gamma)); balancer.reset(new ALL_Voronoi_LB<T,W>(dimension,work_array->at(0),gamma));
((ALL_Voronoi_LB<T,W>&)*balancer).set_vertices(vertices); ((ALL_Voronoi_LB<T,W>*)balancer.get())->set_vertices(vertices);
#endif #endif
break; break;
case ALL_LB_t::HISTOGRAM: case ALL_LB_t::HISTOGRAM:
balancer.reset(new ALL_Histogram_LB<T,W>(dimension,work_array,gamma)); balancer.reset(new ALL_Histogram_LB<T,W>(dimension,work_array,gamma));
((ALL_Histogram_LB<T,W>&)*balancer).set_vertices(outline->data()); ((ALL_Histogram_LB<T,W>*)balancer.get())->set_vertices(outline->data());
break; break;
default: default:
throw ALL_Invalid_Argument_Exception( throw ALL_Invalid_Argument_Exception(
...@@ -758,11 +758,11 @@ template <class T, class W> void ALL<T,W>::set_sys_size(ALL_LB_t method, std::ve ...@@ -758,11 +758,11 @@ template <class T, class W> void ALL<T,W>::set_sys_size(ALL_LB_t method, std::ve
break; break;
case ALL_LB_t::VORONOI: case ALL_LB_t::VORONOI:
#ifdef ALL_VORONOI #ifdef ALL_VORONOI
((ALL_Voronoi_LB<T,W>*)balancer)->set_sys_size(s_size); ((ALL_Voronoi_LB<T,W>*)balancer.get())->set_sys_size(s_size);
#endif #endif
break; break;
case ALL_LB_t::HISTOGRAM: case ALL_LB_t::HISTOGRAM:
((ALL_Histogram_LB<T,W>*)balancer)->set_sys_size(s_size); ((ALL_Histogram_LB<T,W>*)balancer.get())->set_sys_size(s_size);
break; break;
default: default:
throw ALL_Invalid_Argument_Exception( throw ALL_Invalid_Argument_Exception(
...@@ -790,7 +790,7 @@ template <class T, class W> void ALL<T,W>::set_method_data(ALL_LB_t method, void ...@@ -790,7 +790,7 @@ template <class T, class W> void ALL<T,W>::set_method_data(ALL_LB_t method, void
break; break;
#endif #endif
case ALL_LB_t::HISTOGRAM: case ALL_LB_t::HISTOGRAM:
((ALL_Histogram_LB<T,W>*)balancer)->set_data(data); ((ALL_Histogram_LB<T,W>*)balancer.get())->set_data(data);
break; break;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment