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

Added qmake project include file #5

Open
wants to merge 6 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
71 changes: 71 additions & 0 deletions Meschach.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
INCLUDEPATH += $$PWD

HEADERS += $$PWD/*.h

# Only use the source files without a main function,
# so this file can be used for other programs to
# use Meschach
SOURCES += \
$$PWD/arnoldi.c \
$$PWD/bdfactor.c \
$$PWD/bkpfacto.c \
$$PWD/chfactor.c \
$$PWD/conjgrad.c \
$$PWD/copy.c \
$$PWD/err.c \
$$PWD/extras.c \
$$PWD/fft.c \
$$PWD/givens.c \
$$PWD/hessen.c \
$$PWD/hsehldr.c \
$$PWD/init.c \
$$PWD/iter0.c \
$$PWD/iternsym.c \
$$PWD/itersym.c \
#$$PWD/itertort.c \
$$PWD/ivecop.c \
$$PWD/lanczos.c \
$$PWD/lufactor.c \
$$PWD/machine.c \
$$PWD/matlab.c \
$$PWD/matop.c \
$$PWD/matrixio.c \
$$PWD/meminfo.c \
$$PWD/memory.c \
$$PWD/memstat.c \
$$PWD/mfunc.c \
$$PWD/norm.c \
$$PWD/otherio.c \
$$PWD/pxop.c \
$$PWD/qrfactor.c \
$$PWD/schur.c \
$$PWD/solve.c \
$$PWD/sparse.c \
$$PWD/sparseio.c \
$$PWD/spbkp.c \
$$PWD/spchfctr.c \
$$PWD/splufctr.c \
$$PWD/sprow.c \
$$PWD/spswap.c \
$$PWD/submat.c \
$$PWD/svd.c \
$$PWD/symmeig.c \
$$PWD/update.c \
$$PWD/vecop.c \
$$PWD/version.c \
$$PWD/zcopy.c \
$$PWD/zfunc.c \
$$PWD/zgivens.c \
$$PWD/zhessen.c \
$$PWD/zhsehldr.c \
$$PWD/zlufctr.c \
$$PWD/zmachine.c \
$$PWD/zmatio.c \
$$PWD/zmatlab.c \
$$PWD/zmatop.c \
$$PWD/zmemory.c \
$$PWD/znorm.c \
$$PWD/zqrfctr.c \
$$PWD/zschur.c \
$$PWD/zsolve.c \
$$PWD/zvecop.c
11 changes: 4 additions & 7 deletions bkpfacto.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ static void interchange(A,i,j)
MAT *A; /* assumed != NULL & also SQUARE */
int i, j; /* assumed in range */
{
Real **A_me, tmp;
Real tmp;
int k, n;

A_me = A->me; n = A->n;
n = A->n;
if ( i == j )
return;
if ( i > j )
Expand Down Expand Up @@ -108,7 +108,7 @@ MAT *BKPfactor(MAT *A, PERM *pivot, PERM *blocks)
#endif
{
int i, j, k, n, onebyone, r;
Real **A_me, aii, aip1, aip1i, lambda, sigma, tmp;
Real aii, aip1, aip1i, lambda, sigma, tmp;
Real det, s, t;

if ( ! A || ! pivot || ! blocks )
Expand All @@ -119,7 +119,6 @@ MAT *BKPfactor(MAT *A, PERM *pivot, PERM *blocks)
error(E_SIZES,"BKPfactor");

n = A->n;
A_me = A->me;
px_ident(pivot); px_ident(blocks);

for ( i = 0; i < n; i = onebyone ? i+1 : i+2 )
Expand Down Expand Up @@ -240,7 +239,7 @@ VEC *BKPsolve(const MAT *A, PERM *pivot, const PERM *block,
{
STATIC VEC *tmp=VNULL; /* dummy storage needed */
int i, j, n, onebyone;
Real **A_me, a11, a12, a22, b1, b2, det, sum, *tmp_ve, tmp_diag;
Real a11, a12, a22, b1, b2, det, sum, tmp_diag;

if ( ! A || ! pivot || ! block || ! b )
error(E_NULL,"BKPsolve");
Expand All @@ -253,8 +252,6 @@ VEC *BKPsolve(const MAT *A, PERM *pivot, const PERM *block,
tmp = v_resize(tmp,n);
MEM_STAT_REG(tmp,TYPE_VEC);

A_me = A->me; tmp_ve = tmp->ve;

px_vec(pivot,b,tmp);
/* solve for lower triangular part */
for ( i = 0; i < n; i++ )
Expand Down
3 changes: 1 addition & 2 deletions copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ MAT *vm_move(const VEC *in, int i0,
MAT *out, int i1, int j1, int m1, int n1)
#endif
{
int dim0, i;
int i;

if ( ! in )
error(E_NULL,"vm_move");
Expand All @@ -238,7 +238,6 @@ MAT *vm_move(const VEC *in, int i0,
else
out = m_resize(out,max(i1+m1,out->m),max(j1+n1,out->n));

dim0 = m1*n1;
for ( i = 0; i < m1; i++ )
MEM_COPY(&(in->ve[i0+i*n1]),&(out->me[i1+i][j1]),n1*sizeof(Real));

Expand Down
2 changes: 1 addition & 1 deletion iter0.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ ITER *iter_copy2(ITER *ip1, ITER *ip2)
mem_numvar(TYPE_ITER,1);
}
ip2->x = ip2->b = NULL;
ip2->shared_x = ip2->shared_x = FALSE;
ip2->shared_x = ip2->shared_b = FALSE;
}

x = ip2->x;
Expand Down
2 changes: 1 addition & 1 deletion ivecop.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ IVEC *iv_resize(IVEC *iv, int new_dim)
mem_bytes(TYPE_IVEC,iv->max_dim*sizeof(int),
new_dim*sizeof(int));
}
iv->ive = RENEW(iv->ive,new_dim,int);
RENEW(iv->ive,new_dim,int);
if ( ! iv->ive )
error(E_MEM,"iv_resize");
iv->max_dim = new_dim;
Expand Down
6 changes: 3 additions & 3 deletions memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ MAT *m_resize(MAT *A,int new_m, int new_n)
new_m*sizeof(Real *));
}

A->me = RENEW(A->me,new_m,Real *);
RENEW(A->me,new_m,Real *);
if ( ! A->me )
error(E_MEM,"m_resize");
}
Expand Down Expand Up @@ -453,7 +453,7 @@ PERM *px_resize(PERM *px, int new_size)
mem_bytes(TYPE_PERM,px->max_size*sizeof(unsigned int),
new_size*sizeof(unsigned int));
}
px->pe = RENEW(px->pe,new_size,unsigned int);
RENEW(px->pe,new_size,unsigned int);
if ( ! px->pe )
error(E_MEM,"px_resize");
px->max_size = new_size;
Expand Down Expand Up @@ -502,7 +502,7 @@ VEC *v_resize(VEC *x, int new_dim)
new_dim*sizeof(Real));
}

