Skip to content
Snippets Groups Projects
Commit c5aac757 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

activate multiprecision only if libquadmath present

parent 4192ec42
No related branches found
No related tags found
No related merge requests found
......@@ -119,6 +119,14 @@ if test x"$with_hdf5" = x"no"; then
fi
##########
## Check for quadmath
AC_CHECK_LIB(quadmath, sinq, [AC_DEFINE(HAVE_LIBQUADMATH,[],[Have quad math lib])
LIBQUADMATH=" -lquadmath "
], [])
####### include OpenFPM_numerics include path"
INCLUDES_PATH+=" -I/usr/local/include -I. -Iconfig -I../../openfpm_devices/src -I../../openfpm_data/src -I../../openfpm_io/src -I../../openfpm_vcluster/src -I../../src"
......@@ -311,6 +319,7 @@ AC_DEFINE([HAVE_MPI],[],[MPI Enabled])
AC_SUBST(NVCCFLAGS)
AC_SUBST(INCLUDES_PATH)
AC_SUBST(LIBQUADMATH)
# Checks for typedefs, structures, and compiler characteristics.
......
......@@ -9,7 +9,9 @@
#define OPENFPM_NUMERICS_SRC_PSE_KERNELS_UNIT_TESTS_HPP_
#include "PSE/Kernels_test_util.hpp"
#ifdef HAVE_LIBQUADMATH
#include <boost/multiprecision/float128.hpp>
#endif
BOOST_AUTO_TEST_SUITE( pse_kernels_unit_tests )
......@@ -36,11 +38,13 @@ BOOST_AUTO_TEST_CASE( pse_ker )
/////// Order 2 //////////////
#ifdef HAVE_LIBQUADMATH
PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,2>>(i,2,err);
y.last().add(err.linf_error);
PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,2>>(i,4,err);
y.last().add(err.linf_error);
#endif
PSE_test<double,Lap_PSE<1,double,2>>(i,2,err);
y.last().add(err.linf_error);
......@@ -56,6 +60,7 @@ BOOST_AUTO_TEST_CASE( pse_ker )
//////// Order 4 /////////////
#ifdef HAVE_LIBQUADMATH
PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,4>>(i,2,err);
y.last().add(err.linf_error);
......@@ -78,6 +83,8 @@ BOOST_AUTO_TEST_CASE( pse_ker )
PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,8>>(i,16,err);
y.last().add(err.linf_error);
#endif
}
// Check the result
......
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