#include #include #include #include "mpl_blas.h" #define PRECISION float /* #define DEBUG */ /*************************************************************************** * * * DATA PARALLEL BLAS based on MPL * * * * Internal routine, this routine is not supposed to be * * called by user programs. * * * * Version 1.0 1/4-92 , * * For MasPar MP-1 computers * * * * para//ab, University of Bergen, NORWAY * * * * The calling sequence may be changed in a future version. * * Please report any BUGs, ideas for improvement or other * * comments to * * adm@parallab.uib.no * * * * Future versions may then reflect your suggestions. * * The most current version of this software is available * * from netlib@nac.no , send the message `send index from maspar' * * * * REVISIONS: * * * ***************************************************************************/ #ifdef __STDMPL__ visible void mpl_sgemv2(int m, int n, PRECISION alpha, plural PRECISION *a, plural PRECISION *x, PRECISION beta, plural PRECISION *y) #else visible void mpl_sgemv2(m, n, alpha, a, x, beta, y) PRECISION alpha, beta; int m, n; register plural PRECISION *a,*x,*y; #endif /* MasPar Blas 2 routine y := beta*y + alpha*A'*x written July 20, 1990 revised November 1, 1990 NEW VERSION Dec 12, 1990 (array A has columns in the x-direction) by Erik Boman, University of Bergen * Comments: * works only for m and n < nproc * the use of register variables should be optimized */ { register plural PRECISION sum,xtmp; register plural PRECISION xtrans,ytrans; register plural PRECISION *xtemp; register int i,j; register int mask; int nbx,nby,nrows; register plural int ix=ixproc, iy=iyproc; /* put pointer arguments into local variables */ if (m>nproc) { printf("Error in mpl_sgemv2 : m > nproc\n"); exit(1); } if (n>nproc) { printf("Error in mpl_sgemv2: n > nproc\n"); exit(1); } /* * Form A'*x */ if ((m <= nxproc) && (n <= nyproc)){ sum = zero; /* distributing x */ if (iy == 0){ xtmp = *x; xnetcS[n-1].xtmp = xtmp; } /* multiplying */ if (iy PE grid */ /* * End of mpl_sgemv2 . */ }