x->ve = RENEW(x->ve,new_dim,Real);
RENEW(x->ve,new_dim,Real);
if ( ! x->ve )
error(E_MEM,"v_resize");
x->max_dim = new_dim;
Expand Down
8 changes: 4 additions & 4 deletions schur.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ static void hhldr3cols(MAT *A, int k, int j0, double beta,
double nu1, double nu2, double nu3)
#endif
{
Real **A_me, ip, prod;
Real ip, prod;
int j, n;

if ( k < 0 || k+3 > A->m || j0 < 0 )
error(E_BOUNDS,"hhldr3cols");
A_me = A->me; n = A->n;
n = A->n;

/* printf("hhldr3cols:(l.%d) j0 = %d, k = %d, A at 0x%lx, m = %d, n = %d\n",
__LINE__, j0, k, (long)A, A->m, A->n); */
Expand Down Expand Up @@ -119,14 +119,14 @@ static void hhldr3rows(MAT *A, int k, int i0, double beta,
double nu1, double nu2, double nu3)
#endif
{
Real **A_me, ip, prod;
Real ip, prod;
int i, m;

/* printf("hhldr3rows:(l.%d) A at 0x%lx\n", __LINE__, (long)A); */
/* printf("hhldr3rows: k = %d\n", k); */
if ( k < 0 || k+3 > A->n )
error(E_BOUNDS,"hhldr3rows");
A_me = A->me; m = A->m;
m = A->m;
i0 = min(i0,m-1);

for ( i = 0; i <= i0; i++ )
Expand Down
2 changes: 1 addition & 1 deletion sparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ double sp_set_val(SPMAT *A, int i, int j, double val)
new_len*sizeof(row_elt));
}

r->elt = RENEW(r->elt,new_len,row_elt);
RENEW(r->elt,new_len,row_elt);
if ( ! r->elt ) /* can't allocate */
error(E_MEM,"sp_set_val");
r->maxlen = 2*r->maxlen+1;
Expand Down
2 changes: 1 addition & 1 deletion zvecop.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ ZVEC *zv_linlist(ZVEC *out,ZVEC *v1,complex a1,...)
va_start(ap, a1);
out = zv_mlt(a1,v1,out);

while (par = va_arg(ap,ZVEC *)) { /* NULL ends the list*/
while ((par = va_arg(ap,ZVEC *))) { /* NULL ends the list*/
a_par = va_arg(ap,complex);
if (a_par.re == 0.0 && a_par.im == 0.0) continue;
if ( out == par )
Expand Down