Permalink
Switch branches/tags
Nothing to show
Commits on Aug 16, 2011
Commits on Aug 14, 2011
  1. Merge pull request #44 from dsimcha/convenienceFuncs

    cristicbz committed Aug 14, 2011
    Convenience funcs
  2. Merge pull request #43 from dsimcha/copyFix

    cristicbz committed Aug 14, 2011
    Copy fix
Commits on Aug 13, 2011
  1. Add convenience functions for Matrix, Vector, ExternalVectorView. Whi…

    dsimcha committed Aug 13, 2011
    …le I was at it, I improved the documentation for all of these. I didn't bother with the packed matrix storage, at least not yet. I'll wait until these are more fleshed out.
  2. Fix Issue 34: Constructing Matrix!float from Matrix!double Fails. I d…

    dsimcha committed Aug 13, 2011
    …id this by allowing blas.copy, naive.copy, etc. to accept source and destination pointer types that aren't identical, i.e. double* and float*. Since BLAS only works with identical types, the non-identical case just forwards to the naive functions.
  3. Merge branch 'master' of github.com:cristicbz/scid

    cristicbz committed Aug 13, 2011
    Conflicts:
    	scid/vector.d
  4. Fixed issue 39.

    dsimcha committed Aug 13, 2011
Commits on Aug 12, 2011
Commits on Aug 11, 2011
  1. Fix trivial syntax error.

    dsimcha committed Aug 11, 2011
Commits on Aug 10, 2011
  1. Fixed Issue 29.

    cristicbz committed Aug 10, 2011
Commits on Aug 9, 2011
  1. Fixed Issue 28.

    cristicbz committed Aug 9, 2011
Commits on Aug 8, 2011
  1. Added ConstantStorage to support scalar-matrix and scalar-vector addi…

    cristicbz committed Aug 8, 2011
    …tion, subtraction and assignment. This means fixing Issue 26 and 27. Also fixed Issue 24 and Issue 25.
Commits on Aug 5, 2011
  1. Fixed Issue 24.

    cristicbz committed Aug 5, 2011
Commits on Aug 4, 2011
  1. Fix 64-bit support.

    dsimcha committed Aug 4, 2011
Commits on Aug 3, 2011
  1. Fixed issue 22. SliceProxy_ got broken at some point and had to fix i…

    cristicbz committed Aug 3, 2011
    …t, using .row() and .column() is probably still safer for now.
  2. Added ExternalMatrixView and ExternalVectorView. Tentative fix for Is…

    cristicbz committed Aug 3, 2011
    …sue 22. Added eval( expr, array ).
Commits on Aug 2, 2011
  1. 1. Added full support for matrix inversions ONLY for general matrices.

    cristicbz committed Aug 2, 2011
    This was the bulk of this commit, as it was very hard to get right, mostly because I had to work around LAPACK and also provide naive implementations for all the functions I use.
    Expressions are divided into these kinds:
    - X = inv(Y) * Z -> Y is LU decomposed and the problem is reduced to two triangular problems
    - X = inv(Y) * v -> The same as the one above, but simplified due to the fact v is a vector
    - X = inv(T)     -> Y is LU decomposed and the LU inverses are computed using matrix multiplications
    The LU decomposition in the naive implementation uses the Doolittle w/ pivoting algorithm (http://mymathlib.webtrellis.net/matrices/linearsystems/doolittle.html) this is very robust, works on any matrix and has complexity O(n^3).
    The expression X = inv(A) * inv(B) requires a temporary for one of the inversions.
    
    This addition introduced _a lot_ of complexity, and while it works on all unittests I came up with I would still use it with caution.
    
    2. Added naive implementations for lapack.getrs (general-matrix-solve), lapack.trtri (triangular-matrix-inverse), lapack.getri (general-matrix-inverse), lapack.getrf (LU-P decomposition), lapack.gesv (general-matrix-solve with decomposition incorporated), lapack.laswp (permutation-matrix-premultiplication), blas.trmv (triangular-matrix-vector-product), blas.gemv (general-matrix-vector-product). Added a LAPACK-like function xgetrs, that performs a general-matrix-solve with an added side parameter (similar to the side parameter from blas.trsm). This means both inv(A)*B and A*inv(B) can be performed.
    
    3. Changed transposition, side, diagonal etc. parameters from BLAS and LAPACK to template parameters. This allows for much simpler code in the naive implementations since one can place static-ifs inside loops, rather than add multiple copies of the loop for each if-branch.
    
    4. Haven't written a naive implementation for trsm (it's a very frustrating function to implement), but I've added a fallbackSolve function that computes Temp := inv(Y); X := Temp * Z; This way only lapack.trtri is used when using the nodeps flag, which is implemented.
    
    5. Added David's fix for Issue 20 and Issue 21.
    6. Fixed multiple bugs involving complex numbers.
    7. Added more tests for matrix operations based on result obtained from GNU Octave.
