Merge branch 'master' into dlarftTermCase

This commit is contained in:
Johnathan Rhyne
2025-10-22 14:01:45 -06:00
committed by GitHub
3280 changed files with 6867 additions and 911 deletions
+65
View File
@@ -0,0 +1,65 @@
using BinaryBuilder, Pkg
haskey(ENV, "BLAS_LAPACK_RELEASE") || error("The environment variable BLAS_LAPACK_RELEASE is not defined.")
haskey(ENV, "BLAS_LAPACK_COMMIT") || error("The environment variable BLAS_LAPACK_COMMIT is not defined.")
haskey(ENV, "BLAS_LAPACK_URL") || error("The environment variable BLAS_LAPACK_URL is not defined.")
name = "blas_lapack"
version = VersionNumber(ENV["BLAS_LAPACK_RELEASE"])
# Collection of sources required to complete build
sources = [
GitSource(ENV["BLAS_LAPACK_URL"], ENV["BLAS_LAPACK_COMMIT"])
]
# Bash recipe for building across all platforms
script = raw"""
cd ${WORKSPACE}/srcdir/lapack
# FortranCInterface_VERIFY fails on macOS, but it's not actually needed for the current build
sed -i 's/FortranCInterface_VERIFY/# FortranCInterface_VERIFY/g' ./CBLAS/CMakeLists.txt
sed -i 's/FortranCInterface_VERIFY/# FortranCInterface_VERIFY/g' ./LAPACKE/include/CMakeLists.txt
mkdir build && cd build
cmake .. \
-DCBLAS=ON \
-DLAPACKE=ON \
-DCMAKE_INSTALL_PREFIX="$prefix" \
-DCMAKE_FIND_ROOT_PATH="$prefix" \
-DCMAKE_TOOLCHAIN_FILE="${CMAKE_TARGET_TOOLCHAIN}" \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_INDEX64_EXT_API=OFF \
-DTEST_FORTRAN_COMPILER=OFF \
-DLAPACKE_WITH_TMG=OFF
make -j${nproc}
make install
install_license $WORKSPACE/srcdir/lapack/LICENSE
"""
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()
platforms = expand_gfortran_versions(platforms)
# The products that we will ensure are always built
products = [
FileProduct("lib/libblas.a", :libblas_a),
FileProduct("lib/libcblas.a", :libcblas_a),
FileProduct("lib/liblapack.a", :liblapack_a),
FileProduct("lib/liblapacke.a", :liblapacke_a),
# LibraryProduct("libblas", :libblas),
# LibraryProduct("libcblas", :libcblas),
# LibraryProduct("liblapack", :liblapack),
# LibraryProduct("liblapacke", :liblapacke),
]
# Dependencies that must be installed before this package can be built
dependencies = [
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae")),
]
# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6")
+90
View File
@@ -0,0 +1,90 @@
# Version
haskey(ENV, "BLAS_LAPACK_RELEASE") || error("The environment variable BLAS_LAPACK_RELEASE is not defined.")
version = VersionNumber(ENV["BLAS_LAPACK_RELEASE"])
version2 = ENV["BLAS_LAPACK_RELEASE"]
package = "blas_lapack"
platforms = [
("aarch64-apple-darwin-libgfortran5" , "lib", "dylib"),
# ("aarch64-linux-gnu-libgfortran3" , "lib", "so" ),
# ("aarch64-linux-gnu-libgfortran4" , "lib", "so" ),
("aarch64-linux-gnu-libgfortran5" , "lib", "so" ),
# ("aarch64-linux-musl-libgfortran3" , "lib", "so" ),
# ("aarch64-linux-musl-libgfortran4" , "lib", "so" ),
# ("aarch64-linux-musl-libgfortran5" , "lib", "so" ),
# ("powerpc64le-linux-gnu-libgfortran3" , "lib", "so" ),
# ("powerpc64le-linux-gnu-libgfortran4" , "lib", "so" ),
# ("powerpc64le-linux-gnu-libgfortran5" , "lib", "so" ),
# ("x86_64-apple-darwin-libgfortran3" , "lib", "dylib"),
# ("x86_64-apple-darwin-libgfortran4" , "lib", "dylib"),
("x86_64-apple-darwin-libgfortran5" , "lib", "dylib"),
# ("x86_64-linux-gnu-libgfortran3" , "lib", "so" ),
# ("x86_64-linux-gnu-libgfortran4" , "lib", "so" ),
("x86_64-linux-gnu-libgfortran5" , "lib", "so" ),
# ("x86_64-linux-musl-libgfortran3" , "lib", "so" ),
# ("x86_64-linux-musl-libgfortran4" , "lib", "so" ),
# ("x86_64-linux-musl-libgfortran5" , "lib", "so" ),
# ("x86_64-unknown-freebsd-libgfortran3", "lib", "so" ),
# ("x86_64-unknown-freebsd-libgfortran4", "lib", "so" ),
# ("x86_64-unknown-freebsd-libgfortran5", "lib", "so" ),
# ("x86_64-w64-mingw32-libgfortran3" , "bin", "dll" ),
# ("x86_64-w64-mingw32-libgfortran4" , "bin", "dll" ),
("x86_64-w64-mingw32-libgfortran5" , "bin", "dll" ),
]
for (platform, libdir, ext) in platforms
tarball_name = "$package.v$version.$platform.tar.gz"
if isfile("products/$(tarball_name)")
# Unzip the tarball generated by BinaryBuilder.jl
isdir("products/$platform") && rm("products/$platform", recursive=true)
mkdir("products/$platform")
run(`tar -xzf products/$(tarball_name) -C products/$platform`)
if isfile("products/$platform/deps.tar.gz")
# Unzip the tarball of the dependencies
run(`tar -xzf products/$platform/deps.tar.gz -C products/$platform`)
# Copy the license of each dependency
for folder in readdir("products/$platform/deps/licenses")
cp("products/$platform/deps/licenses/$folder", "products/$platform/share/licenses/$folder")
end
rm("products/$platform/deps/licenses", recursive=true)
# Copy the shared library of each dependency
for file in readdir("products/$platform/deps")
cp("products/$platform/deps/$file", "products/$platform/$libdir/$file")
end
# Remove the folder used to unzip the tarball of the dependencies
rm("products/$platform/deps", recursive=true)
rm("products/$platform/deps.tar.gz", recursive=true)
end
# Create the archives *_binaries
isfile("$(package)_binaries.$version2.$platform.tar.gz") && rm("$(package)_binaries.$version2.$platform.tar.gz")
isfile("$(package)_binaries.$version2.$platform.zip") && rm("$(package)_binaries.$version2.$platform.zip")
cd("products/$platform")
# Create a folder with the version number of the package
mkdir("$(package)_binaries.$version2")
for folder in ("include", "share", "lib")
cp(folder, "$(package)_binaries.$version2/$folder")
end
cd("$(package)_binaries.$version2")
if ext == "dll"
run(`zip -r --symlinks ../../../$(package)_binaries.$version2.$platform.zip include share lib`)
else
run(`tar -czf ../../../$(package)_binaries.$version2.$platform.tar.gz include share lib`)
end
cd("../../..")
# Remove the folder used to unzip the tarball generated by BinaryBuilder.jl
rm("products/$platform", recursive=true)
else
@warn("The tarball for the platform $platform was not generated!")
end
end
+239
View File
@@ -0,0 +1,239 @@
name: Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v2023.11.15
jobs:
build-linux-x64:
name: blas / lapack -- Linux (x86_64) -- Release ${{ github.ref_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout lapack
uses: actions/checkout@v4
- name: Install Julia
uses: julia-actions/setup-julia@v2
with:
version: "1.7"
arch: x64
- name: Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, BLAS_LAPACK_RELEASE, BLAS_LAPACK_COMMIT
shell: bash
run: |
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
echo "BLAS_LAPACK_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
- name: Cross-compilation of blas / lapack -- x86_64-linux-gnu-libgfortran5
run: |
julia --color=no -e 'using Pkg; Pkg.add("BinaryBuilder")'
julia --color=no .github/julia/build_tarballs.jl x86_64-linux-gnu-libgfortran5 --verbose
- name: Archive artifact
run: julia --color=no .github/julia/generate_binaries.jl
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: blas_lapack_binaries.${{ github.ref_name }}.x86_64-linux-gnu-libgfortran5.tar.gz
path: ./blas_lapack_binaries.${{ github.ref_name }}.x86_64-linux-gnu-libgfortran5.tar.gz
build-linux-aarch64:
name: blas / lapack -- Linux (aarch64) -- Release ${{ github.ref_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout lapack
uses: actions/checkout@v4
- name: Install Julia
uses: julia-actions/setup-julia@v2
with:
version: "1.7"
arch: x64
- name: Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, BLAS_LAPACK_RELEASE, BLAS_LAPACK_COMMIT
shell: bash
run: |
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
echo "BLAS_LAPACK_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
- name: Cross-compilation of blas / lapack -- aarch64-linux-gnu-libgfortran5
run: |
julia --color=no -e 'using Pkg; Pkg.add("BinaryBuilder")'
julia --color=no .github/julia/build_tarballs.jl aarch64-linux-gnu-libgfortran5 --verbose
- name: Archive artifact
run: julia --color=no .github/julia/generate_binaries.jl
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: blas_lapack_binaries.${{ github.ref_name }}.aarch64-linux-gnu-libgfortran5.tar.gz
path: ./blas_lapack_binaries.${{ github.ref_name }}.aarch64-linux-gnu-libgfortran5.tar.gz
build-windows-x64:
name: blas / lapack -- Windows (x86_64) -- Release ${{ github.ref_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout lapack
uses: actions/checkout@v4
- name: Install Julia
uses: julia-actions/setup-julia@v2
with:
version: "1.7"
arch: x64
- name: Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, BLAS_LAPACK_RELEASE, BLAS_LAPACK_COMMIT
shell: bash
run: |
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
echo "BLAS_LAPACK_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
- name: Cross-compilation of blas / lapack -- x86_64-w64-mingw32-libgfortran5
run: |
julia --color=no -e 'using Pkg; Pkg.add("BinaryBuilder")'
julia --color=no .github/julia/build_tarballs.jl x86_64-w64-mingw32-libgfortran5 --verbose
- name: Archive artifact
run: julia --color=no .github/julia/generate_binaries.jl
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: blas_lapack_binaries.${{ github.ref_name }}.x86_64-w64-mingw32-libgfortran5.zip
path: ./blas_lapack_binaries.${{ github.ref_name }}.x86_64-w64-mingw32-libgfortran5.zip
build-mac-x64:
name: blas / lapack -- macOS (x86_64) -- Release ${{ github.ref_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout lapack
uses: actions/checkout@v4
- name: Install Julia
uses: julia-actions/setup-julia@v2
with:
version: "1.7"
arch: x64
- name: Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, BLAS_LAPACK_RELEASE, BLAS_LAPACK_COMMIT
shell: bash
run: |
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
echo "BLAS_LAPACK_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
- name: Cross-compilation of blas / lapack -- x86_64-apple-darwin-libgfortran5
run: |
julia --color=no -e 'using Pkg; Pkg.add("BinaryBuilder")'
julia --color=no .github/julia/build_tarballs.jl x86_64-apple-darwin-libgfortran5 --verbose
- name: Archive artifact
run: julia --color=no .github/julia/generate_binaries.jl
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: blas_lapack_binaries.${{ github.ref_name }}.x86_64-apple-darwin-libgfortran5.tar.gz
path: ./blas_lapack_binaries.${{ github.ref_name }}.x86_64-apple-darwin-libgfortran5.tar.gz
build-mac-aarch64:
name: blas / lapack -- macOS (aarch64) -- Release ${{ github.ref_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout lapack
uses: actions/checkout@v4
- name: Install Julia
uses: julia-actions/setup-julia@v2
with:
version: "1.7"
arch: x64
- name: Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, BLAS_LAPACK_RELEASE, BLAS_LAPACK_COMMIT
shell: bash
run: |
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
echo "BLAS_LAPACK_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
- name: Cross-compilation of blas / lapack -- aarch64-apple-darwin-libgfortran5
run: |
julia --color=no -e 'using Pkg; Pkg.add("BinaryBuilder")'
julia --color=no .github/julia/build_tarballs.jl aarch64-apple-darwin-libgfortran5 --verbose
- name: Archive artifact
run: julia --color=no .github/julia/generate_binaries.jl
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: blas_lapack_binaries.${{ github.ref_name }}.aarch64-apple-darwin-libgfortran5.tar.gz
path: ./blas_lapack_binaries.${{ github.ref_name }}.aarch64-apple-darwin-libgfortran5.tar.gz
release:
name: Create Release and Upload Binaries
needs: [build-windows-x64, build-linux-x64, build-linux-aarch64, build-mac-x64, build-mac-aarch64]
runs-on: ubuntu-latest
steps:
- name: Checkout lapack
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: .
- name: Create GitHub Release
run: |
gh release create ${{ github.ref_name }} \
--title "${{ github.ref_name }}" \
--notes "" \
--verify-tag
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Linux (x86_64) artifact
run: |
gh release upload ${{ github.ref_name }} \
blas_lapack_binaries.${{ github.ref_name }}.x86_64-linux-gnu-libgfortran5.tar.gz/blas_lapack_binaries.${{ github.ref_name }}.x86_64-linux-gnu-libgfortran5.tar.gz#blas_lapack.${{ github.ref_name }}.linux.x86_64.tar.gz
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Linux (aarch64) artifact
run: |
gh release upload ${{ github.ref_name }} \
blas_lapack_binaries.${{ github.ref_name }}.aarch64-linux-gnu-libgfortran5.tar.gz/blas_lapack_binaries.${{ github.ref_name }}.aarch64-linux-gnu-libgfortran5.tar.gz#blas_lapack.${{ github.ref_name }}.linux.aarch64.tar.gz
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Mac (x86_64) artifact
run: |
gh release upload ${{ github.ref_name }} \
blas_lapack_binaries.${{ github.ref_name }}.x86_64-apple-darwin-libgfortran5.tar.gz/blas_lapack_binaries.${{ github.ref_name }}.x86_64-apple-darwin-libgfortran5.tar.gz#blas_lapack.${{ github.ref_name }}.mac.x86_64.tar.gz
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Mac (aarch64) artifact
run: |
gh release upload ${{ github.ref_name }} \
blas_lapack_binaries.${{ github.ref_name }}.aarch64-apple-darwin-libgfortran5.tar.gz/blas_lapack_binaries.${{ github.ref_name }}.aarch64-apple-darwin-libgfortran5.tar.gz#blas_lapack.${{ github.ref_name }}.mac.aarch64.tar.gz
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Windows (x86_64) artifact
run: |
gh release upload ${{ github.ref_name }} \
blas_lapack_binaries.${{ github.ref_name }}.x86_64-w64-mingw32-libgfortran5.zip/blas_lapack_binaries.${{ github.ref_name }}.x86_64-w64-mingw32-libgfortran5.zip#blas_lapack.${{ github.ref_name }}.windows.x86_64.zip
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+5 -5
View File
@@ -29,18 +29,18 @@
# Level 1 BLAS
#---------------------------------------------------------
set(SBLAS1 isamax.f sasum.f saxpy.f scopy.f sdot.f snrm2.f90
set(SBLAS1 isamax.f sasum.f saxpy.f saxpby.f scopy.f sdot.f snrm2.f90
srot.f srotg.f90 sscal.f sswap.f sdsdot.f srotmg.f srotm.f)
set(CBLAS1 scabs1.f scasum.f scnrm2.f90 icamax.f caxpy.f ccopy.f
set(CBLAS1 scabs1.f scasum.f scnrm2.f90 icamax.f90 caxpy.f caxpby.f ccopy.f
cdotc.f cdotu.f csscal.f crotg.f90 cscal.f cswap.f csrot.f)
set(DBLAS1 idamax.f dasum.f daxpy.f dcopy.f ddot.f dnrm2.f90
set(DBLAS1 idamax.f dasum.f daxpy.f daxpby.f dcopy.f ddot.f dnrm2.f90
drot.f drotg.f90 dscal.f dsdot.f dswap.f drotmg.f drotm.f)
set(DB1AUX sscal.f isamax.f)
set(ZBLAS1 dcabs1.f dzasum.f dznrm2.f90 izamax.f zaxpy.f zcopy.f
set(ZBLAS1 dcabs1.f dzasum.f dznrm2.f90 izamax.f90 zaxpy.f zaxpby.f zcopy.f
zdotc.f zdotu.f zdscal.f zrotg.f90 zscal.f zswap.f zdrot.f)
set(CB1AUX
@@ -49,7 +49,7 @@ set(CB1AUX
sswap.f)
set(ZB1AUX
icamax.f idamax.f
icamax.f90 idamax.f
cgemm.f cherk.f cscal.f ctrsm.f
dasum.f daxpy.f dcopy.f ddot.f dgemm.f dgemv.f dnrm2.f90 drot.f dscal.f
dswap.f
+4 -4
View File
@@ -69,19 +69,19 @@ all: $(BLASLIB)
# Comment out the next 6 definitions if you already have
# the Level 1 BLAS.
#---------------------------------------------------------
SBLAS1 = isamax.o sasum.o saxpy.o scopy.o sdot.o snrm2.o \
SBLAS1 = isamax.o sasum.o saxpy.o saxpby.o scopy.o sdot.o snrm2.o \
srot.o srotg.o sscal.o sswap.o sdsdot.o srotmg.o srotm.o
$(SBLAS1): $(FRC)
CBLAS1 = scabs1.o scasum.o scnrm2.o icamax.o caxpy.o ccopy.o \
CBLAS1 = scabs1.o scasum.o scnrm2.o icamax.o caxpy.o caxpby.o ccopy.o \
cdotc.o cdotu.o csscal.o crotg.o cscal.o cswap.o csrot.o
$(CBLAS1): $(FRC)
DBLAS1 = idamax.o dasum.o daxpy.o dcopy.o ddot.o dnrm2.o \
DBLAS1 = idamax.o dasum.o daxpy.o daxpby.o dcopy.o ddot.o dnrm2.o \
drot.o drotg.o dscal.o dsdot.o dswap.o drotmg.o drotm.o
$(DBLAS1): $(FRC)
ZBLAS1 = dcabs1.o dzasum.o dznrm2.o izamax.o zaxpy.o zcopy.o \
ZBLAS1 = dcabs1.o dzasum.o dznrm2.o izamax.o zaxpy.o zaxpby.o zcopy.o \
zdotc.o zdotu.o zdscal.o zrotg.o zscal.o zswap.o zdrot.o
$(ZBLAS1): $(FRC)
+144
View File
@@ -0,0 +1,144 @@
*> \brief \b CAXPBY
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CAXPBY(N,CA,CX,INCX,CB,CY,INCY)
*
* .. Scalar Arguments ..
* COMPLEX CA,CB
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* COMPLEX CX(*),CY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CAXPBY constant times a vector plus constant times a vector.
*>
*> Y = ALPHA * X + BETA * Y
*>
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> number of elements in input vector(s)
*> \endverbatim
*>
*> \param[in] CA
*> \verbatim
*> CA is COMPLEX
*> On entry, CA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] CX
*> \verbatim
*> CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> storage spacing between elements of CX
*> \endverbatim
*>
*> \param[in] CB
*> \verbatim
*> CB is COMPLEX
*> On entry, CB specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] CY
*> \verbatim
*> CY is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> storage spacing between elements of CY
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*> \author Martin Koehler, MPI Magdeburg
*
*> \ingroup axpby
*
* =====================================================================
SUBROUTINE CAXPBY(N,CA,CX,INCX,CB,CY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
*
* .. Scalar Arguments ..
COMPLEX CA, CB
INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
COMPLEX CX(*),CY(*)
* ..
* .. External Subroutines ..
EXTERNAL CSCAL
*
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,IX,IY
* ..
IF (N.LE.0) RETURN
IF (CA .EQ. (0.0,0.0) .AND. CB.NE.(0.0,0.0)) THEN
CALL CSCAL(N,CB, CY, INCY)
RETURN
END IF
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
DO I = 1,N
CY(I) = CB*CY(I) + CA*CX(I)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
CY(IY) = CB*CY(IY) + CA*CX(IX)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
*
RETURN
*
* End of CAXBPY
*
END
+1
View File
@@ -85,6 +85,7 @@
*>
* =====================================================================
SUBROUTINE CAXPY(N,CA,CX,INCX,CY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -78,6 +78,7 @@
*>
* =====================================================================
SUBROUTINE CCOPY(N,CX,INCX,CY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -80,6 +80,7 @@
*>
* =====================================================================
COMPLEX FUNCTION CDOTC(N,CX,INCX,CY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -80,6 +80,7 @@
*>
* =====================================================================
COMPLEX FUNCTION CDOTU(N,CX,INCX,CY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -187,6 +187,7 @@
* =====================================================================
SUBROUTINE CGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,
+ BETA,Y,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+29 -7
View File
@@ -35,6 +35,16 @@
*>
*> alpha and beta are scalars, and A, B and C are matrices, with op( A )
*> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
*>
*> Note: if alpha and/or beta is zero, some parts of the matrix-matrix
*> operations are not performed. This results in the following NaN/Inf
*> propagation quirks:
*>
*> 1. If alpha is zero, NaNs or Infs in A or B do not affect the result.
*> 2. If both alpha and beta are zero, then a zero matrix is returned in C,
*> irrespective of any NaNs or Infs in A, B or C.
*> 3. If only beta is zero, alpha*op( A )*op( B ) is returned, irrespective
*> of any NaNs or Infs in C.
*> \endverbatim
*
* Arguments:
@@ -92,7 +102,9 @@
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> On entry, ALPHA specifies the scalar alpha. If ALPHA is zero the
*> values in A and B do not affect the result. This also means that
*> NaN/Inf propagation from A and B is inhibited if ALPHA is zero.
*> \endverbatim
*>
*> \param[in] A
@@ -102,7 +114,10 @@
*> Before entry with TRANSA = 'N' or 'n', the leading m by k
*> part of the array A must contain the matrix A, otherwise
*> the leading k by m part of the array A must contain the
*> matrix A.
*> matrix A, except if ALPHA is zero.
*> If ALPHA is zero, none of the values in A affect the result, even
*> if they are NaN/Inf. This also implies that if ALPHA is zero,
*> the matrix elements of A need not be initialized by the caller.
*> \endverbatim
*>
*> \param[in] LDA
@@ -121,7 +136,10 @@
*> Before entry with TRANSB = 'N' or 'n', the leading k by n
*> part of the array B must contain the matrix B, otherwise
*> the leading n by k part of the array B must contain the
*> matrix B.
*> matrix B, except if ALPHA is zero.
*> If ALPHA is zero, none of the values in B affect the result, even
*> if they are NaN/Inf. This also implies that if ALPHA is zero,
*> the matrix elements of B need not be initialized by the caller.
*> \endverbatim
*>
*> \param[in] LDB
@@ -136,16 +154,19 @@
*> \param[in] BETA
*> \verbatim
*> BETA is COMPLEX
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then C need not be set on input.
*> On entry, BETA specifies the scalar beta. If BETA is zero the
*> values in C do not affect the result. This also means that
*> NaN/Inf propagation from C is inhibited if BETA is zero.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is COMPLEX array, dimension ( LDC, N )
*> Before entry, the leading m by n part of the array C must
*> contain the matrix C, except when beta is zero, in which
*> case C need not be set on entry.
*> contain the matrix C, except if beta is zero.
*> If beta is zero, none of the values in C affect the result, even
*> if they are NaN/Inf. This also implies that if beta is zero,
*> the matrix elements of C need not be initialized by the caller.
*> On exit, the array C is overwritten by the m by n matrix
*> ( alpha*op( A )*op( B ) + beta*C ).
*> \endverbatim
@@ -185,6 +206,7 @@
* =====================================================================
SUBROUTINE CGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,
+ BETA,C,LDC)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -157,6 +157,7 @@
*>
* =====================================================================
SUBROUTINE CGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -127,6 +127,7 @@
*>
* =====================================================================
SUBROUTINE CGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -127,6 +127,7 @@
*>
* =====================================================================
SUBROUTINE CGERU(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -184,6 +184,7 @@
*>
* =====================================================================
SUBROUTINE CHBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -188,6 +188,7 @@
*>
* =====================================================================
SUBROUTINE CHEMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -151,6 +151,7 @@
*>
* =====================================================================
SUBROUTINE CHEMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -132,6 +132,7 @@
*>
* =====================================================================
SUBROUTINE CHER(UPLO,N,ALPHA,X,INCX,A,LDA)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -147,6 +147,7 @@
*>
* =====================================================================
SUBROUTINE CHER2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -194,6 +194,7 @@
*>
* =====================================================================
SUBROUTINE CHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -170,6 +170,7 @@
*>
* =====================================================================
SUBROUTINE CHERK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -146,6 +146,7 @@
*>
* =====================================================================
SUBROUTINE CHPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -127,6 +127,7 @@
*>
* =====================================================================
SUBROUTINE CHPR(UPLO,N,ALPHA,X,INCX,AP)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -142,6 +142,7 @@
*>
* =====================================================================
SUBROUTINE CHPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -86,6 +86,7 @@
!
! =====================================================================
subroutine CROTG( a, b, c, s )
implicit none
integer, parameter :: wp = kind(1.e0)
!
! -- Reference BLAS level1 routine --
+1
View File
@@ -75,6 +75,7 @@
*>
* =====================================================================
SUBROUTINE CSCAL(N,CA,CX,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -95,6 +95,7 @@
*
* =====================================================================
SUBROUTINE CSROT( N, CX, INCX, CY, INCY, C, S )
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -75,6 +75,7 @@
*>
* =====================================================================
SUBROUTINE CSSCAL(N,SA,CX,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -78,6 +78,7 @@
*>
* =====================================================================
SUBROUTINE CSWAP(N,CX,INCX,CY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -186,6 +186,7 @@
*>
* =====================================================================
SUBROUTINE CSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -185,6 +185,7 @@
*>
* =====================================================================
SUBROUTINE CSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -164,6 +164,7 @@
*>
* =====================================================================
SUBROUTINE CSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -183,6 +183,7 @@
*>
* =====================================================================
SUBROUTINE CTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -186,6 +186,7 @@
*>
* =====================================================================
SUBROUTINE CTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -139,6 +139,7 @@
*>
* =====================================================================
SUBROUTINE CTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -141,6 +141,7 @@
*>
* =====================================================================
SUBROUTINE CTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -174,6 +174,7 @@
*>
* =====================================================================
SUBROUTINE CTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -144,6 +144,7 @@
*>
* =====================================================================
SUBROUTINE CTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -177,6 +177,7 @@
*>
* =====================================================================
SUBROUTINE CTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -146,6 +146,7 @@
*>
* =====================================================================
SUBROUTINE CTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -68,6 +68,7 @@
*>
* =====================================================================
DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+149
View File
@@ -0,0 +1,149 @@
*> \brief \b DAXPBY
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DAXPBY(N,DA,DX,INCX,DB,DY,INCY)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION DA,DB
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* DOUBLE PRECISION DX(*),DY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DAXPBY constant times a vector plus constant times a vector.
*>
*> Y = ALPHA * X + BETA * Y
*>
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> number of elements in input vector(s)
*> \endverbatim
*>
*> \param[in] DA
*> \verbatim
*> DA is DOUBLE PRECISION
*> On entry, DA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] DX
*> \verbatim
*> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> storage spacing between elements of DX
*> \endverbatim
*>
*> \param[in] DB
*> \verbatim
*> DB is DOUBLE PRECISION
*> On entry, DB specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] DY
*> \verbatim
*> DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> storage spacing between elements of DY
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*> \author Martin Koehler, MPI Magdeburg
*
*> \ingroup axpby
*
* =====================================================================
SUBROUTINE DAXPBY(N,DA,DX,INCX,DB,DY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
*
* .. Scalar Arguments ..
DOUBLE PRECISION DA,DB
INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
DOUBLE PRECISION DX(*),DY(*)
* ..
* .. External Subroutines
EXTERNAL DSCAL
*
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,IX,IY,M,MP1
* ..
* .. Intrinsic Functions ..
INTRINSIC MOD
* ..
IF (N.LE.0) RETURN
* Scale if DA.EQ.0
IF (DA.EQ.0.0D0 .AND. DB.NE.0.0D0) THEN
CALL DSCAL(N, DB, DY, INCY)
RETURN
END IF
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
*
*
DO I = 1,N
DY(I) = DB*DY(I) + DA*DX(I)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
DY(IY) = DB*DY(IY) + DA*DX(IX)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
RETURN
*
* End of DAXPBY
*
END
+1
View File
@@ -86,6 +86,7 @@
*>
* =====================================================================
SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -44,6 +44,7 @@
*
* =====================================================================
DOUBLE PRECISION FUNCTION DCABS1(Z)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -79,6 +79,7 @@
*>
* =====================================================================
SUBROUTINE DCOPY(N,DX,INCX,DY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -79,6 +79,7 @@
*>
* =====================================================================
DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -185,6 +185,7 @@
* =====================================================================
SUBROUTINE DGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,
+ BETA,Y,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+35 -7
View File
@@ -35,6 +35,16 @@
*>
*> alpha and beta are scalars, and A, B and C are matrices, with op( A )
*> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
*>
*> Note: if alpha and/or beta is zero, some parts of the matrix-matrix
*> operations are not performed. This results in the following NaN/Inf
*> propagation quirks:
*>
*> 1. If alpha is zero, NaNs or Infs in A or B do not affect the result.
*> 2. If both alpha and beta are zero, then a zero matrix is returned in C,
*> irrespective of any NaNs or Infs in A, B or C.
*> 3. If only beta is zero, alpha*op( A )*op( B ) is returned, irrespective
*> of any NaNs or Infs in C.
*> \endverbatim
*
* Arguments:
@@ -51,6 +61,9 @@
*> TRANSA = 'T' or 't', op( A ) = A**T.
*>
*> TRANSA = 'C' or 'c', op( A ) = A**T.
*>
*> Note: TRANSA = 'C' is supported for the sake of API consistency
*> between all ?GEMM variants.
*> \endverbatim
*>
*> \param[in] TRANSB
@@ -64,6 +77,9 @@
*> TRANSB = 'T' or 't', op( B ) = B**T.
*>
*> TRANSB = 'C' or 'c', op( B ) = B**T.
*>
*> Note: TRANSB = 'C' is supported for the sake of API consistency
*> between all ?GEMM variants.
*> \endverbatim
*>
*> \param[in] M
@@ -92,7 +108,9 @@
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> On entry, ALPHA specifies the scalar alpha. If ALPHA is zero the
*> values in A and B do not affect the result. This also means that
*> NaN/Inf propagation from A and B is inhibited if ALPHA is zero.
*> \endverbatim
*>
*> \param[in] A
@@ -102,7 +120,10 @@
*> Before entry with TRANSA = 'N' or 'n', the leading m by k
*> part of the array A must contain the matrix A, otherwise
*> the leading k by m part of the array A must contain the
*> matrix A.
*> matrix A, except if ALPHA is zero.
*> If ALPHA is zero, none of the values in A affect the result, even
*> if they are NaN/Inf. This also implies that if ALPHA is zero,
*> the matrix elements of A need not be initialized by the caller.
*> \endverbatim
*>
*> \param[in] LDA
@@ -121,7 +142,10 @@
*> Before entry with TRANSB = 'N' or 'n', the leading k by n
*> part of the array B must contain the matrix B, otherwise
*> the leading n by k part of the array B must contain the
*> matrix B.
*> matrix B, except if ALPHA is zero.
*> If ALPHA is zero, none of the values in B affect the result, even
*> if they are NaN/Inf. This also implies that if ALPHA is zero,
*> the matrix elements of B need not be initialized by the caller.
*> \endverbatim
*>
*> \param[in] LDB
@@ -136,16 +160,19 @@
*> \param[in] BETA
*> \verbatim
*> BETA is DOUBLE PRECISION.
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then C need not be set on input.
*> On entry, BETA specifies the scalar beta. If BETA is zero the
*> values in C do not affect the result. This also means that
*> NaN/Inf propagation from C is inhibited if BETA is zero.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is DOUBLE PRECISION array, dimension ( LDC, N )
*> Before entry, the leading m by n part of the array C must
*> contain the matrix C, except when beta is zero, in which
*> case C need not be set on entry.
*> contain the matrix C, except if beta is zero.
*> If beta is zero, none of the values in C affect the result, even
*> if they are NaN/Inf. This also implies that if beta is zero,
*> the matrix elements of C need not be initialized by the caller.
*> On exit, the array C is overwritten by the m by n matrix
*> ( alpha*op( A )*op( B ) + beta*C ).
*> \endverbatim
@@ -185,6 +212,7 @@
* =====================================================================
SUBROUTINE DGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,
+ BETA,C,LDC)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -155,6 +155,7 @@
*>
* =====================================================================
SUBROUTINE DGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -127,6 +127,7 @@
*>
* =====================================================================
SUBROUTINE DGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+3 -2
View File
@@ -85,11 +85,12 @@
!> \endverbatim
!>
! =====================================================================
function DNRM2( n, x, incx )
function DNRM2( n, x, incx )
implicit none
integer, parameter :: wp = kind(1.d0)
real(wp) :: DNRM2
!
! -- Reference BLAS level1 routine (version 3.9.1) --
! -- Reference BLAS level1 routine --
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
! March 2021
+1
View File
@@ -89,6 +89,7 @@
*>
* =====================================================================
SUBROUTINE DROT(N,DX,INCX,DY,INCY,C,S)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -89,6 +89,7 @@
!
! =====================================================================
subroutine DROTG( a, b, c, s )
implicit none
integer, parameter :: wp = kind(1.d0)
!
! -- Reference BLAS level1 routine --
+1
View File
@@ -97,6 +97,7 @@
*
* =====================================================================
SUBROUTINE DROTM(N,DX,INCX,DY,INCY,DPARAM)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -87,6 +87,7 @@
*
* =====================================================================
SUBROUTINE DROTMG(DD1,DD2,DX1,DY1,DPARAM)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -181,6 +181,7 @@
*>
* =====================================================================
SUBROUTINE DSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -76,6 +76,7 @@
*>
* =====================================================================
SUBROUTINE DSCAL(N,DA,DX,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -116,6 +116,7 @@
*>
* =====================================================================
DOUBLE PRECISION FUNCTION DSDOT(N,SX,INCX,SY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -144,6 +144,7 @@
*>
* =====================================================================
SUBROUTINE DSPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -124,6 +124,7 @@
*>
* =====================================================================
SUBROUTINE DSPR(UPLO,N,ALPHA,X,INCX,AP)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -139,6 +139,7 @@
*>
* =====================================================================
SUBROUTINE DSPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -79,6 +79,7 @@
*>
* =====================================================================
SUBROUTINE DSWAP(N,DX,INCX,DY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -186,6 +186,7 @@
*>
* =====================================================================
SUBROUTINE DSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -149,6 +149,7 @@
*>
* =====================================================================
SUBROUTINE DSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -129,6 +129,7 @@
*>
* =====================================================================
SUBROUTINE DSYR(UPLO,N,ALPHA,X,INCX,A,LDA)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -144,6 +144,7 @@
*>
* =====================================================================
SUBROUTINE DSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -189,6 +189,7 @@
*>
* =====================================================================
SUBROUTINE DSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -166,6 +166,7 @@
*>
* =====================================================================
SUBROUTINE DSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -183,6 +183,7 @@
*>
* =====================================================================
SUBROUTINE DTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -186,6 +186,7 @@
*>
* =====================================================================
SUBROUTINE DTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -139,6 +139,7 @@
*>
* =====================================================================
SUBROUTINE DTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -141,6 +141,7 @@
*>
* =====================================================================
SUBROUTINE DTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -174,6 +174,7 @@
*>
* =====================================================================
SUBROUTINE DTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -144,6 +144,7 @@
*>
* =====================================================================
SUBROUTINE DTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -178,6 +178,7 @@
*>
* =====================================================================
SUBROUTINE DTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -140,6 +140,7 @@
*
* =====================================================================
SUBROUTINE DTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -69,6 +69,7 @@
*>
* =====================================================================
DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+3 -2
View File
@@ -86,11 +86,12 @@
!> \endverbatim
!>
! =====================================================================
function DZNRM2( n, x, incx )
function DZNRM2( n, x, incx )
implicit none
integer, parameter :: wp = kind(1.d0)
real(wp) :: DZNRM2
!
! -- Reference BLAS level1 routine (version 3.9.1) --
! -- Reference BLAS level1 routine --
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
! March 2021
+193
View File
@@ -0,0 +1,193 @@
!> \brief \b ICAMAX
!
! =========== DOCUMENTATION ===========
!
! Online html documentation available at
! http://www.netlib.org/lapack/explore-html/
!
! Definition:
! ===========
!
! INTEGER FUNCTION ICAMAX(N,X,INCX)
!
! .. Scalar Arguments ..
! INTEGER INCX,N
! ..
! .. Array Arguments ..
! COMPLEX X(*)
! ..
!
!
!> \par Purpose:
! =============
!>
!> \verbatim
!>
!> ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)|
!> \endverbatim
!
! Arguments:
! ==========
!
!> \param[in] N
!> \verbatim
!> N is INTEGER
!> number of elements in input vector(s)
!> \endverbatim
!>
!> \param[in] X
!> \verbatim
!> X is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
!> \endverbatim
!>
!> \param[in] INCX
!> \verbatim
!> INCX is INTEGER
!> storage spacing between elements of X
!> \endverbatim
!
! Authors:
! ========
!
!> James Demmel, University of California Berkeley, USA
!> Weslley Pereira, National Renewable Energy Laboratory, USA
!
!> \ingroup iamax
!
!> \par Further Details:
! =====================
!>
!> \verbatim
!>
!> James Demmel et al. Proposed Consistent Exception Handling for the BLAS and
!> LAPACK, 2022 (https://arxiv.org/abs/2207.09281).
!>
!> \endverbatim
!>
! =====================================================================
integer function icamax(n, x, incx)
implicit none
integer, parameter :: wp = kind(1.e0)
!
! -- Reference BLAS level1 routine --
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
!
! .. Constants ..
real(wp), parameter :: hugeval = huge(0.0_wp)
!
! .. Scalar Arguments ..
integer :: n, incx
!
! .. Array Arguments ..
complex(wp) :: x(*)
! ..
! .. Local Scalars ..
integer :: i, j, ix, jx
real(wp) :: val, smax
logical :: scaledsmax
! ..
! .. Intrinsic Functions ..
intrinsic :: abs, aimag, huge, real
!
! Quick return if possible
!
icamax = 0
if (n < 1 .or. incx < 1) return
!
icamax = 1
if (n == 1) return
!
icamax = 0
scaledsmax = .false.
smax = -1
!
! scaledsmax = .true. indicates that x(icamax) is finite but
! abs(real(x(icamax))) + abs(aimag(x(icamax))) overflows
!
if (incx == 1) then
! code for increment equal to 1
do i = 1, n
if (x(i) /= x(i)) then
! return when first NaN found
icamax = i
return
elseif (abs(real(x(i))) > hugeval .or. abs(aimag(x(i))) > hugeval) then
! keep looking for first NaN
do j = i+1, n
if (x(j) /= x(j)) then
! return when first NaN found
icamax = j
return
endif
enddo
! record location of first Inf
icamax = i
return
else ! still no Inf found yet
if (.not. scaledsmax) then
! no abs(real(x(i))) + abs(aimag(x(i))) = Inf yet
val = abs(real(x(i))) + abs(aimag(x(i)))
if (val > hugeval) then
scaledsmax = .true.
smax = 0.25*abs(real(x(i))) + 0.25*abs(aimag(x(i)))
icamax = i
elseif (val > smax) then ! everything finite so far
smax = val
icamax = i
endif
else ! scaledsmax
val = 0.25*abs(real(x(i))) + 0.25*abs(aimag(x(i)))
if (val > smax) then
smax = val
icamax = i
endif
endif
endif
end do
else
! code for increment not equal to 1
ix = 1
do i = 1, n
if (x(ix) /= x(ix)) then
! return when first NaN found
icamax = i
return
elseif (abs(real(x(ix))) > hugeval .or. abs(aimag(x(ix))) > hugeval) then
! keep looking for first NaN
jx = ix + incx
do j = i+1, n
if (x(jx) /= x(jx)) then
! return when first NaN found
icamax = j
return
endif
jx = jx + incx
enddo
! record location of first Inf
icamax = i
return
else ! still no Inf found yet
if (.not. scaledsmax) then
! no abs(real(x(ix))) + abs(aimag(x(ix))) = Inf yet
val = abs(real(x(ix))) + abs(aimag(x(ix)))
if (val > hugeval) then
scaledsmax = .true.
smax = 0.25*abs(real(x(ix))) + 0.25*abs(aimag(x(ix)))
icamax = i
elseif (val > smax) then ! everything finite so far
smax = val
icamax = i
endif
else ! scaledsmax
val = 0.25*abs(real(x(ix))) + 0.25*abs(aimag(x(ix)))
if (val > smax) then
smax = val
icamax = i
endif
endif
endif
ix = ix + incx
end do
endif
end
+1
View File
@@ -68,6 +68,7 @@
*>
* =====================================================================
INTEGER FUNCTION IDAMAX(N,DX,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -68,6 +68,7 @@
*>
* =====================================================================
INTEGER FUNCTION ISAMAX(N,SX,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+193
View File
@@ -0,0 +1,193 @@
!> \brief \b IZAMAX
!
! =========== DOCUMENTATION ===========
!
! Online html documentation available at
! http://www.netlib.org/lapack/explore-html/
!
! Definition:
! ===========
!
! INTEGER FUNCTION IZAMAX(N,X,INCX)
!
! .. Scalar Arguments ..
! INTEGER INCX,N
! ..
! .. Array Arguments ..
! DOUBLE COMPLEX X(*)
! ..
!
!
!> \par Purpose:
! =============
!>
!> \verbatim
!>
!> IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)|
!> \endverbatim
!
! Arguments:
! ==========
!
!> \param[in] N
!> \verbatim
!> N is INTEGER
!> number of elements in input vector(s)
!> \endverbatim
!>
!> \param[in] X
!> \verbatim
!> X is DOUBLE COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
!> \endverbatim
!>
!> \param[in] INCX
!> \verbatim
!> INCX is INTEGER
!> storage spacing between elements of X
!> \endverbatim
!
! Authors:
! ========
!
!> James Demmel, University of California Berkeley, USA
!> Weslley Pereira, National Renewable Energy Laboratory, USA
!
!> \ingroup iamax
!
!> \par Further Details:
! =====================
!>
!> \verbatim
!>
!> James Demmel et al. Proposed Consistent Exception Handling for the BLAS and
!> LAPACK, 2022 (https://arxiv.org/abs/2207.09281).
!>
!> \endverbatim
!>
! =====================================================================
integer function izamax(n, x, incx)
implicit none
integer, parameter :: wp = kind(1.d0)
!
! -- Reference BLAS level1 routine --
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
!
! .. Constants ..
real(wp), parameter :: hugeval = huge(0.0_wp)
!
! .. Scalar Arguments ..
integer :: n, incx
!
! .. Array Arguments ..
complex(wp) :: x(*)
! ..
! .. Local Scalars ..
integer :: i, j, ix, jx
real(wp) :: val, smax
logical :: scaledsmax
! ..
! .. Intrinsic Functions ..
intrinsic :: abs, dimag, huge, real
!
! Quick return if possible
!
izamax = 0
if (n < 1 .or. incx < 1) return
!
izamax = 1
if (n == 1) return
!
izamax = 0
scaledsmax = .false.
smax = -1
!
! scaledsmax = .true. indicates that x(izamax) is finite but
! abs(real(x(izamax))) + abs(dimag(x(izamax))) overflows
!
if (incx == 1) then
! code for increment equal to 1
do i = 1, n
if (x(i) /= x(i)) then
! return when first NaN found
izamax = i
return
elseif (abs(real(x(i))) > hugeval .or. abs(dimag(x(i))) > hugeval) then
! keep looking for first NaN
do j = i+1, n
if (x(j) /= x(j)) then
! return when first NaN found
izamax = j
return
endif
enddo
! record location of first Inf
izamax = i
return
else ! still no Inf found yet
if (.not. scaledsmax) then
! no abs(real(x(i))) + abs(dimag(x(i))) = Inf yet
val = abs(real(x(i))) + abs(dimag(x(i)))
if (val > hugeval) then
scaledsmax = .true.
smax = 0.25*abs(real(x(i))) + 0.25*abs(dimag(x(i)))
izamax = i
elseif (val > smax) then ! everything finite so far
smax = val
izamax = i
endif
else ! scaledsmax
val = 0.25*abs(real(x(i))) + 0.25*abs(dimag(x(i)))
if (val > smax) then
smax = val
izamax = i
endif
endif
endif
end do
else
! code for increment not equal to 1
ix = 1
do i = 1, n
if (x(ix) /= x(ix)) then
! return when first NaN found
izamax = i
return
elseif (abs(real(x(ix))) > hugeval .or. abs(dimag(x(ix))) > hugeval) then
! keep looking for first NaN
jx = ix + incx
do j = i+1, n
if (x(jx) /= x(jx)) then
! return when first NaN found
izamax = j
return
endif
jx = jx + incx
enddo
! record location of first Inf
izamax = i
return
else ! still no Inf found yet
if (.not. scaledsmax) then
! no abs(real(x(ix))) + abs(dimag(x(ix))) = Inf yet
val = abs(real(x(ix))) + abs(dimag(x(ix)))
if (val > hugeval) then
scaledsmax = .true.
smax = 0.25*abs(real(x(ix))) + 0.25*abs(dimag(x(ix)))
izamax = i
elseif (val > smax) then ! everything finite so far
smax = val
izamax = i
endif
else ! scaledsmax
val = 0.25*abs(real(x(ix))) + 0.25*abs(dimag(x(ix)))
if (val > smax) then
smax = val
izamax = i
endif
endif
endif
ix = ix + incx
end do
endif
end
+1
View File
@@ -50,6 +50,7 @@
*
* =====================================================================
LOGICAL FUNCTION LSAME(CA,CB)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -69,6 +69,7 @@
*>
* =====================================================================
REAL FUNCTION SASUM(N,SX,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+148
View File
@@ -0,0 +1,148 @@
*> \brief \b SAXPBY
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE SAXPBY(N,SA,SX,INCX,SB,SY,INCY)
*
* .. Scalar Arguments ..
* REAL SA,SB
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* REAL SX(*),SY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SAXPBY constant times a vector plus constant times a vector.
*>
*> Y = ALPHA * X + BETA * Y
*>
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> number of elements in input vector(s)
*> \endverbatim
*>
*> \param[in] SA
*> \verbatim
*> SA is REAL
*> On entry, SA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] SX
*> \verbatim
*> SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> storage spacing between elements of SX
*> \endverbatim
*>
*> \param[in] SB
*> \verbatim
*> SB is REAL
*> On entry, SB specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] SY
*> \verbatim
*> SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> storage spacing between elements of SY
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*> \author Martin Koehler, MPI Magdeburg
*
*> \ingroup axpby
*
* =====================================================================
SUBROUTINE SAXPBY(N,SA,SX,INCX,SB,SY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
*
* .. Scalar Arguments ..
REAL SA,SB
INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
REAL SX(*),SY(*)
* ..
* .. External Subroutines ..
EXTERNAL SSCAL
*
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,IX,IY,M,MP1
* ..
* .. Intrinsic Functions ..
INTRINSIC MOD
* ..
IF (N.LE.0) RETURN
* Scale if SA.EQ.0
IF (SA.EQ.0.0E0 .AND. SB.NE.0.0E0) THEN
CALL SSCAL(N, SB, SY, INCY)
RETURN
END IF
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
DO I = 1,N
SY(I) = SB*SY(I) + SA*SX(I)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
SY(IY) = SB*SY(IY) + SA*SX(IX)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
RETURN
*
* End of SAXPBY
*
END
+1
View File
@@ -86,6 +86,7 @@
*>
* =====================================================================
SUBROUTINE SAXPY(N,SA,SX,INCX,SY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -43,6 +43,7 @@
*
* =====================================================================
REAL FUNCTION SCABS1(Z)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -69,6 +69,7 @@
*>
* =====================================================================
REAL FUNCTION SCASUM(N,CX,INCX)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+3 -2
View File
@@ -86,11 +86,12 @@
!> \endverbatim
!>
! =====================================================================
function SCNRM2( n, x, incx )
function SCNRM2( n, x, incx )
implicit none
integer, parameter :: wp = kind(1.e0)
real(wp) :: SCNRM2
!
! -- Reference BLAS level1 routine (version 3.9.1) --
! -- Reference BLAS level1 routine --
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
! March 2021
+1
View File
@@ -79,6 +79,7 @@
*>
* =====================================================================
SUBROUTINE SCOPY(N,SX,INCX,SY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -79,6 +79,7 @@
*>
* =====================================================================
REAL FUNCTION SDOT(N,SX,INCX,SY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -110,6 +110,7 @@
*>
* =====================================================================
REAL FUNCTION SDSDOT(N,SB,SX,INCX,SY,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -185,6 +185,7 @@
* =====================================================================
SUBROUTINE SGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,
+ BETA,Y,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+35 -7
View File
@@ -35,6 +35,16 @@
*>
*> alpha and beta are scalars, and A, B and C are matrices, with op( A )
*> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
*>
*> Note: if alpha and/or beta is zero, some parts of the matrix-matrix
*> operations are not performed. This results in the following NaN/Inf
*> propagation quirks:
*>
*> 1. If alpha is zero, NaNs or Infs in A or B do not affect the result.
*> 2. If both alpha and beta are zero, then a zero matrix is returned in C,
*> irrespective of any NaNs or Infs in A, B or C.
*> 3. If only beta is zero, alpha*op( A )*op( B ) is returned, irrespective
*> of any NaNs or Infs in C.
*> \endverbatim
*
* Arguments:
@@ -51,6 +61,9 @@
*> TRANSA = 'T' or 't', op( A ) = A**T.
*>
*> TRANSA = 'C' or 'c', op( A ) = A**T.
*>
*> Note: TRANSA = 'C' is supported for the sake of API consistency
*> between all ?GEMM variants.
*> \endverbatim
*>
*> \param[in] TRANSB
@@ -64,6 +77,9 @@
*> TRANSB = 'T' or 't', op( B ) = B**T.
*>
*> TRANSB = 'C' or 'c', op( B ) = B**T.
*>
*> Note: TRANSB = 'C' is supported for the sake of API consistency
*> between all ?GEMM variants.
*> \endverbatim
*>
*> \param[in] M
@@ -92,7 +108,9 @@
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is REAL
*> On entry, ALPHA specifies the scalar alpha.
*> On entry, ALPHA specifies the scalar alpha. If ALPHA is zero the
*> values in A and B do not affect the result. This also means that
*> NaN/Inf propagation from A and B is inhibited if ALPHA is zero.
*> \endverbatim
*>
*> \param[in] A
@@ -102,7 +120,10 @@
*> Before entry with TRANSA = 'N' or 'n', the leading m by k
*> part of the array A must contain the matrix A, otherwise
*> the leading k by m part of the array A must contain the
*> matrix A.
*> matrix A, except if ALPHA is zero.
*> If ALPHA is zero, none of the values in A affect the result, even
*> if they are NaN/Inf. This also implies that if ALPHA is zero,
*> the matrix elements of A need not be initialized by the caller.
*> \endverbatim
*>
*> \param[in] LDA
@@ -121,7 +142,10 @@
*> Before entry with TRANSB = 'N' or 'n', the leading k by n
*> part of the array B must contain the matrix B, otherwise
*> the leading n by k part of the array B must contain the
*> matrix B.
*> matrix B, except if ALPHA is zero.
*> If ALPHA is zero, none of the values in B affect the result, even
*> if they are NaN/Inf. This also implies that if ALPHA is zero,
*> the matrix elements of B need not be initialized by the caller.
*> \endverbatim
*>
*> \param[in] LDB
@@ -136,16 +160,19 @@
*> \param[in] BETA
*> \verbatim
*> BETA is REAL
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then C need not be set on input.
*> On entry, BETA specifies the scalar beta. If BETA is zero the
*> values in C do not affect the result. This also means that
*> NaN/Inf propagation from C is inhibited if BETA is zero.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is REAL array, dimension ( LDC, N )
*> Before entry, the leading m by n part of the array C must
*> contain the matrix C, except when beta is zero, in which
*> case C need not be set on entry.
*> contain the matrix C, except if beta is zero.
*> If beta is zero, none of the values in C affect the result, even
*> if they are NaN/Inf. This also implies that if beta is zero,
*> the matrix elements of C need not be initialized by the caller.
*> On exit, the array C is overwritten by the m by n matrix
*> ( alpha*op( A )*op( B ) + beta*C ).
*> \endverbatim
@@ -185,6 +212,7 @@
* =====================================================================
SUBROUTINE SGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,
+ BETA,C,LDC)
IMPLICIT NONE
*
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -155,6 +155,7 @@
*>
* =====================================================================
SUBROUTINE SGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -127,6 +127,7 @@
*>
* =====================================================================
SUBROUTINE SGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
IMPLICIT NONE
*
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+3 -2
View File
@@ -85,11 +85,12 @@
!> \endverbatim
!>
! =====================================================================
function SNRM2( n, x, incx )
function SNRM2( n, x, incx )
implicit none
integer, parameter :: wp = kind(1.e0)
real(wp) :: SNRM2
!
! -- Reference BLAS level1 routine (version 3.9.1) --
! -- Reference BLAS level1 routine --
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
! March 2021

Some files were not shown because too many files have changed in this diff Show More