The VisAO Camera
svbksb.h
1 //Solves A·X = B for a vector X, where A is specified by the arrays u[1..m][1..n], w[1..n],
2 //v[1..n][1..n] as returned by svdcmp. m and n are the dimensions of a, and will be equal for
3 //square matrices. b[1..m] is the input right-hand side. x[1..n] is the output solution vector.
4 //No input quantities are destroyed, so the routine may be called sequentially with different b’s.
5 
6 #include <stdlib.h>
7 
8 void preconditionU(double **u, double *w, int m, int n);
9 void preconditionU_F(float **u, float *w, int m, int n);
10 
11 void backsub_precond(double **u, double **v, int m, int n, double *b, double *x, double *_tmp);
12 void backsub_precond_F(float **u, float **v, int m, int n, float *b, float *x, float *_tmp);
13 
14 void backsub_precond_F_threads(float **u, float **v, int m, int n, float *b, float *x, float *tmp, int nthreads);