octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: matrix type caching, triangualar and Cholesky solvers


From: David Bateman
Subject: Re: matrix type caching, triangualar and Cholesky solvers
Date: Sun, 30 Apr 2006 00:05:33 +0200
User-agent: Mozilla Thunderbird 1.0.6-7.6.20060mdk (X11/20050322)

David Bateman wrote:

>>What is the intended usage of the MatrixType::info function?  Why does
>>it use the warning handler?
>> 
>>
>>    
>>
>This is a reflection of the same thing for sparse matrices, where the
>spparams("spumoni",1) flag allows printing of what the code is doing
>during the solve. This is not fully active yet as I'm not sure what flag
>to use for the print of matrix solve information.
>
>One other point is that the MatrixType and SparseType should probably be
>combined, and the sparse_type and matrix_type methods in ov-base-mat.h
>and ov-base-sparse.h moved to ov.h as a single method. This will
>simplify code in matric_type.cc and avoid the dynamic_cast..
>  
>

Ok, here is a better version of this patch that combines the SparseType
and MatrixType classes into a single class, and creates a virtual
function matrix_type in octave_base_value to overcome the need of
dynamic casting to a type before calling the matrix_type function as in
the previous patch.

John, up to you if you want me to check it in, as it doesn't look like
it'll get any testing apart from my own till it is, check it in might at
least get some testing :-)

D.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary

2006-04-26  David Bateman  <address@hidden>

        * CMatrix.cc (zpotrf, zpocon, zpotrs, ztrcon, ztrtrs):
        External declaration of lapack triangular and Cholesky codes.
        (ComplexMatrix::utsolve, ComplexMatrix::ltsolve, 
        ComplexMatrix::fsolve): New private solver codes for
        upper, lower and LU/Cholesky solvers.
        (ComplexMatrix::solve): New versions for cached matrix
        type. Adapt old versions to call new versions
        * CMatrix.h (utsolve, ltsolve, fsolve): Declaration of
        new solvers.
        (solve): New versions for cached matrix type.
        * dMatrix.cc (dpotrf, dpocon, dpotrs, dtrcon, dtrtrs):
        External declaration of lapack triangular and Cholesky codes.
        (Matrix::utsolve, Matrix::ltsolve, 
        Matrix::fsolve): New private solver codes for
        upper, lower and LU/Cholesky solvers.
        (Matrix::solve): New versions for cached matrix
        type. Adapt old versions to call new versions
        * dMatrix.h (utsolve, ltsolve, fsolve): Declaration of
        new solvers.
        (solve): New versions for cached matrix type.
        * CSparse.cc: Replace all uses of SparseType with MatrixType.
        * CSparse.h: ditto.
        * dSparse.cc: ditto.
        * dSparse.h: ditto.
        * SparseCmplxCHOL.cc: ditto.
        * SparsedbleCHOL.cc: ditto.
        * sparse-dmsolve.cc: ditto.
        * SparseType.cc, SparseType.h: delete.
        * MatrixType.cc: New file for class to cache matrix type, based on
        old SparseType class but caching matrix and sparse types.
        * MatrixType.h: ditto.
        * Makefile.in (MATRIX_INC, MATRIX_SRC): Add MatrixType.h and
        MatrixType.cc respectively. Delete SparseType.h and SparseType.cc
        respectively.
        * mx-base.h: Include MatrixTye.h as header file.
        
2006-04-26  David Bateman  <address@hidden>

        * ov-base-mat.h: Add caching of matrix type, and code to supply
        and copy matrix type.
        * ov-bool-mat.h: Add caching to constructor.
        * ov-re-mat.h: ditto.
        * ov-cx-mat.h: ditto.
        * ov.cc: Add to the BoolMatrix, Matrix and the ComplexMatrix
        octave_value constructors, the ability to specify the matrix type.
        * ov.h: Adapt declaration of above constructors.
        (MatrixType matrix_type(void) const, MatrixType matrix_type (const
        MatrixType&)): New functions for probing and setting matrix type.
        * ov-base.cc (virtual MatrixType matrix_type(void) const, virtual
        MatrixType matrix_type (const MatrixType&)): New default functions
        for probing and setting matrix type.
        * ov-base.h  (virtual MatrixType matrix_type(void) const, virtual
        MatrixType matrix_type (const MatrixType&)): Declarations.
        * ov-base-sparse.h: Replace all uses of SparseType with
        MatrixType. Replace sparse_type function with matrix_type function.
        * ov-bool-sparse.h: Replace all uses of SparseType with MatrixType.
        * ov-cx-sparse.h: ditto.
        * ov-re-sparse.h: ditto.
        * sparse-xdiv.cc: ditto.
        * sparse-xdiv.h: ditto.
        * sparse-xpow.cc: ditto.
        * DLD-FUNCTIONS/luinc.cc: ditto.
        * DLD-FUNCTIONS/splu.cc: ditto.
        * xdiv.cc (xdiv, xleftdiv): Pass the matrix type, simplfy since
        the matrix solve function now calls lssolve if singular.
        * xdiv.h (xdvi, xleftdiv): Update the declarations
        * OPERATORS/op-cm-cm.cc, OPERATORS/op-cm-cs.cc,
        OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc,
        OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc, 
        OPERATORS/op-cs-cm.cc, OPERATORS/op-cs-m.cc,
        OPERATORS/op-m-cm.cc, OPERATORS/op-m-cs.cc, 
        OPERATORS/op-m-m.cc, OPERATORS/op-m-s.cc, 
        OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc, 
        OPERATORS/op-s-cm.cc, OPERATORS/op-s-m.cc, 
        OPERATORS/op-scm-cm.cc, OPERATORS/op-scm-m.cc, 
        OPERATORS/op-sm-cm.cc, OPERATORS/op-sm-m.cc: Update use of
        xdiv and xleftdiv functions to allow matrix type caching.
        * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Update to allow typing
         of Matrix, and ComplexMatrix types. Add new test code for this.

2006-04-26  David Bateman  <address@hidden>

        * lapack/dpocon.f, lapack/zpocon.f, lapack/dpotrs.f, 
        lapack/zpotrs.f, lapack/dtrcon.f, lapack/ztrcon.f,
        lapack/dtrtrs.f, lapack/ztrtrs.f: New files.

Attachment: patch.linalg-20060429.gz
Description: application/gzip


reply via email to

[Prev in Thread] Current Thread [Next in Thread]