This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Intel _Quad type

Tags: None
(comma "," separated)
s_wan
Registered Member
Posts
1
Karma
0
OS

Intel _Quad type

Thu Jan 12, 2012 5:24 pm
Hello,

currently I wan to use Eigen for an adjustment program and quadruple precision is a formal requirement. The Intel compiler is avaliable and compiles programs using _Quad without problems when I am not using Eigen.

For example:
Eigen::Matrix< _Quad, 2, 2 > m;

results in a huge amount of errors. I checked out the example for adouble:
http://eigen.tuxfamily.org/dox-devel/To ... ScalarType

but I cannot figure out howto adapt it to the simple type _Quad. Has somebody already solved this?

Thanks in advance,
Sebastian
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Intel _Quad type

Sat Jan 14, 2012 7:48 am
In theory you should only have to specialize NumTraits assuming standard operators (*, +, -, /, sqrt, etc.) are defined on _Quad.

template<> struct NumTraits<_Quad>
{
typedef _Quad Real;
typedef _Quad NonInteger;
typedef _Quad Nested;

enum {
IsComplex = 0,
IsInteger = 0,
IsSigned = 1,
ReadCost = 2,
AddCost = 2,
MulCost = 2
};
};


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]