Boost logo

Ublas :

Subject: Re: [ublas] Bindings sync
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2008-11-12 13:58:42


Hi Andreas,

> There were a few changes that I couldn't make sense of.
> The diff containing the changes that puzzled me is at
> http://tiker.net/tmp/bindings-2008-11-12.diff.
> - It removes a 'utils.hpp' include from a few headers--was this intentional?

This was intentional. I wasn't aware of the purpose of detail/utils.hpp before. So after I became aware of its purpose, I decided to clean up the usage of "detail/utils.hpp".


> - It changes a few instances of
> static_cast<int>( workspace_query )
> to
> traits::detail::to_int( workspace_query )
> What's the deal here?

"detail/utils.hpp" contains code to support the workspace query (to_int overloaded for float, double, traits::complex_f and traits::complex_d), and code to support the conversion from (real_sequence,imag_sequence) to (cplx_sequence) and back (interlace/disentangle).

I was straightforward to change the workspace queries from "static_cast<int>(...)" and "static_cast<int>( traits::real(...) )" to "traits::detail::to_int(...)", so I did this directly. (I had written the code that used static_cast<int>, because I didn't know about to_int).

I also plan to use (interlace/disentangle) where it makes sense, but this change will be less straightforward.


> Other than these two, I'm happy to report that the diff I'm
> carrying has shrunk to just Vardan's gbsv and Jesse's gels* stuff.

Good to hear. So I should probably try to do something about gbsv and gels*. When this is done, I would like to change the type used to bind against fortran integer from "int" to a typedef like "integer_t", because "int" is not always the correct type on 64 platforms. However, I will discuss this issue in a separate mail.

Regards,
Thomas