Commits on Jul 30, 2011
  1. Important Commit:

    cristicbz committed Jul 30, 2011
    1. Changed the way BLAS/LAPACK bindings works.
    There's now a module caled scid.blas that manages BLAS calls. If there is a library available then it binds the BLAS calls, if not, it provides a naive implementation of the function.
    The module also provides some BLAS-like functions that are useful, yet non-standard which have been dubbed Extended BLAS and begin with an x: xcopyc (conjugate-copy), xaxpyc(conjugate-axpy), xgecopy(general matrix copy), xgecopyc(general matrix conjugate-copy).
    scid.lapack will provide similar functionality for the LAPACK bindings, right now it's a stub that publicly imports the library LAPACK calls.
    For now, all the BLAS/LAPACK calls used by the library provide naive implementation, but two: general matrix solve and symmetric banded matrix-vector product.
    Compiling with -version=nodeps will force-use the naive implementations.
    
    
    2. Fixed the way complex numbers worked.
    Complex numbers weren't properly supported before-hand and a lot of operations didn't give correct results. This was due mainly to the fact that BLAS doesn't provide adequate support for it. With the new extended BLAS calls it was possible to fix all these problems.
    They've been tested fairly thoroughly, using results got from GNU Octave.
    
    3. Relaxed Storage concepts.
    Made the Vector and Matrix structs infer a lot more about their storage type so writing up a quick Storage type should be a lot easier. It's still not trivial, but for now it's good enough.
    
    4. Added diagonal matrices.
    DiagonalMatrix started as a test for the new Storage concepts, but ended up being a fully fledged type. Unlike other matrix types, it already provides all specializations possible, which means no operation involving it is uselessly slow.
    
    5. Relaxed the Scalar concept.
    Matrices and Vectors can now wrap any builtin numeric type. Of particular use real's can be used as element types. Since BLAS only works with floats and doubles, any types using other scalar types will default to the naive implementations provided by the new module.
    
    6. Fixed Issue 12 (Type fussiness). Doesn't work with complex types because to!() doesn't work from cdouble->double and etc.
    
    7. Fixed Issue 17 and Issue 18.
Commits on Jul 28, 2011
  1. Finished integrating RegionAllocator. Added two Container types (albe…

    cristicbz committed Jul 28, 2011
    …it not concept-compliant yet) ExternalArray and ExternalMatrix. These are meant to be wrapped by views. All storage types that can be an expression result (i.e. not views) may define a "Temporary" type which is used to store the temporary result of a subexpression.
    
    For ArrayStorage the type is ArrayStorageView!ExternalArray and for GeneralMatrix it's GeneralMatrixView!ExternalMatrix. For packed storages, the temporary is the PackedStorage!(ArrayAdapter!ExternalArray).
    To allow the array adapters to allow for both reference and value semantics depending on the container they use, their constructors had to be changed quite a bit.
    An intended side effect of this addition is that one can use Vector!(ArrayViewStorage!ExternalArray!double) (and similarly for matrices) to treat a builtin array as a vector supporting all operations that the library supports. This will be great for interoperability.
Commits on Jul 27, 2011
  1. Fixed a bug where packed matrices of cdouble didn't have promotions w…

    cristicbz committed Jul 27, 2011
    …ith cdouble. Some WIP regarding regionallocator - added new ExternalArrayView type, which is a VectorStorage-compliant wrapper around a builtin array. At construction it can be passed a length and an allocator, this will be the building block for temporaries.
Commits on Jul 26, 2011
  1. Fixed Issues 8 through 13. Added Promotion system to allow a general …

    cristicbz committed Jul 26, 2011
    …way of figuring out the result of an expression. Added some rudimentary support for matrix inversion - still some work to be done though.
Commits on Jul 25, 2011
  1. Solved some severe slicing issues. Added a demo file which gets compi…

    cristicbz committed Jul 25, 2011
    …led in with the option '-version=demo' or by passing the demo argument to the build script.
  2. Fixed Issue 7 and Issue 4.

    cristicbz committed Jul 25, 2011