Boost logo

Boost Users :

From: Zhang Le (ejoy_at_[hidden])
Date: 2003-05-10 05:14:01


hi,
    the following code generates a compile error raising from
     a macro in /ublas/traits.hpp:
    BOOST_STATIC_ASSERT ((boost::is_same<T1, T2>::value));

    Because I'm trying to prod on a vector of size_t and a matrix of unsigned
    char.

    Because I want to save memory (the matrix is really huge) and I
    know the value in m will never exceed 255. The expression is ok to
    me (of course the result value is size_t).
    But the ASSERT prevent me from doing this.

    Is there a workaround that permits me doing this kind of case without
    sacrificing the memory efficiency? Using size_t in the matrix will
    use three times more memory.

    ublas::vector<size_t> v1(5);
    matrix<unsigned char> m(5,5);
    prod(m,v1);

    the same problem arises when I do
    prod(m,v2); here v2 is a vector<double>

--
                                     Sincerely yours,
                                            Zhang Le

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net