Boost logo

Ublas :

Subject: Re: [ublas] [bindings] New traits system
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-01-19 13:13:19


Thomas Klimpel wrote:

> I agree that the assertion seems to be correct. What is strange is that
> "bindings::size_column(a)" return 4, also "a" is constructed as
>
> size_t n = 3;
> m4x4_t a (n, n);
>
> so I would expect "bindings::size_column(a)" to return 3. I noticed
> typedef ublas::c_matrix<double, 4, 4> m4x4_t;
> but I couldn't find any mention of ublas::c_matrix in the new traits
> system. The old traits system had an explicit binding for ublas::c_matrix.
> Perhaps...
>

Ublas traits should be in the same file as where ublas has defined
something, today I've added c_matrix to bindings/ublas/matrix.hpp (and
c_vector to vector.hpp). I see they have static strides, not sizes.
Corrected, now they return size 3, as expected. No more assertion failure.
However, we got ourselves a nice segfault in return... :-)

Cheers,

Rutger