intcdgemm.c

Go to the documentation of this file.
00001 #include "stack-c.h"
00002 
00003 extern int C2F(dgemm) __PARAMS((char *,char *,integer *,integer *,integer *,
00004                             double *,double *,integer *,double *,integer *,
00005                             double *,double *,integer *));
00006 
00007 int intcdgemm(fname)
00008      char* fname;
00009 { 
00010   int lalfa,m1,n1,m,n,k;
00011   int mA,nA,lA, mB,nB,lB,m4,n4,lbeta,mC,nC,lC;
00012 
00013   static int minlhs=1, minrhs=5, maxlhs=1, maxrhs=5;
00014   Nbvars = 0;
00015   CheckRhs(minrhs,maxrhs) ;
00016   CheckLhs(minlhs,maxlhs) ;
00017   
00018   GetRhsVar(1,"d", &m1,&n1,&lalfa);   /*      alpha */
00019   GetRhsVar(2,"d", &mA,&nA,&lA);      /*      A     */
00020   GetRhsVar(3,"d", &mB,&nB,&lB);      /*      B     */
00021   GetRhsVar(4,"d", &m4,&n4,&lbeta);   /*      beta */
00022   GetRhsVar(5,"d", &mC,&nC,&lC);      /*      C     */
00023   m=mA;
00024   n=nB;
00025   if(nA != mB || m1*n1*m4*n4 != 1 )
00026     {
00027       sciprint("Bad call to dgemm\r\n");
00028       Error(9999);     return 0;
00029     }
00030   if(mA != mC || nB != nC )
00031     {
00032       sciprint("%s: invalid matrix dims in ",fname);
00033       Error(9999);     return 0;
00034     }
00035   k=nA;
00036   C2F(dgemm)("n","n",&m ,&n ,&k,stk(lalfa),
00037         stk(lA),&mA ,stk(lB),&mB ,stk(lbeta) ,stk(lC),&mC);
00038   /*      Return C (#5) */
00039   LhsVar(1) = 5;
00040   return(0);
00041 }
00042 
00043 
00044 

Generated on Sun Mar 4 15:03:58 2007 for Scilab [trunk] by  doxygen 1.5.1