Boost logo

Boost Users :

From: Alex.Durie (alex.durie_at_[hidden])
Date: 2020-02-03 21:33:13


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?

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 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