Commit 113f4b48 authored by incardon's avatar incardon

General fixing of the installer + example

parent 3fdc8779
......@@ -411,7 +411,7 @@ fi
### Create example.mk
install_base=$(cat install_dir)
openmp_flags="$(cat openmp_flags) $(cat openfpm_flags)"
openmp_flags="$(cat openmp_flags)"
if [ -d "$i_dir/HDF5/lib" ]; then
hdf5_lib=$i_dir/HDF5/lib
......
......@@ -283,7 +283,7 @@ struct _max_: mgpu::maximum_t<red_type>
{};
template<unsigned int prp, template <typename> class op, typename vector_type>
auto reduce(vector_type & vd) -> typename std::remove_reference<decltype(vd.template getProp<prp>(0))>::type
auto reduce_local(vector_type & vd) -> typename std::remove_reference<decltype(vd.template getProp<prp>(0))>::type
{
typedef typename std::remove_reference<decltype(vd.template getProp<prp>(0))>::type reduce_type;
......
......@@ -736,20 +736,20 @@ BOOST_AUTO_TEST_CASE(vector_dist_reduce)
vd.template hostToDeviceProp<0,1,2,3>();
float redf = reduce<0,_add_>(vd);
double redd = reduce<1,_add_>(vd);
int redi = reduce<2,_add_>(vd);
size_t reds = reduce<3,_add_>(vd);
float redf = reduce_local<0,_add_>(vd);
double redd = reduce_local<1,_add_>(vd);
int redi = reduce_local<2,_add_>(vd);
size_t reds = reduce_local<3,_add_>(vd);
BOOST_REQUIRE_EQUAL(redf,(vd.size_local()+1.0)*(vd.size_local())/2.0);
BOOST_REQUIRE_EQUAL(redd,(vd.size_local()+1.0)*(vd.size_local())/2.0);
BOOST_REQUIRE_EQUAL(redi,(vd.size_local()+1)*(vd.size_local())/2);
BOOST_REQUIRE_EQUAL(reds,(vd.size_local()+1)*(vd.size_local())/2);
float redf2 = reduce<0,_max_>(vd);
double redd2 = reduce<1,_max_>(vd);
int redi2 = reduce<2,_max_>(vd);
size_t reds2 = reduce<3,_max_>(vd);
float redf2 = reduce_local<0,_max_>(vd);
double redd2 = reduce_local<1,_max_>(vd);
int redi2 = reduce_local<2,_max_>(vd);
size_t reds2 = reduce_local<3,_max_>(vd);
BOOST_REQUIRE_EQUAL(redf2,vd.size_local());
BOOST_REQUIRE_EQUAL(redd2,vd.size_local());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment