|
Boost Users : |
From: John Maddock (jz.maddock_at_[hidden])
Date: 2020-02-04 10:56:54
On 03/02/2020 21:33, Alex.Durie via Boost-users wrote:
> Hi,
> I have written a short program utilising boost::float128 together with
> tux Eigen which successfully compiles and runs using g++, however it
> fails when I use icc.
> The compiler error is
>
> /home/alex/boost/boost_1_71_0/boost/multiprecision/float128.hpp(727):
> error: no suitable constructor exists to convert from "const _Quad" to
> "boost::multiprecision::number<boost::multiprecision::backends::float128_backend,
> boost::multiprecision::et_off>"
> static number_type (min)() BOOST_NOEXCEPT { return
> BOOST_MP_QUAD_MIN; }
> ^
> How can I resolve this?
I fear due to a lack of consistent testing support for the Intel
compiler, we may well have dropped the ball and broken support for
Intel's _Quad type.
The good news is that Intel on Linux does support GCC's __float128 type,
so my suggestion would be to:
* Remove the #define BOOST_MP_USE_QUAD
* Build with -std=gnu++14 rather than -std=c++14
* Remove the -Qoption,cpp,--extended_float_type option.
HTH, John.
>
> My example code is;
> #include <iostream>
> #include <cmath>
> #include <Eigen/Dense>
> #include <Eigen/Eigenvalues>
> #include <iomanip>
> #include <boost/cstdfloat.hpp>
> #include <boost/multiprecision/float128.hpp>
> #include <boost/math/special_functions.hpp>
> #include <boost/math/constants/constants.hpp>
> #include <quadmath.h>
> #define BOOST_MP_USE_QUAD
>
> using namespace Eigen;
> using namespace std;
>
> int main(){
> typedef Matrix<complex<boost::multiprecision::float128>, Dynamic,
> Dynamic> MatrixXcmp;
> MatrixXcmp C = MatrixXcmp::Random(8,8);
> cout<<setprecision(128)<<C<<endl<<endl;
> ComplexEigenSolver<MatrixXcmp> ces;
> ces.compute(C);
> return 0;
> }
>
> It only fails compilation when I put in the line 'ces.compute(C);'.
>
> I compile with
> icpc quadtest.cpp -std=c++14 -Qoption,cpp,--extended_float_type -O2
> -DMKL_LP64 -lmkl_intel_lp64 -fp-model precise -lmkl_sequential
> -lmkl_core -lpthread -lm -ldl -lquadmath
>
> Many thanks in advance,
>
> Alex
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net