| @@ -1,5 +1,3 @@ | |||||
| include ../../make.inc | |||||
| ####################################################################### | ####################################################################### | ||||
| # This is the makefile to create a library for the BLAS. | # This is the makefile to create a library for the BLAS. | ||||
| # The files are grouped as follows: | # The files are grouped as follows: | ||||
| @@ -55,6 +53,10 @@ include ../../make.inc | |||||
| # | # | ||||
| ####################################################################### | ####################################################################### | ||||
| TOPSRCDIR = ../.. | |||||
| include $(TOPSRCDIR)/make.inc | |||||
| .PHONY: all | |||||
| all: $(BLASLIB) | all: $(BLASLIB) | ||||
| #--------------------------------------------------------- | #--------------------------------------------------------- | ||||
| @@ -138,33 +140,32 @@ ALLOBJ = $(SBLAS1) $(SBLAS2) $(SBLAS3) $(DBLAS1) $(DBLAS2) $(DBLAS3) \ | |||||
| $(ZBLAS2) $(ZBLAS3) $(ALLBLAS) | $(ZBLAS2) $(ZBLAS3) $(ALLBLAS) | ||||
| $(BLASLIB): $(ALLOBJ) | $(BLASLIB): $(ALLOBJ) | ||||
| $(ARCH) $(ARCHFLAGS) $@ $^ | |||||
| $(AR) $(ARFLAGS) $@ $^ | |||||
| $(RANLIB) $@ | $(RANLIB) $@ | ||||
| .PHONY: single double complex complex16 | |||||
| single: $(SBLAS1) $(ALLBLAS) $(SBLAS2) $(SBLAS3) | single: $(SBLAS1) $(ALLBLAS) $(SBLAS2) $(SBLAS3) | ||||
| $(ARCH) $(ARCHFLAGS) $(BLASLIB) $^ | |||||
| $(AR) $(ARFLAGS) $(BLASLIB) $^ | |||||
| $(RANLIB) $(BLASLIB) | $(RANLIB) $(BLASLIB) | ||||
| double: $(DBLAS1) $(ALLBLAS) $(DBLAS2) $(DBLAS3) | double: $(DBLAS1) $(ALLBLAS) $(DBLAS2) $(DBLAS3) | ||||
| $(ARCH) $(ARCHFLAGS) $(BLASLIB) $^ | |||||
| $(AR) $(ARFLAGS) $(BLASLIB) $^ | |||||
| $(RANLIB) $(BLASLIB) | $(RANLIB) $(BLASLIB) | ||||
| complex: $(CBLAS1) $(CB1AUX) $(ALLBLAS) $(CBLAS2) $(CBLAS3) | complex: $(CBLAS1) $(CB1AUX) $(ALLBLAS) $(CBLAS2) $(CBLAS3) | ||||
| $(ARCH) $(ARCHFLAGS) $(BLASLIB) $^ | |||||
| $(AR) $(ARFLAGS) $(BLASLIB) $^ | |||||
| $(RANLIB) $(BLASLIB) | $(RANLIB) $(BLASLIB) | ||||
| complex16: $(ZBLAS1) $(ZB1AUX) $(ALLBLAS) $(ZBLAS2) $(ZBLAS3) | complex16: $(ZBLAS1) $(ZB1AUX) $(ALLBLAS) $(ZBLAS2) $(ZBLAS3) | ||||
| $(ARCH) $(ARCHFLAGS) $(BLASLIB) $^ | |||||
| $(AR) $(ARFLAGS) $(BLASLIB) $^ | |||||
| $(RANLIB) $(BLASLIB) | $(RANLIB) $(BLASLIB) | ||||
| FRC: | FRC: | ||||
| @FRC=$(FRC) | @FRC=$(FRC) | ||||
| .PHONY: clean cleanobj cleanlib | |||||
| clean: cleanobj cleanlib | clean: cleanobj cleanlib | ||||
| cleanobj: | cleanobj: | ||||
| rm -f *.o | rm -f *.o | ||||
| cleanlib: | cleanlib: | ||||
| #rm -f $(BLASLIB) # May point to a system lib, e.g. -lblas | #rm -f $(BLASLIB) # May point to a system lib, e.g. -lblas | ||||
| .f.o: | |||||
| $(FORTRAN) $(OPTS) -c -o $@ $< | |||||
| @@ -43,7 +43,7 @@ | |||||
| *> \param[in] INCX | *> \param[in] INCX | ||||
| *> \verbatim | *> \verbatim | ||||
| *> INCX is INTEGER | *> INCX is INTEGER | ||||
| *> storage spacing between elements of SX | |||||
| *> storage spacing between elements of CX | |||||
| *> \endverbatim | *> \endverbatim | ||||
| * | * | ||||
| * Authors: | * Authors: | ||||
| @@ -43,7 +43,7 @@ | |||||
| *> \param[in] INCX | *> \param[in] INCX | ||||
| *> \verbatim | *> \verbatim | ||||
| *> INCX is INTEGER | *> INCX is INTEGER | ||||
| *> storage spacing between elements of SX | |||||
| *> storage spacing between elements of DX | |||||
| *> \endverbatim | *> \endverbatim | ||||
| * | * | ||||
| * Authors: | * Authors: | ||||
| @@ -43,7 +43,7 @@ | |||||
| *> \param[in] INCX | *> \param[in] INCX | ||||
| *> \verbatim | *> \verbatim | ||||
| *> INCX is INTEGER | *> INCX is INTEGER | ||||
| *> storage spacing between elements of SX | |||||
| *> storage spacing between elements of ZX | |||||
| *> \endverbatim | *> \endverbatim | ||||
| * | * | ||||
| * Authors: | * Authors: | ||||
| @@ -0,0 +1,29 @@ | |||||
| SBLAS1 = files('isamax.f', 'sasum.f', 'saxpy.f', 'scopy.f', 'sdot.f', 'snrm2.f', 'srot.f', 'srotg.f', 'sscal.f', 'sswap.f', 'sdsdot.f', 'srotmg.f', 'srotm.f') | |||||
| CBLAS1 = files('scabs1.f', 'scasum.f', 'scnrm2.f', 'icamax.f', 'caxpy.f', 'ccopy.f', 'cdotc.f', 'cdotu.f', 'csscal.f', 'crotg.f', 'cscal.f', 'cswap.f', 'csrot.f') | |||||
| DBLAS1 = files('idamax.f', 'dasum.f', 'daxpy.f', 'dcopy.f', 'ddot.f', 'dnrm2.f', 'drot.f', 'drotg.f', 'dscal.f', 'dsdot.f', 'dswap.f', 'drotmg.f', 'drotm.f') | |||||
| ZBLAS1 = files('dcabs1.f', 'dzasum.f', 'dznrm2.f', 'izamax.f', 'zaxpy.f', 'zcopy.f', 'zdotc.f', 'zdotu.f', 'zdscal.f', 'zrotg.f', 'zscal.f', 'zswap.f', 'zdrot.f') | |||||
| CB1AUX = files('isamax.f', 'sasum.f', 'saxpy.f', 'scopy.f', 'snrm2.f', 'sscal.f') | |||||
| ZB1AUX = files('idamax.f', 'dasum.f', 'daxpy.f', 'dcopy.f', 'dnrm2.f', 'dscal.f') | |||||
| ALLBLAS = files('lsame.f', 'xerbla.f', 'xerbla_array.f') | |||||
| SBLAS2 = files('sgemv.f', 'sgbmv.f', 'ssymv.f', 'ssbmv.f', 'sspmv.f', 'strmv.f', 'stbmv.f', 'stpmv.f', 'strsv.f', 'stbsv.f', 'stpsv.f', 'sger.f', 'ssyr.f', 'sspr.f', 'ssyr2.f', 'sspr2.f') | |||||
| CBLAS2 = files('cgemv.f', 'cgbmv.f', 'chemv.f', 'chbmv.f', 'chpmv.f', 'ctrmv.f', 'ctbmv.f', 'ctpmv.f', 'ctrsv.f', 'ctbsv.f', 'ctpsv.f', 'cgerc.f', 'cgeru.f', 'cher.f', 'chpr.f', 'cher2.f', 'chpr2.f') | |||||
| DBLAS2 = files('dgemv.f', 'dgbmv.f', 'dsymv.f', 'dsbmv.f', 'dspmv.f', 'dtrmv.f', 'dtbmv.f', 'dtpmv.f', 'dtrsv.f', 'dtbsv.f', 'dtpsv.f', 'dger.f', 'dsyr.f', 'dspr.f', 'dsyr2.f', 'dspr2.f') | |||||
| ZBLAS2 = files('zgemv.f', 'zgbmv.f', 'zhemv.f', 'zhbmv.f', 'zhpmv.f', 'ztrmv.f', 'ztbmv.f', 'ztpmv.f', 'ztrsv.f', 'ztbsv.f', 'ztpsv.f', 'zgerc.f', 'zgeru.f', 'zher.f', 'zhpr.f', 'zher2.f', 'zhpr2.f') | |||||
| SBLAS3 = files('sgemm.f', 'ssymm.f', 'ssyrk.f', 'ssyr2k.f', 'strmm.f', 'strsm.f') | |||||
| CBLAS3 = files('cgemm.f', 'csymm.f', 'csyrk.f', 'csyr2k.f', 'ctrmm.f', 'ctrsm.f', 'chemm.f', 'cherk.f', 'cher2k.f') | |||||
| DBLAS3 = files('dgemm.f', 'dsymm.f', 'dsyrk.f', 'dsyr2k.f', 'dtrmm.f', 'dtrsm.f') | |||||
| ZBLAS3 = files('zgemm.f', 'zsymm.f', 'zsyrk.f', 'zsyr2k.f', 'ztrmm.f', 'ztrsm.f', 'zhemm.f', 'zherk.f', 'zher2k.f') | |||||
| @@ -23,13 +23,13 @@ | |||||
| *> | *> | ||||
| *> \verbatim | *> \verbatim | ||||
| *> | *> | ||||
| * Compute the inner product of two vectors with extended | |||||
| * precision accumulation. | |||||
| * | |||||
| * Returns S.P. result with dot product accumulated in D.P. | |||||
| * SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY), | |||||
| * where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is | |||||
| * defined in a similar way using INCY. | |||||
| *> Compute the inner product of two vectors with extended | |||||
| *> precision accumulation. | |||||
| *> | |||||
| *> Returns S.P. result with dot product accumulated in D.P. | |||||
| *> SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY), | |||||
| *> where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is | |||||
| *> defined in a similar way using INCY. | |||||
| *> \endverbatim | *> \endverbatim | ||||
| * | * | ||||
| * Arguments: | * Arguments: | ||||
| @@ -77,7 +77,14 @@ | |||||
| *> \author Lawson, C. L., (JPL), Hanson, R. J., (SNLA), | *> \author Lawson, C. L., (JPL), Hanson, R. J., (SNLA), | ||||
| *> \author Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL) | *> \author Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL) | ||||
| * | * | ||||
| *> \ingroup complex_blas_level1 | |||||
| *> \author Univ. of Tennessee | |||||
| *> \author Univ. of California Berkeley | |||||
| *> \author Univ. of Colorado Denver | |||||
| *> \author NAG Ltd. | |||||
| * | |||||
| *> \date November 2017 | |||||
| * | |||||
| *> \ingroup single_blas_level1 | |||||
| * | * | ||||
| *> \par Further Details: | *> \par Further Details: | ||||
| * ===================== | * ===================== | ||||
| @@ -102,65 +109,7 @@ | |||||
| *> 920501 Reformatted the REFERENCES section. (WRB) | *> 920501 Reformatted the REFERENCES section. (WRB) | ||||
| *> 070118 Reformat to LAPACK coding style | *> 070118 Reformat to LAPACK coding style | ||||
| *> \endverbatim | *> \endverbatim | ||||
| * | |||||
| * ===================================================================== | |||||
| * | |||||
| * .. Local Scalars .. | |||||
| * DOUBLE PRECISION DSDOT | |||||
| * INTEGER I,KX,KY,NS | |||||
| * .. | |||||
| * .. Intrinsic Functions .. | |||||
| * INTRINSIC DBLE | |||||
| * .. | |||||
| * DSDOT = SB | |||||
| * IF (N.LE.0) THEN | |||||
| * SDSDOT = DSDOT | |||||
| * RETURN | |||||
| * END IF | |||||
| * IF (INCX.EQ.INCY .AND. INCX.GT.0) THEN | |||||
| * | |||||
| * Code for equal and positive increments. | |||||
| * | |||||
| * NS = N*INCX | |||||
| * DO I = 1,NS,INCX | |||||
| * DSDOT = DSDOT + DBLE(SX(I))*DBLE(SY(I)) | |||||
| * END DO | |||||
| * ELSE | |||||
| * | |||||
| * Code for unequal or nonpositive increments. | |||||
| * | |||||
| * KX = 1 | |||||
| * KY = 1 | |||||
| * IF (INCX.LT.0) KX = 1 + (1-N)*INCX | |||||
| * IF (INCY.LT.0) KY = 1 + (1-N)*INCY | |||||
| * DO I = 1,N | |||||
| * DSDOT = DSDOT + DBLE(SX(KX))*DBLE(SY(KY)) | |||||
| * KX = KX + INCX | |||||
| * KY = KY + INCY | |||||
| * END DO | |||||
| * END IF | |||||
| * SDSDOT = DSDOT | |||||
| * RETURN | |||||
| * END | |||||
| * | |||||
| *> \par Purpose: | |||||
| * ============= | |||||
| *> | *> | ||||
| *> \verbatim | |||||
| *> \endverbatim | |||||
| * | |||||
| * Authors: | |||||
| * ======== | |||||
| * | |||||
| *> \author Univ. of Tennessee | |||||
| *> \author Univ. of California Berkeley | |||||
| *> \author Univ. of Colorado Denver | |||||
| *> \author NAG Ltd. | |||||
| * | |||||
| *> \date November 2017 | |||||
| * | |||||
| *> \ingroup single_blas_level1 | |||||
| * | |||||
| * ===================================================================== | * ===================================================================== | ||||
| REAL FUNCTION SDSDOT(N,SB,SX,INCX,SY,INCY) | REAL FUNCTION SDSDOT(N,SB,SX,INCX,SY,INCY) | ||||
| * | * | ||||
| @@ -175,71 +124,6 @@ | |||||
| * .. | * .. | ||||
| * .. Array Arguments .. | * .. Array Arguments .. | ||||
| REAL SX(*),SY(*) | REAL SX(*),SY(*) | ||||
| * .. | |||||
| * | |||||
| * PURPOSE | |||||
| * ======= | |||||
| * | |||||
| * Compute the inner product of two vectors with extended | |||||
| * precision accumulation. | |||||
| * | |||||
| * Returns S.P. result with dot product accumulated in D.P. | |||||
| * SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY), | |||||
| * where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is | |||||
| * defined in a similar way using INCY. | |||||
| * | |||||
| * AUTHOR | |||||
| * ====== | |||||
| * Lawson, C. L., (JPL), Hanson, R. J., (SNLA), | |||||
| * Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL) | |||||
| * | |||||
| * ARGUMENTS | |||||
| * ========= | |||||
| * | |||||
| * N (input) INTEGER | |||||
| * number of elements in input vector(s) | |||||
| * | |||||
| * SB (input) REAL | |||||
| * single precision scalar to be added to inner product | |||||
| * | |||||
| * SX (input) REAL array, dimension (N) | |||||
| * single precision vector with N elements | |||||
| * | |||||
| * INCX (input) INTEGER | |||||
| * storage spacing between elements of SX | |||||
| * | |||||
| * SY (input) REAL array, dimension (N) | |||||
| * single precision vector with N elements | |||||
| * | |||||
| * INCY (input) INTEGER | |||||
| * storage spacing between elements of SY | |||||
| * | |||||
| * SDSDOT (output) REAL | |||||
| * single precision dot product (SB if N .LE. 0) | |||||
| * | |||||
| * Further Details | |||||
| * =============== | |||||
| * | |||||
| * REFERENCES | |||||
| * | |||||
| * C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T. | |||||
| * Krogh, Basic linear algebra subprograms for Fortran | |||||
| * usage, Algorithm No. 539, Transactions on Mathematical | |||||
| * Software 5, 3 (September 1979), pp. 308-323. | |||||
| * | |||||
| * REVISION HISTORY (YYMMDD) | |||||
| * | |||||
| * 791001 DATE WRITTEN | |||||
| * 890531 Changed all specific intrinsics to generic. (WRB) | |||||
| * 890831 Modified array declarations. (WRB) | |||||
| * 890831 REVISION DATE from Version 3.2 | |||||
| * 891214 Prologue converted to Version 4.0 format. (BAB) | |||||
| * 920310 Corrected definition of LX in DESCRIPTION. (WRB) | |||||
| * 920501 Reformatted the REFERENCES section. (WRB) | |||||
| * 070118 Reformat to LAPACK coding style | |||||
| * | |||||
| * ===================================================================== | |||||
| * | |||||
| * .. Local Scalars .. | * .. Local Scalars .. | ||||
| DOUBLE PRECISION DSDOT | DOUBLE PRECISION DSDOT | ||||
| INTEGER I,KX,KY,NS | INTEGER I,KX,KY,NS | ||||