Multiprecision vector pass to function by reference
Hi,
I am having some difficulties passing a vector of type std::vector<float128> to a function. I'm getting multiple errors out. The first few of which are:
tql2.cpp:13:50: error: 'float128' was not declared in this scope
void tql2(const int nm, int n, const std::vector<float128> & d, const std::vector<float128> & e, const std::vector< std::vector<float128> > & z, int ierr)
^
tql2.cpp:13:50: note: suggested alternative:
In file included from tql2.cpp:1:0:
/home/bcooper/Tarballs/boost_1_57_0/boost/multiprecision/float128.hpp:124:42: note: 'boost::multiprecision::float128'
typedef number
On 5/2/2016 8:46 AM, Cooper, Bridgette R D wrote:
Hi,
I am having some difficulties passing a vector of type std::vector<float128> to a function. I'm getting multiple errors out. The first few of which are:
*tql2.cpp:13:50:* *error: *‘*float128*’ was not declared in this scope
void tql2(const int nm, int n, const std::vector<float128> & d, const std::vector<float128> & e, const std::vector< std::vector<float128> > & z, int ierr)
* ^*
*tql2.cpp:13:50:* *note: *suggested alternative:
In file included from *tql2.cpp:1:0*:
*/home/bcooper/Tarballs/boost_1_57_0/boost/multiprecision/float128.hpp:124:42:* *note: * ‘*boost::multiprecision::float128*’
typedef number
float128; * ^*
*tql2.cpp:13:58:* *error: *template argument 1 is invalid
void tql2(const int nm, int n, const std::vector<float128> & d, const std::vector<float128> & e, const std::vector< std::vector<float128> > & z, int ierr)
* ^*
*tql2.cpp:13:58:* *error: *template argument 2 is invalid
*tql2.cpp:13:83:* *error: *‘*float128*’ was not declared in this scope
void tql2(const int nm, int n, const std::vector<float128> & d, const std::vector<float128> & e, const std::vector< std::vector<float128> > & z, int ierr)
* ^*
*tql2.cpp:13:83:* *note: *suggested alternative:
In file included from *tql2.cpp:1:0*:
*/home/bcooper/Tarballs/boost_1_57_0/boost/multiprecision/float128.hpp:124:42:* *note: * ‘*boost::multiprecision::float128*’
typedef number
float128; * ^*
* *
The first few lines of my code are:
#include
#include
#include
#include
#include
extern"C"{
#include
}
#include <iostream>
#include <vector>
#include <iterator>
voidtql2(constintnm, intn, conststd::vector<float128> & d, conststd::vector<float128> & e, conststd::vector< std::vector<float128>
& z, intierr)
{
using namespace boost::multiprecision;
...
}
Not sure where I am going wrong? Any advice?
Try moving the 'using namespace' line just after your header file includes.
participants (2)
-
Cooper, Bridgette R D
-
Edward Diener