Boost logo

Ublas :

From: Karl Meerbergen (Karl.Meerbergen_at_[hidden])
Date: 2007-03-28 17:06:22


Hi,

The bindings do no longer compile since the functions one1 and one2 do
longer exist in the matrix functor_type. Can someone tell me whether
this still exists in another name?

Perhaps, it is a good idea to move the traits specializations for ublas
to the ublas repository to avoid this kind of situations in the future.

Best,

Karl

Quoting Manuel González Castro <iinmgc00_at_[hidden]>:
> Hi,
>
> my colleague Francisco is out of the office, so I will answer on
> behalf
> him:
>
> Karl Meerbergen wrote:
> > I checked the source code. The symbol copy is defined in
> > blas1_overload.hpp, but not in blas1.hpp.
> >
> > I recall that copy was not implemented because of the
> > availability of std::copy(), which should also work well.
> >
> > Do you really want to use blas::copy ?
>
> We use uBLAS as core for our multibody dynamics simulation software.
> Now
> we are comparing high-performance BLAS implementations (ATLAS,
> GotoBLAS,
> ACML, MKL) in terms of efficiency. The bindings helped us a lot: we
> can
> change the BLAS implementation transparently from uBLAS to others.
>
> The copy function is used in bottleneck code, and therefore we
> suspect
> than a fast BLAS implementation, which performs better than
> std::copy,
> can help us.
>
> Since detail::copy functions are already defined in
> blas1_overload.hpp,
> the problem can be solved by adding to blas1.hpp the following code
> for
> the "boost::numeric::bindings::blas::copy" function, it is very
> similar
> to "axpy" in the same file (line #37):
>
> ------------- start --------------
> // y <- x
> template < typename vector_type_x, typename vector_type_y >
> void copy(const vector_type_x &x, vector_type_y &y )
> {
> #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
> BOOST_STATIC_ASSERT( ( is_same< typename traits::vector_traits<
> vector_type_y >::value_type, typename traits::vector_traits<
> vector_type_x >::value_type >::value ) ) ;
> #else
> BOOST_STATIC_ASSERT( ( is_same< typename
> vector_type_y::value_type,
> typename vector_type_x::value_type >::value ) ) ;
> #endif
> assert( traits::vector_size( x ) == traits::vector_size( y ) ) ;
>
> const int n = traits::vector_size( x ) ;
> const int stride_x = traits::vector_stride( x ) ;
> const int stride_y = traits::vector_stride( y ) ;
> const value_type *x_ptr = traits::vector_storage( x ) ;
> value_type *y_ptr = traits::vector_storage( y ) ;
>
> detail::copy( n, x_ptr, stride_x, y_ptr, stride_y ) ;
> }
> ------------- end --------------
>
>
> Thanks,
> Manuel
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>