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

Ref<> objects

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

Ref<> objects

Thu Feb 07, 2013 4:25 pm
Why seems the following code snippet not allowed by Eigen?

Code: Select all
void f1(Ref<ArrayXd> x, Ref<ArrayXd> a)
{
    x = 3*a;
    return;
}


When feeding two ArrayXd arrays, there is a compilation error occuring for the statement x = 3*a:

error: no viable conversion from
'const CwiseUnaryOp<internal::scalar_multiple_op<double>,
const Ref<Array<double, -1, 1, 0, -1, 1>, 0, InnerStride<1> > >' to
'const RefBase<Ref<Array<double, -1, 1, 0, -1, 1>, 0, InnerStride<1> > >'


Is it work in progress (Ref<> is not yet in a tagged release), or might it be a bug? Or do I misunderstand the usage of Ref<> objects... :)
GeorgeKnight
Registered Member
Posts
15
Karma
0

Re: Ref<> objects

Thu Feb 07, 2013 5:45 pm
This turned out to be work in progress, and has now been fixed in the developer branch. Thanks to Gaël!
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Ref<> objects

Thu Feb 07, 2013 5:46 pm
Same issue, please confirm it works now.


Bookmarks



Who is online

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