/* tcmmult.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: cmmult Uses: cminv cmprt nrml Input parameters: n1 n2 n3 -> size with matrix A n1 by n2 matrix B n2 by n3 product C n1 by n3 */ #include "ccmath.h" char fmt[]="(%7.3f,%7.3f)"; void main(int na,char **av) { int n,m,k,i; Cpx *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=(Cpx *)calloc(n*m,sizeof(Cpx)); b=(Cpx *)calloc(m*k,sizeof(Cpx)); c=(Cpx *)calloc(n*k,sizeof(Cpx)); d=(Cpx *)calloc(n*k,sizeof(Cpx)); seed=123456789; setnrml(seed); for(i=0; i