/* trmmult.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.) * ------------------------------------------------------------------------ */ /* Test: rmmult Uses: matprt nrml Input parameters: n1 n2 n3 -> matrix sizes matrix A is n1 by n2 matrix B is n2 by n3 product C is n1 by n3 */ #include "ccmath.h" char fmt[]=" %8.4f"; void main(int na,char **av) { int n,m,k,i; double *a,*b,*c,*d; unsigned int seed; if(na!=4){ printf("para: dim1 dim2 dim3\n"); exit(1);} n=atoi(*++av); m=atoi(*++av); k=atoi(*++av); a=(double *)calloc(n*m,sizeof(double)); b=(double *)calloc(m*k,sizeof(double)); c=(double *)calloc(n*k,sizeof(double)); d=(double *)calloc(n*k,sizeof(double)); seed=123456789; setnrml(seed); for(i=0; i