~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to extern/eltopo/common/matlapack.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef MATLAPACK_H
 
2
#define MATLAPACK_H
 
3
 
 
4
#include "lapack_wrapper.h"
 
5
#include "mat.h"
 
6
 
 
7
template<unsigned int M, unsigned int N, class T>
 
8
void invert(Mat<M,N,T>& matrix) {
 
9
        assert(M==N);
 
10
    static int ipiv[M];
 
11
        static T work[M];
 
12
        int lwork = M;
 
13
        int info;
 
14
    
 
15
        LAPACK::invert_general_matrix(M, matrix.a, M, ipiv, info);
 
16
}
 
17
 
 
18
 
 
19
template<unsigned int M, unsigned int N, class T>
 
20
void least_squares(Mat<M,N,T>&matrix, Vec<M,T>&rhs) {
 
21
    int info = 0;
 
22
    LAPACK::solve_least_squares('N', M, N, 1, matrix.a, M, rhs.v, max(M,N), info);
 
23
}
 
24
#endif