Boost logo

Ublas :

From: Seabook (cipoke_at_[hidden])
Date: 2006-12-06 22:10:38


Hello Gunter,

I done it!

(1)compressed_matrix<float, column_major> * compressed_matrix<float,
    column_major>
(2)compressed_matrix<float, column_major> * matrix<float, column_major>
(3)compressed_matrix<float, column_major> * matrix<float, row_major>
(4)compressed_matrix<float, column_major> * symmetric_matrix<float, upper>
(5)compressed_matrix<float, column_major> * symmetric_matrix<float, lower>
(6) normal matrix * normal matrix
I do A[100,100]*B[100,100]=C[100,100] 20times.( using prod() )
Without assigning data to these matrixes.
The time seems reasonable.
     Debug Release (m sec)
(1) 219 79
(2) 422 93
(3) 250 110
(4) 188 109
(5) 172 109
(6) 351 157
If I assgin some data to these matrixed. (like this way)
        for(i=0;i<99;i++)
        {
                for(j=0;j<99;j++)
                {
                sp1(i,j)=0;
                sp2(i,j)=0;
                sy1(i,j)=0;
                sy1(i,j)=0;
                m4(i,j)=0;
                m5(i,j)=0;
                }
                sp1(i,j)=1;
                sp2(i,j)=1;
                sy1(i,j)=1;
                sy2(i,j)=1;
                m4(i,j)=1;
                m5(i,j)=1;
        }

    Release (m sec)
(1) 6437
(2) 7110
(3) 7187
(4) 6656
(5) 6641
(6) 157
It's really slow! (I assign data incorrectly ?)
I have no idea about this.

When I use axpy_prod(sp1,sp2,sp3,true) ,
This message will show on the operation.hpp
" error C2039: 'functor_type' : is not a member of
'boost::numeric::ublas::basic_full<>' "
I forget to use some .hpp files or operate incorrectly???

My question list:
1. Why will assigned matrixed run slowly?
2. Why could not I use axpy_prob function?
3. How to see the special matrix data by "watch"function ?
    (I don't know how to check the data )

Thanks for your patience.

Kuo-Shih

Gunter Winkler wrote:
>
>
>
> Reading your code I noticed that you do matrix-matrix-multiplications. It
> is
> no surprise that multiplication of full sparse matrices is much slower
> than
> multiplication of dense matrices, because the latter can be extremely
> optimized. The sparse algorithm wins over dense if the number of nonzeroes
> per row is small compared to the size. Although the overall times is quite
> high. On the other hand the orientation (row major vs. column major) is
> very
> important for sparse products
>
> Please try these operations and report the times.
> compressed_matrix<float, column_major> * compressed_matrix<float,
> column_major>
> compressed_matrix<float, column_major> * matrix<float, column_major>
> compressed_matrix<float, column_major> * matrix<float, row_major>
> compressed_matrix<float, column_major> * symmetric_matrix<float,
> column_major>
> compressed_matrix<float, column_major> * symmetric_matrix<float,
> row_major>
>
> please check whether C=prod(A,B) or axpy_prod(A,B,X,true) is faster.
>
> PS: you initialize sy1 twice (and do nothing with sy2)
>
> mfg
> Gunter
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>
>

-- 
View this message in context: http://www.nabble.com/Bad-prod-efficiency-of-sparse-symmetry-matrix---tf2766020.html#a7732822
Sent from the Boost - uBLAS mailing list archive at Nabble.com.