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

Extension of scalar

Tags: None
(comma "," separated)
rafaelguglielmetti
Registered Member
Posts
15
Karma
0
OS

Extension of scalar

Tue Jul 26, 2016 7:35 am
Hello,
I have a template Rational class (which I use to represesent fractions of different kinds). So for example I have:
Rational<RationalInteger> (the main value of a RationalInteger is a long int)
Rational<QuadraticInteger> (main value of a QuadraticInteger: two mpz_class from GMP)
Rational<RCyclotomic7Integer> (three mpz_class)

And I added a specialization of struct Eigen::NumTraits. My question is the following:
  • What is the impact of the ReadCost, AddCost, MulCost ?
  • How can I determine them? (at the moment I have values found in one example of the doc)

Thanks a lot.

Best
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Extension of scalar  Topic is solved

Tue Jul 26, 2016 8:35 am
If you use 3.3 (which is highly recommended for custom scalar types), just use Eigen::HugeCost meaning that the cost is large enough so that Eigen should not bother about unrolling.
rafaelguglielmetti
Registered Member
Posts
15
Karma
0
OS

Re: Extension of scalar

Tue Jul 26, 2016 9:12 am
I don't since it was indicated as beta but I will consider it.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Extension of scalar

Tue Jul 26, 2016 9:29 am
I expect a new release today or tomorrow....
rafaelguglielmetti
Registered Member
Posts
15
Karma
0
OS

Re: Extension of scalar

Tue Jul 26, 2016 9:35 am
Yeah, I just went to the bug tracker and saw that the only list bugs with 3.3 were related to the documentation...

Now that I'm here: is there a way I could help with Eigen?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Extension of scalar

Tue Jul 26, 2016 11:00 am
That depends how you're willing to help, skills and motivations ! There is a non exhaustive list of "junior-job" there: http://eigen.tuxfamily.org/bz/buglist.c ... t=advanced

but help is welcome on the documentation side. For instance, the page on custom scalar type is a bit outdated.
rafaelguglielmetti
Registered Member
Posts
15
Karma
0
OS

Re: Extension of scalar

Tue Jul 26, 2016 1:03 pm
It would be best if I start to help with the documentation (and this autumn, when by thesis is finished I may try to help with code as well).


Bookmarks



Who is online

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