Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning #62

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ target/
# svn
.svn

# visual studio conf
.vscode

# coverage
.coverage
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.associations": {
"meminfo.h": "c"
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not add vscode config files in github
Add .vscode in gitignore

45 changes: 12 additions & 33 deletions src/cpp/meschach/mesch12a/src/bdfactor.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ static char rcsid[] = "$Id: ";
in one column are now also in one column
*/

BAND *bd_get(lb,ub,n)
int lb, ub, n;
BAND *bd_get(int lb, int ub, int n)
{
BAND *A;

Expand All @@ -70,8 +69,7 @@ int lb, ub, n;
return A;
}

int bd_free(A)
BAND *A;
int bd_free(BAND *A)
{
if ( A == (BAND *)NULL || A->lb < 0 || A->ub < 0 )
/* don't trust it */
Expand All @@ -91,9 +89,7 @@ BAND *A;

/* resize band matrix */

BAND *bd_resize(A,new_lb,new_ub,new_n)
BAND *A;
int new_lb,new_ub,new_n;
BAND *bd_resize(BAND *A, int new_lb, int new_ub, int new_n)
{
int lb,ub,i,j,l,shift,umin;
Real **Av;
Expand Down Expand Up @@ -152,8 +148,7 @@ int new_lb,new_ub,new_n;



BAND *bd_copy(A,B)
BAND *A,*B;
BAND *bd_copy(BAND *A, BAND *B)
{
int lb,ub,i,j,n;

Expand Down Expand Up @@ -183,9 +178,7 @@ BAND *A,*B;


/* copy band matrix to a square matrix */
MAT *band2mat(bA,A)
BAND *bA;
MAT *A;
MAT *band2mat(BAND *bA, MAT *A)
{
int i,j,l,n,n1;
int lb, ub;
Expand Down Expand Up @@ -214,10 +207,7 @@ MAT *A;

/* copy a square matrix to a band matrix with
lb subdiagonals and ub superdiagonals */
BAND *mat2band(A,lb,ub,bA)
BAND *bA;
MAT *A;
int lb, ub;
BAND *mat2band(MAT *A, int lb, int ub, BAND *bA)
{
int i, j, l, n1;
Real **bmat;
Expand Down Expand Up @@ -249,8 +239,7 @@ int lb, ub;
can be done in situ
*/

BAND *bd_transp(in,out)
BAND *in, *out;
BAND *bd_transp(BAND *in, BAND *out)
{
int i, j, jj, l, k, lb, ub, lub, n, n1;
int in_situ;
Expand Down Expand Up @@ -362,9 +351,7 @@ BAND *in, *out;
Matrix U is permuted, whereas L is not permuted !!!
Therefore we save some memory.
*/
BAND *bdLUfactor(bA,pivot)
BAND *bA;
PERM *pivot;
BAND *bdLUfactor(BAND *bA, PERM *pivot)
{
int i, j, k, l, n, n1, lb, ub, lub, k_end, k_lub;
int i_max, shift;
Expand Down Expand Up @@ -445,10 +432,7 @@ PERM *pivot;

/* bdLUsolve -- given an LU factorisation in bA, solve bA*x=b */
/* pivot is changed upon return */
VEC *bdLUsolve(bA,pivot,b,x)
BAND *bA;
PERM *pivot;
VEC *b,*x;
VEC *bdLUsolve(BAND *bA, PERM *pivot, VEC *b, VEC *x)
{
int i,j,l,n,n1,pi,lb,ub,jmin, maxj;
Real c;
Expand Down Expand Up @@ -503,8 +487,7 @@ VEC *b,*x;
so it is possible to set A->ub = 0
*/

BAND *bdLDLfactor(A)
BAND *A;
BAND *bdLDLfactor(BAND *A)
{
int i,j,k,n,n1,lb,ki,jk,ji,lbkm,lbkp;
Real **Av;
Expand Down Expand Up @@ -550,9 +533,7 @@ BAND *A;

/* solve A*x = b, where A is factorized by
Choleski LDL^T factorization */
VEC *bdLDLsolve(A,b,x)
BAND *A;
VEC *b, *x;
VEC *bdLDLsolve(BAND *A, VEC *b, VEC *x)
{
int i,j,l,n,n1,lb,ilb;
Real **Av, *Avlb;
Expand Down Expand Up @@ -609,9 +590,7 @@ VEC *b, *x;
* may not work in situ (x != out)
*/

VEC *bd_mv_mlt(A, x, out)
BAND *A;
VEC *x, *out;
VEC *bd_mv_mlt(BAND *A, VEC *x, VEC *out)
{
int i, j, j_end, k;
int start_idx, end_idx;
Expand Down
18 changes: 6 additions & 12 deletions src/cpp/meschach/mesch12a/src/bkpfacto.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,13 @@ static char rcsid[] = "$Id: bkpfacto.c,v 1.7 1994/01/13 05:45:50 des Exp $";
#define alpha 0.6403882032022076 /* = (1+sqrt(17))/8 */

/* sqr -- returns square of x -- utility function */
double sqr(x)
double x;
double sqr(double x)
{ return x*x; }

/* interchange -- a row/column swap routine */
static void interchange(A,i,j)
MAT *A; /* assumed != NULL & also SQUARE */
int i, j; /* assumed in range */
static void interchange(MAT *A, int i, int j)
//MAT *A; /* assumed != NULL & also SQUARE */
//int i, j; /* assumed in range */
{
Real **A_me, tmp;
int k, n;
Expand Down Expand Up @@ -99,9 +98,7 @@ int i, j; /* assumed in range */
P is a permutation matrix, M lower triangular and D is block
diagonal with blocks of size 1 or 2
-- P is stored in pivot; blocks[i]==i iff D[i][i] is a block */
MAT *BKPfactor(A,pivot,blocks)
MAT *A;
PERM *pivot, *blocks;
MAT *BKPfactor(MAT *A,PERM *pivot, PERM *blocks)
{
int i, j, k, n, onebyone, r;
Real **A_me, aii, aip1, aip1i, lambda, sigma, tmp;
Expand Down Expand Up @@ -224,10 +221,7 @@ PERM *pivot, *blocks;

/* BKPsolve -- solves A.x = b where A has been factored a la BKPfactor()
-- returns x, which is created if NULL */
VEC *BKPsolve(A,pivot,block,b,x)
MAT *A;
PERM *pivot, *block;
VEC *b, *x;
VEC *BKPsolve(MAT *A, PERM *pivot, PERM *block, VEC *b, VEC *x)
{
static VEC *tmp=VNULL; /* dummy storage needed */
int i, j, n, onebyone;
Expand Down
3 changes: 1 addition & 2 deletions src/cpp/meschach/mesch12a/src/fmacheps.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@

#include <stdio.h>

double fclean(x)
double x;
double fclean(double x)
{
static float y;
y = x;
Expand Down
37 changes: 12 additions & 25 deletions src/cpp/meschach/mesch12a/src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ static char rcsid[] = "$Id: init.c,v 1.6 1994/01/13 05:36:58 des Exp $";
#include "matrix.h"

/* v_zero -- zero the vector x */
VEC *v_zero(x)
VEC *x;
VEC *v_zero(VEC *x)
{
if ( x == VNULL )
error(E_NULL,"v_zero");
Expand All @@ -51,8 +50,7 @@ VEC *x;


/* iv_zero -- zero the vector ix */
IVEC *iv_zero(ix)
IVEC *ix;
IVEC *iv_zero(IVEC *ix)
{
int i;

Expand All @@ -67,8 +65,7 @@ IVEC *ix;


/* m_zero -- zero the matrix A */
MAT *m_zero(A)
MAT *A;
MAT *m_zero(MAT *A)
{
int i, A_m, A_n;
Real **A_me;
Expand All @@ -87,8 +84,7 @@ MAT *A;

/* mat_id -- set A to being closest to identity matrix as possible
-- i.e. A[i][j] == 1 if i == j and 0 otherwise */
MAT *m_ident(A)
MAT *A;
MAT *m_ident(MAT *A)
{
int i, size;

Expand All @@ -104,8 +100,7 @@ MAT *A;
}

/* px_ident -- set px to identity permutation */
PERM *px_ident(px)
PERM *px;
PERM *px_ident(PERM *px)
{
int i, px_size;
u_int *px_pe;
Expand Down Expand Up @@ -167,9 +162,7 @@ double mrand()
}

/* mrandlist -- fills the array a[] with len random numbers */
void mrandlist(a, len)
Real a[];
int len;
void mrandlist(Real a[], int len)
{
int i;
long lval;
Expand All @@ -194,8 +187,7 @@ int len;


/* smrand -- set seed for mrand() */
void smrand(seed)
int seed;
void smrand(int seed)
{
int i;

Expand All @@ -216,8 +208,7 @@ int seed;

/* v_rand -- initialises x to be a random vector, components
independently & uniformly ditributed between 0 and 1 */
VEC *v_rand(x)
VEC *x;
VEC *v_rand(VEC *x)
{
/* int i; */

Expand All @@ -234,8 +225,7 @@ VEC *x;

/* m_rand -- initialises A to be a random vector, components
independently & uniformly distributed between 0 and 1 */
MAT *m_rand(A)
MAT *A;
MAT *m_rand(MAT *A)
{
int i /* , j */;

Expand All @@ -252,8 +242,7 @@ MAT *A;
}

/* v_ones -- fills x with one's */
VEC *v_ones(x)
VEC *x;
VEC *v_ones(VEC *x)
{
int i;

Expand All @@ -267,8 +256,7 @@ VEC *x;
}

/* m_ones -- fills matrix with one's */
MAT *m_ones(A)
MAT *A;
MAT *m_ones(MAT *A)
{
int i, j;

Expand All @@ -283,8 +271,7 @@ MAT *A;
}

/* v_count -- initialises x so that x->ve[i] == i */
VEC *v_count(x)
VEC *x;
VEC *v_count(VEC *x)
{
int i;

Expand Down
Loading
Loading