SUBROUTINE SSCAL( N, DA, DX, INCX ) **************************************************************************** * * * DATA PARALLEL BLAS based on MPL * * * * Version 1.0 1/9-92 , * * For MasPar MP-1 computers * * * * para//ab, University of Bergen, NORWAY * * * * These programs must be called using F90 style array syntax. * * Note that the F77 style calling sequence has been retained * * in this version for compatibility reasons, be aware that * * parameters related to the array dimensions and shape therefore may * * be redundant and without any influence. * * 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: * * * **************************************************************************** implicit none * * scales a vector by a constant. * uses unrolled loops for increment equal to 1. * jack dongarra, linpack, 3/11/78. * * .. Scalar Arguments .. INTEGER INCX, N REAL DA * .. * .. Array Arguments .. REAL, array(:) :: DX * .. * .. Local Scalars .. INTEGER IX, jx * .. * .. Intrinsic Functions .. INTRINSIC ABS * .. cmpf mpl mpl_sscal cmpf ondpu dx * .. Executable Statements .. * IF( N.LE.0 ) return * ix = abs(incx) IF( iX.EQ.1 ) then * * code for increment equal to 1 * * cpb dx(1:n) = da * dx(1:n) call mpl_sscal(n,da,dx) else * * code for increment not equal to 1 * if(ix .eq. 0) then dx(1) = da*dx(1) RETURN endif * jx = ix * ( n-1 ) + 1 cpb dx(1:jx:ix) = da * dx(1:jx:ix) call mpl_sscal(n,da,dx(1:jx:ix)) endif * RETURN * * End of SSCAL . * END