From 113f4b48aa80b30add5dde3c7d14795dd50e6960 Mon Sep 17 00:00:00 2001 From: Pietro Incardona <incardon@mpi-cbg.de> Date: Tue, 11 Dec 2018 15:52:51 +0100 Subject: [PATCH] General fixing of the installer + example --- install | 2 +- src/Vector/cuda/vector_dist_cuda_funcs.cuh | 2 +- src/Vector/cuda/vector_dist_gpu_unit_tests.cu | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/install b/install index 01d711300..2d3eb3ccd 100755 --- a/install +++ b/install @@ -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 diff --git a/src/Vector/cuda/vector_dist_cuda_funcs.cuh b/src/Vector/cuda/vector_dist_cuda_funcs.cuh index cb10baa4c..76a52e480 100644 --- a/src/Vector/cuda/vector_dist_cuda_funcs.cuh +++ b/src/Vector/cuda/vector_dist_cuda_funcs.cuh @@ -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; diff --git a/src/Vector/cuda/vector_dist_gpu_unit_tests.cu b/src/Vector/cuda/vector_dist_gpu_unit_tests.cu index 2be62fa23..8bb80a1e3 100644 --- a/src/Vector/cuda/vector_dist_gpu_unit_tests.cu +++ b/src/Vector/cuda/vector_dist_gpu_unit_tests.cu @@ -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()); -- GitLab