/* timlpac.c CCMATH mathematics library source code. * * Copyright (C) 2000 Daniel A. Atkinson All rights reserved. * This code may be redistributed under the terms of the GNU library * public license (LGPL). ( See the lgpl.license file for details.) * ------------------------------------------------------------------------ */ /* Time the solution of real linear systems. Input parameter: dim= n -> system of n linear equations */ #include #include "ccmath.h" void main(int na,char **av) { int i,j,n; double *a,*x,*p; unsigned int seed; double dt,s,cmax,fabs(); clock_t st,en; if(na!=2){ printf(" para: dim\n"); exit(1);} n=atoi(*++av); printf(" lpac : dim= %d\n",n); a=(double *)calloc(n*n+n,sizeof(double)); x=a+n*n; seed=(unsigned int)time(NULL); setnrml(seed); for(i=0,p=a,j=n*n; i