Registered Member
|
Hi,
I am trying to get Eigen to work with the _Quad quadruple precision type provided by the intel compiler. I have used the basic definition for the NumTraits file that was posted about a year ago, but it is not sufficient because of various reasons. I am not sure, which information I have to provide and where I can find it. For now, the errors suggest that I need to define an epsilon and tell Eigen which math functions it should use. I have the following NumTraits definition:
but I still get errors like the following:
Also, how do I go about defining an ostream for this class? I would be very grateful if you could help me out! |
Moderator
|
Regarding NumTraits<> itself, it is documented there: http://eigen.tuxfamily.org/dox-devel/st ... raits.html
Your version is missing a few functions. Then, your type must support standard operators (+, -, *, etc.) as well as standard functions (abs, sqrt, etc.). If Intel does not provide such functions, then you have to implement them in the same namespace than _Quad. |
Registered Member
|
Thanks for your answer! I have looked up the epsilon value, which is 2^ -113. I am still having trouble with the definition of the fuzzy epsilon and the highest and lowest functions. Should the last two return values of type _Quad? In the example http://eigen.tuxfamily.org/dox-devel/TopicCustomizingEigen.html I have read, these things are already taken care of.
Regarding the missing function definitions, I have not yet written all of them down, because Eigen still can't seem to find the abs function although it is defined in three different ways and I am pretty sure that there is no namespace _Quad - I just added it for trial and error. Do you have any clue why abs is not found? |
Moderator
|
What if you try:
and
?? (btw, which Eigen version are you using?) |
Registered Member
|
Hi! For the first:
and the second:
and then if I use __fabsq, it works fine. I am running 3.1.2 |
Moderator
|
You must define:
and the others (e.g., sqrt) in your QuadSupport header file. |
Registered Member
|
That's what I did (see my first post) which is why I am surprised that it doesn't work.
|
Moderator
|
Please, make sure your abs function is not in Eigen's namespace.
The following must work:
|
Registered Member
|
Yes this does work. I am not sure if I explained myself well. In my first post, I showed you my definition of NumTraits and I defined three sample functions in three different namespaces, as was done for the adouble type. These functions are defined just like you defined them in your last post but they still can't seem to be found in the compile process.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]