Merge branch 'develop' of https://github.com/OpenMathLib/OpenBLAS into develop
This commit is contained in:
+89
-86
@@ -1,6 +1,6 @@
|
||||
macos_instance:
|
||||
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
|
||||
|
||||
#macos_instance:
|
||||
# image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
|
||||
#
|
||||
#task:
|
||||
# name: AppleM1/LLVM
|
||||
# compile_script:
|
||||
@@ -9,7 +9,7 @@ macos_instance:
|
||||
# - export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
|
||||
# - export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
|
||||
# - make TARGET=VORTEX USE_OPENMP=1 CC=clang
|
||||
|
||||
#
|
||||
#task:
|
||||
# name: AppleM1/LLVM/ILP64
|
||||
# compile_script:
|
||||
@@ -18,7 +18,7 @@ macos_instance:
|
||||
# - export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
|
||||
# - export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
|
||||
# - make TARGET=VORTEX USE_OPENMP=1 CC=clang INTERFACE64=1
|
||||
|
||||
#
|
||||
#task:
|
||||
# name: AppleM1/LLVM/CMAKE
|
||||
# compile_script:
|
||||
@@ -30,7 +30,7 @@ macos_instance:
|
||||
# - cd build
|
||||
# - cmake -DTARGET=VORTEX -DCMAKE_C_COMPILER=clang -DBUILD_SHARED_LIBS=ON ..
|
||||
# - make -j 4
|
||||
|
||||
#
|
||||
#task:
|
||||
# name: AppleM1/GCC/MAKE/OPENMP
|
||||
# compile_script:
|
||||
@@ -39,90 +39,93 @@ macos_instance:
|
||||
# - export LDFLAGS="-L/opt/homebrew/lib"
|
||||
# - export CPPFLAGS="-I/opt/homebrew/include"
|
||||
# - make CC=gcc-11 FC=gfortran-11 USE_OPENMP=1
|
||||
|
||||
macos_instance:
|
||||
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
|
||||
task:
|
||||
name: AppleM1/LLVM x86_64 xbuild
|
||||
compile_script:
|
||||
- #brew install llvm
|
||||
- export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
|
||||
- export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
|
||||
- export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
|
||||
- export ARCHS="i386 x86_64"
|
||||
- export ARCHS_STANDARD="i386 x86_64"
|
||||
- export ARCHS_STANDARD_32_64_BIT="i386 x86_64"
|
||||
- export ARCHS_STANDARD_64_BIT=x86_64
|
||||
- export ARCHS_STANDARD_INCLUDING_64_BIT="i386 x86_64"
|
||||
- export ARCHS_UNIVERSAL_IPHONE_OS="i386 x86_64"
|
||||
- export VALID_ARCHS="i386 x86_64"
|
||||
- xcrun --sdk macosx --show-sdk-path
|
||||
- xcodebuild -version
|
||||
- export CC=/Applications/Xcode_26.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk -arch x86_64"
|
||||
- make TARGET=CORE2 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
|
||||
always:
|
||||
config_artifacts:
|
||||
path: "*conf*"
|
||||
type: text/plain
|
||||
#
|
||||
#macos_instance:
|
||||
# image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
|
||||
#task:
|
||||
# name: AppleM1/LLVM x86_64 xbuild
|
||||
# compile_script:
|
||||
# - #brew install llvm
|
||||
# - export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
|
||||
# - export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
|
||||
# - export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
|
||||
# - export ARCHS="i386 x86_64"
|
||||
# - export ARCHS_STANDARD="i386 x86_64"
|
||||
# - export ARCHS_STANDARD_32_64_BIT="i386 x86_64"
|
||||
# - export ARCHS_STANDARD_64_BIT=x86_64
|
||||
# - export ARCHS_STANDARD_INCLUDING_64_BIT="i386 x86_64"
|
||||
# - export ARCHS_UNIVERSAL_IPHONE_OS="i386 x86_64"
|
||||
# - export VALID_ARCHS="i386 x86_64"
|
||||
# - xcrun --sdk macosx --show-sdk-path
|
||||
# - xcodebuild -version
|
||||
# - export CC=/Applications/Xcode_26.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
# - export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk -arch x86_64"
|
||||
# - make TARGET=CORE2 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
|
||||
# always:
|
||||
# config_artifacts:
|
||||
# path: "*conf*"
|
||||
# type: text/plain
|
||||
# lib_artifacts:
|
||||
# path: "libopenblas*"
|
||||
# type: application/octet-streamm
|
||||
#
|
||||
#macos_instance:
|
||||
# image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
|
||||
#task:
|
||||
# name: AppleM1/LLVM armv8-ios xbuild
|
||||
# compile_script:
|
||||
# - #brew install llvm
|
||||
# - export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
|
||||
# - export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
|
||||
# - export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
|
||||
# - export CC=/Applications/Xcode_26.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
# - export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.0.sdk -arch arm64 -miphoneos-version-min=10.0"
|
||||
# - xcrun --sdk iphoneos --show-sdk-path
|
||||
# - ls -l /Applications
|
||||
# - make TARGET=ARMV8 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 CROSS=1
|
||||
# always:
|
||||
# config_artifacts:
|
||||
# path: "*conf*"
|
||||
# type: text/plain
|
||||
#
|
||||
#macos_instance:
|
||||
# image: ghcr.io/cirruslabs/macos-tahoe-xcode:latest
|
||||
#task:
|
||||
# name: AppleM1/LLVM armv7-androidndk xbuild
|
||||
# compile_script:
|
||||
# - brew install --cask android-ndk
|
||||
# - export ANDROID_NDK_HOME="/opt/homebrew/share/android-ndk"
|
||||
# - export CC=/opt/homebrew/share/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi23-clang
|
||||
# - export AR=/opt/homebrew/share/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ar
|
||||
# - export RANLIB=/opt/homebrew/share/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ranlib
|
||||
# - make TARGET=ARMV7 ARM_SOFTFP_ABI=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
|
||||
# always:
|
||||
# config_artifacts:
|
||||
# path: "*conf*"
|
||||
# type: text/plain
|
||||
#
|
||||
#task:
|
||||
# name: NeoverseN1
|
||||
# arm_container:
|
||||
# image: node:latest
|
||||
# compile_script:
|
||||
# - make
|
||||
#
|
||||
# task:
|
||||
# name: NeoverseN1-ILP64
|
||||
# arm_container:
|
||||
# image: node:latest
|
||||
# compile_script:
|
||||
# - make INTERFACE64=1
|
||||
#
|
||||
#task:
|
||||
# name: NeoverseN1-OMP
|
||||
# arm_container:
|
||||
# image: node:latest
|
||||
# cpu: 8
|
||||
# compile_script:
|
||||
# - make USE_OPENMP=1
|
||||
|
||||
macos_instance:
|
||||
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
|
||||
task:
|
||||
name: AppleM1/LLVM armv8-ios xbuild
|
||||
compile_script:
|
||||
- #brew install llvm
|
||||
- export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
|
||||
- export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
|
||||
- export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
|
||||
- export CC=/Applications/Xcode_26.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.0.sdk -arch arm64 -miphoneos-version-min=10.0"
|
||||
- xcrun --sdk iphoneos --show-sdk-path
|
||||
- ls -l /Applications
|
||||
- make TARGET=ARMV8 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 CROSS=1
|
||||
always:
|
||||
config_artifacts:
|
||||
path: "*conf*"
|
||||
type: text/plain
|
||||
|
||||
macos_instance:
|
||||
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
|
||||
task:
|
||||
name: AppleM1/LLVM armv7-androidndk xbuild
|
||||
compile_script:
|
||||
- brew install --cask android-ndk
|
||||
- export ANDROID_NDK_HOME="/opt/homebrew/share/android-ndk"
|
||||
- export CC=/opt/homebrew/share/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi23-clang
|
||||
- make TARGET=ARMV7 ARM_SOFTFP_ABI=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
|
||||
always:
|
||||
config_artifacts:
|
||||
path: "*conf*"
|
||||
type: text/plain
|
||||
|
||||
task:
|
||||
name: NeoverseN1
|
||||
arm_container:
|
||||
image: node:latest
|
||||
compile_script:
|
||||
- make
|
||||
|
||||
task:
|
||||
name: NeoverseN1-ILP64
|
||||
arm_container:
|
||||
image: node:latest
|
||||
compile_script:
|
||||
- make INTERFACE64=1
|
||||
|
||||
task:
|
||||
name: NeoverseN1-OMP
|
||||
arm_container:
|
||||
image: node:latest
|
||||
cpu: 8
|
||||
compile_script:
|
||||
- make USE_OPENMP=1
|
||||
|
||||
FreeBSD_task:
|
||||
name: FreeBSD-gcc
|
||||
|
||||
@@ -10,7 +10,7 @@ permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-windows:
|
||||
if: "github.repository == 'OpenMathLib/OpenBLAS'"
|
||||
runs-on: macos-14
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Print system information
|
||||
run: |
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Compilation cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.ccache
|
||||
# We include the commit sha in the cache key, as new cache entries are
|
||||
@@ -155,3 +155,141 @@ jobs:
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
xbuild-x86_64:
|
||||
if: "github.repository == 'OpenMathLib/OpenBLAS'"
|
||||
runs-on: macos-26
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Print system information
|
||||
run: |
|
||||
if [ "$RUNNER_OS" == "macOS" ]; then
|
||||
sysctl -a | grep machdep.cpu
|
||||
else
|
||||
echo "::error::$RUNNER_OS not supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||
sudo apt-get install -y gfortran cmake ccache libtinfo5
|
||||
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||
# It looks like "gfortran" isn't working correctly unless "gcc" is re-installed.
|
||||
brew reinstall gcc
|
||||
brew install coreutils ccache
|
||||
brew install llvm
|
||||
else
|
||||
echo "::error::$RUNNER_OS not supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Crossbuild OpenBLAS to x86_64
|
||||
run: |
|
||||
#export PATH=/opt/homebrew/opt/llvm/bin:$PATH
|
||||
#export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
|
||||
#export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
|
||||
export ARCHS="i386 x86_64"
|
||||
export ARCHS_STANDARD="i386 x86_64"
|
||||
export ARCHS_STANDARD_32_64_BIT="i386 x86_64"
|
||||
export ARCHS_STANDARD_64_BIT=x86_64
|
||||
export ARCHS_STANDARD_INCLUDING_64_BIT="i386 x86_64"
|
||||
export ARCHS_UNIVERSAL_IPHONE_OS="i386 x86_64"
|
||||
export VALID_ARCHS="i386 x86_64"
|
||||
xcrun --sdk macosx --show-sdk-path
|
||||
xcodebuild -version
|
||||
export CC=/Applications/Xcode_26.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk -arch x86_64"
|
||||
make TARGET=CORE2 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
|
||||
|
||||
xbuild-ios:
|
||||
if: "github.repository == 'OpenMathLib/OpenBLAS'"
|
||||
runs-on: macos-26
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Print system information
|
||||
run: |
|
||||
if [ "$RUNNER_OS" == "macOS" ]; then
|
||||
sysctl -a | grep machdep.cpu
|
||||
else
|
||||
echo "::error::$RUNNER_OS not supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||
sudo apt-get install -y gfortran cmake ccache libtinfo5
|
||||
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||
# It looks like "gfortran" isn't working correctly unless "gcc" is re-installed.
|
||||
brew reinstall gcc
|
||||
brew install coreutils ccache
|
||||
brew install llvm
|
||||
else
|
||||
echo "::error::$RUNNER_OS not supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Crossbuild to iOS
|
||||
run: |
|
||||
CC="$(xcrun --sdk iphoneos --find clang)"
|
||||
SDKROOT="$(xcrun --sdk iphoneos --show-sdk-path)"
|
||||
echo "CC=${CC}"
|
||||
echo "SDKROOT=${SDKROOT}"
|
||||
make TARGET=ARMV8 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 \
|
||||
CC="${CC}" CFLAGS="-O2 -Wno-macro-redefined -isysroot ${SDKROOT} -arch arm64 -miphoneos-version-min=10.0"
|
||||
|
||||
xbuild-ios32:
|
||||
if: "github.repository == 'OpenMathLib/OpenBLAS'"
|
||||
runs-on: macos-26
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Print system information
|
||||
run: |
|
||||
if [ "$RUNNER_OS" == "macOS" ]; then
|
||||
sysctl -a | grep machdep.cpu
|
||||
else
|
||||
echo "::error::$RUNNER_OS not supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||
sudo apt-get install -y gfortran cmake ccache libtinfo5
|
||||
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||
# It looks like "gfortran" isn't working correctly unless "gcc" is re-installed.
|
||||
brew reinstall gcc
|
||||
brew install coreutils ccache
|
||||
brew install llvm
|
||||
brew install --cask android-ndk
|
||||
else
|
||||
echo "::error::$RUNNER_OS not supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: AppleM1/LLVM armv7-androidndk xbuild
|
||||
run: |
|
||||
export ANDROID_NDK_HOME="/opt/homebrew/share/android-ndk"
|
||||
export CC=/opt/homebrew/share/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi23-clang
|
||||
export AR=/opt/homebrew/share/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ar
|
||||
export RANLIB=/opt/homebrew/share/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ranlib
|
||||
make TARGET=ARMV7 ARM_SOFTFP_ABI=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Print system information
|
||||
run: |
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Compilation cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.ccache
|
||||
# We include the commit sha in the cache key, as new cache entries are
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: install build deps
|
||||
run: |
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
gcc-${{ matrix.apt_triple }} gfortran-${{ matrix.apt_triple }} libgomp1-riscv64-cross libglib2.0-dev
|
||||
|
||||
- name: checkout qemu
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: XUANTIE-RV/qemu
|
||||
path: qemu
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
make install
|
||||
|
||||
- name: Compilation cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ccache-${{ runner.os }}-${{ matrix.target }}-${{ github.ref }}-${{ github.sha }}
|
||||
|
||||
@@ -21,8 +21,8 @@ jobs:
|
||||
pyver: ["3.12"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v3
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: ${{ matrix.pyver }}
|
||||
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Compilation cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.ccache
|
||||
# We include the commit sha in the cache key, as new cache entries are
|
||||
@@ -147,8 +147,9 @@ jobs:
|
||||
OPENBLAS_NUM_THREADS=1 pytest benchmarks/bench_blas.py -k 'gesdd'
|
||||
|
||||
- name: Run benchmarks
|
||||
uses: CodSpeedHQ/action@v3
|
||||
uses: CodSpeedHQ/action@v4
|
||||
with:
|
||||
mode: simulation
|
||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||
run: |
|
||||
cd benchmark/pybench
|
||||
|
||||
@@ -14,11 +14,11 @@ jobs:
|
||||
if: "github.repository == 'OpenMathLib/OpenBLAS'"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Print system information
|
||||
run: |
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Compilation cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.ccache
|
||||
# We include the commit sha in the cache key, as new cache entries are
|
||||
@@ -196,29 +196,29 @@ jobs:
|
||||
- msystem: UCRT64
|
||||
idx: int32
|
||||
target-prefix: mingw-w64-ucrt-x86_64
|
||||
fc-pkg: fc
|
||||
fc-pkg: mingw-w64-ucrt-x86_64-fc
|
||||
- msystem: MINGW32
|
||||
idx: int32
|
||||
target-prefix: mingw-w64-i686
|
||||
fc-pkg: fc
|
||||
fc-pkg:
|
||||
- msystem: CLANG64
|
||||
idx: int32
|
||||
target-prefix: mingw-w64-clang-x86_64
|
||||
fc-pkg: fc
|
||||
fc-pkg: mingw-w64-clang-x86_64-fc
|
||||
- msystem: UCRT64
|
||||
idx: int64
|
||||
idx64-flags: -DBINARY=64 -DINTERFACE64=1
|
||||
target-prefix: mingw-w64-ucrt-x86_64
|
||||
fc-pkg: fc
|
||||
fc-pkg: mingw-w64-ucrt-x86_64-fc
|
||||
- msystem: CLANG64
|
||||
idx: int64
|
||||
idx64-flags: -DBINARY=64 -DINTERFACE64=1
|
||||
target-prefix: mingw-w64-clang-x86_64
|
||||
fc-pkg: fc
|
||||
fc-pkg: mingw-w64-clang-x86_64-fc
|
||||
- msystem: UCRT64
|
||||
idx: int32
|
||||
target-prefix: mingw-w64-ucrt-x86_64
|
||||
fc-pkg: fc
|
||||
fc-pkg: mingw-w64-ucrt-x86_64-fc
|
||||
build-type: None
|
||||
exclude:
|
||||
- msystem: MINGW32
|
||||
@@ -247,13 +247,13 @@ jobs:
|
||||
install: >-
|
||||
base-devel
|
||||
${{ matrix.target-prefix }}-cc
|
||||
${{ matrix.target-prefix }}-${{ matrix.fc-pkg }}
|
||||
${{ matrix.fc-pkg }}
|
||||
${{ matrix.target-prefix }}-cmake
|
||||
${{ matrix.target-prefix }}-ninja
|
||||
${{ matrix.target-prefix }}-ccache
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Prepare ccache
|
||||
# Get cache location of ccache
|
||||
@@ -266,7 +266,7 @@ jobs:
|
||||
echo "key=ccache-msys2-${{ matrix.msystem }}-${{ matrix.idx }}-${{ matrix.build-type }}-${{ github.ref }}-${{ github.sha }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Restore ccache
|
||||
uses: actions/cache/restore@v3
|
||||
uses: actions/cache/restore@v5
|
||||
with:
|
||||
path: ${{ steps.ccache-prepare.outputs.ccachedir }}
|
||||
key: ${{ steps.ccache-prepare.outputs.key }}
|
||||
@@ -311,7 +311,7 @@ jobs:
|
||||
|
||||
- name: Save ccache
|
||||
# Save the cache after we are done (successfully) building
|
||||
uses: actions/cache/save@v3
|
||||
uses: actions/cache/save@v5
|
||||
with:
|
||||
path: ${{ steps.ccache-prepare.outputs.ccachedir }}
|
||||
key: ${{ steps.ccache-prepare.outputs.key }}
|
||||
@@ -357,7 +357,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
@@ -365,7 +365,7 @@ jobs:
|
||||
sudo apt-get install -y ccache gcc-${{ matrix.triple }} gfortran-${{ matrix.triple }} libgomp1-${{ matrix.target }}-cross
|
||||
|
||||
- name: Compilation cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ccache-${{ runner.os }}-${{ matrix.target }}-${{ github.ref }}-${{ github.sha }}
|
||||
@@ -392,7 +392,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
@@ -404,4 +404,55 @@ jobs:
|
||||
make -j${nproc}
|
||||
make -j${nproc} lapack-test
|
||||
|
||||
neoverse_n1_build:
|
||||
if: "github.repository == 'OpenMathLib/OpenBLAS'"
|
||||
runs-on: ubuntu-24.04-arm
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc gfortran make
|
||||
|
||||
- name: Build OpenBLAS
|
||||
run: |
|
||||
make -j${nproc} TARGET=NEOVERSEN1
|
||||
make -j${nproc} TARGET=NEOVERSEN1 lapack-test
|
||||
|
||||
neoverse_n1_omp_build:
|
||||
if: "github.repository == 'OpenMathLib/OpenBLAS'"
|
||||
runs-on: ubuntu-24.04-arm
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc gfortran make
|
||||
|
||||
- name: Build OpenBLAS
|
||||
run: |
|
||||
make -j${nproc} TARGET=NEOVERSEN1 USE_OPENMP=1
|
||||
|
||||
neoverse_n1_ilp64_build:
|
||||
if: "github.repository == 'OpenMathLib/OpenBLAS'"
|
||||
runs-on: ubuntu-24.04-arm
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc gfortran make
|
||||
|
||||
- name: Build OpenBLAS
|
||||
run: |
|
||||
make -j${nproc} TARGET=NEOVERSEN1 INTERFACE64=1
|
||||
make -j${nproc} TARGET=NEOVERSEN1 INTERFACE64=1 lapack-test
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
-DCMAKE_INSTALL_PREFIX=install \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- name: ndk-install
|
||||
run: |
|
||||
wget https://repo.huaweicloud.com/harmonyos/os/4.1.1-Release/ohos-sdk-windows_linux-public.tar.gz
|
||||
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install APT deps
|
||||
run: |
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
gcc-14-loongarch64-linux-gnu g++-14-loongarch64-linux-gnu gfortran-14-loongarch64-linux-gnu
|
||||
|
||||
- name: Compilation cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ccache-${{ runner.os }}-${{ matrix.target }}-${{ github.ref }}-${{ github.sha }}
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install libffi6
|
||||
run: |
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
tar -xf loongson-gnu-toolchain-8.3-x86_64-loongarch64-linux-gnu-rc1.3.tar.xz -C /opt
|
||||
|
||||
- name: Checkout qemu
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: qemu/qemu
|
||||
path: qemu
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
echo "PATH=$GITHUB_WORKSPACE:/opt/clang+llvm_8.0.1-6_amd64-linux-gnu_debian-10/bin:/opt/loongson-gnu-toolchain-8.3-x86_64-loongarch64-linux-gnu-rc1.3/bin:$PATH" >> $GITHUB_ENV
|
||||
|
||||
- name: Compilation cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ccache-${{ runner.os }}-${{ matrix.target }}-${{ github.ref }}-${{ github.sha }}
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: install build deps
|
||||
run: |
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
gcc-${{ matrix.triple }} gfortran-${{ matrix.triple }} libgomp1-mips64el-cross libglib2.0-dev
|
||||
|
||||
- name: checkout qemu
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: qemu/qemu
|
||||
path: qemu
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
make install
|
||||
|
||||
- name: Compilation cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ccache-${{ runner.os }}-${{ matrix.target }}-${{ github.ref }}-${{ github.sha }}
|
||||
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
sleep ${delay}
|
||||
if: github.event_name == 'schedule'
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v6
|
||||
# This isn't even needed, technically. Homebrew will get `develop` via git
|
||||
|
||||
- name: Update Homebrew
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
mv *.bottle.tar.gz bottles
|
||||
|
||||
- name: Upload bottle
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: openblas--HEAD.catalina.bottle.tar.gz
|
||||
path: bottles
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: install build deps
|
||||
run: |
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
chmod +x /opt/riscv/bin/qemu-riscv64
|
||||
|
||||
- name: Compilation cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ccache-${{ runner.os }}-${{ matrix.target }}-${{ github.ref }}-${{ github.sha }}
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
runs-on: windows-11-arm
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install LLVM for Win-ARM64
|
||||
shell: pwsh
|
||||
|
||||
+38
-13
@@ -9,7 +9,7 @@ project(OpenBLAS C ASM)
|
||||
|
||||
set(OpenBLAS_MAJOR_VERSION 0)
|
||||
set(OpenBLAS_MINOR_VERSION 3)
|
||||
set(OpenBLAS_PATCH_VERSION 31.dev)
|
||||
set(OpenBLAS_PATCH_VERSION 33.dev)
|
||||
|
||||
set(OpenBLAS_VERSION "${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.${OpenBLAS_PATCH_VERSION}")
|
||||
|
||||
@@ -243,6 +243,30 @@ if (${DYNAMIC_ARCH})
|
||||
endforeach()
|
||||
endif ()
|
||||
|
||||
# Work around Apple issue with "argument list too long" when linking.
|
||||
# Seen for DYNAMIC_ARCH when there are a _LOT_ of variants build, previously
|
||||
# mostly with older versions on POWERPC or Intel CPUs, but with newer ARM
|
||||
# CPUs and newer compilers this will also occur on ARM.
|
||||
#
|
||||
# This must happen before the add_library() calls, otherwise this will have
|
||||
# no effect.
|
||||
#
|
||||
# Unfortunately, while this workaround will work for shared libraries (with
|
||||
# either Ninja oder Unix Makefiles), but not for static libraries, as ar
|
||||
# does not accept response files. So for the case where we (also) build
|
||||
# static libraries we need an additional workaround, see below. (The
|
||||
# generation of the response files by CMake must still be enabled, so this
|
||||
# is required regardless.)
|
||||
if(APPLE)
|
||||
set(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS ON)
|
||||
set(CMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES ON)
|
||||
if(NOT NOFORTRAN)
|
||||
set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS ON)
|
||||
set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_LIBRARIES ON)
|
||||
endif()
|
||||
set(CMAKE_NINJA_FORCE_RESPONSE_FILE ON)
|
||||
endif()
|
||||
|
||||
# add objects to the openblas lib
|
||||
if(NOT NO_LAPACK)
|
||||
add_library(LAPACK_OVERRIDES OBJECT ${LA_SOURCES})
|
||||
@@ -308,20 +332,22 @@ if (USE_OPENMP)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Fix "Argument list too long" for macOS - mostly seen with older OS versions on POWERPC or Intel CPUs
|
||||
if(APPLE)
|
||||
# Use response files
|
||||
set(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
# Second part of "Argument list too long" fix when static libraries are
|
||||
# built. See above for details.
|
||||
if(APPLE AND BUILD_STATIC_LIBS)
|
||||
# Always build static library first
|
||||
if(BUILD_STATIC_LIBS)
|
||||
set(STATIC_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${OpenBLAS_LIBNAME}.a")
|
||||
set(STATIC_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${OpenBLAS_LIBNAME}.a")
|
||||
# Handle differences in how many response files are generated and/or where
|
||||
# they are stored for Ninja / Unix Makefiles.
|
||||
if("${CMAKE_GENERATOR}" MATCHES "Ninja")
|
||||
set(CREATE_STATIC_LIBRARY_COMMAND
|
||||
"sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/openblas_static.rsp | xargs -n 1024 ${CMAKE_AR} -ru ${STATIC_PATH} && exit 0' "
|
||||
"sh -c '${CMAKE_AR} -rs ${STATIC_PATH} ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' ")
|
||||
else()
|
||||
add_library(${OpenBLAS_LIBNAME}_static STATIC ${TARGET_OBJS} ${OpenBLAS_DEF_FILE})
|
||||
set(STATIC_PATH "lib${OpenBLAS_LIBNAME}.a")
|
||||
set(CREATE_STATIC_LIBRARY_COMMAND
|
||||
"sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/${OpenBLAS_LIBNAME}_static.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru ${STATIC_PATH} && exit 0' "
|
||||
"sh -c '${CMAKE_AR} -rs ${STATIC_PATH} ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' ")
|
||||
endif()
|
||||
set(CREATE_STATIC_LIBRARY_COMMAND
|
||||
"sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/${OpenBLAS_LIBNAME}_static.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru ${STATIC_PATH} && exit 0' "
|
||||
"sh -c '${CMAKE_AR} -rs ${STATIC_PATH} ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' ")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
add_dependencies(${OpenBLAS_LIBNAME}_shared ${OpenBLAS_LIBNAME}_static)
|
||||
set(SHARED_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libopenblas.${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.dylib")
|
||||
@@ -332,7 +358,6 @@ if(APPLE)
|
||||
set(OMP_LIB "")
|
||||
endif()
|
||||
if(NOT NOFORTRAN)
|
||||
set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
set(CMAKE_Fortran_CREATE_STATIC_LIBRARY ${CREATE_STATIC_LIBRARY_COMMAND})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_Fortran_CREATE_SHARED_LIBRARY
|
||||
|
||||
@@ -272,3 +272,9 @@ In chronological order:
|
||||
|
||||
* Anna Mayne <anna.mayne@arm.com>
|
||||
* [2025-11-19] Update thread throttling profile for SGEMV on NEOVERSEV1 and NEOVERSEV2
|
||||
|
||||
* Fadi Arafeh <fadi.arafeh@arm.com>
|
||||
* [2026-03-05] Accelerate SVE128 SBGEMM/BGEMM
|
||||
|
||||
* Nathan Sircombe <nathan.sircombe@arm.com>
|
||||
* [2026-04-16] Add CPU ID for Neoverse V3
|
||||
|
||||
+134
-1
@@ -1,7 +1,140 @@
|
||||
OpenBLAS ChangeLog
|
||||
====================================================================
|
||||
Version 0.3.33
|
||||
23-Apr-2026
|
||||
|
||||
general:
|
||||
- fixed an incorrect cast in the SBGEMM test case that could lead to spurious test failures
|
||||
- fixed an invalid memory access in the converted C version of the CBLAS tests
|
||||
- made the BIGNUMA setting automatic when the number of cores exceeds 256
|
||||
- Imported recent updates from Reference-LAPACK to realign with its upcoming 3.13.0 release:
|
||||
- Implement ?LARF1F and ?ORM2R (Reference-LAPACK PRs 1019,1020,1196,1257)
|
||||
- Change loop order in ?GETC2 to improve performance (Reference-LAPACK PR 1023)
|
||||
- Change WORK array dimension in ?GELQS/?GEQRS (Reference-LAPACK PR 1094)
|
||||
- Add NaN checks for input matrix A in ?GEEV (Reference-LAPACK PR 1136)
|
||||
- Fix support for jobu/v in LAPACKE_?GESVDQ_WORK (Reference-LAPACK PRs 1146,1221)
|
||||
- Fix display of version number in LAPACK testsuite (Reference-LAPACK PR 1149)
|
||||
- Fix DGGES test seed to avoid bad matrix cases (Reference-LAPACK PR 1187)
|
||||
- Fix truncation of large WORK array sizes in ZHE (Reference-LAPACK PR 1195)
|
||||
- Fix overwriting of LDSWORK parameter in ?TRSYL3 (Reference-LAPACK PR 1206)
|
||||
- Fix overwriting of error states in some EIG tests (Reference-LAPACK PR 1207)
|
||||
- Remove unused parameter in DORBDB3/ZUNBDB3 (Reference-LAPACK PR 1209)
|
||||
- Re-enable testing of ?BB and ?GG driver functions (Reference-LAPACK PR 1211)
|
||||
- Fix workspace size calculation in ?TGSEN (Reference-LAPACK PR 774)
|
||||
- Fix typos in the EIG DMD tests and initialized the cutoff variable (PR 1212,1228)
|
||||
- Optimized looping in ?LACPY/?LASCL/?LANTR with fat matrix and UPLO=L (PR 1251)
|
||||
|
||||
arm64:
|
||||
- worked around a serious miscompilation of the DDOT kernel by GCC15, affecting
|
||||
most non-SVE targets, and SVE targets in the case of non-unit array stride)
|
||||
- fixed an accuracy issue in the GEMV kernel for Neoverse V1 and other SVE targets
|
||||
- fixed broken STRMM and SSYMM in DYNAMIC_ARCH builds when running on non-SME hardware
|
||||
- added an optimized SHGEMM kernel for Neoverse N2
|
||||
- fixed DYNAMIC_ARCH builds under Windows on Arm
|
||||
- Added autodetection of Cortex A75/A76 in DYNAMIC_ARCH builds
|
||||
- Added autodetection of Neoverse V3, currently supported through V2 kernels
|
||||
- Re-added support for the "VORTEX" target in DYNAMIC_ARCH builds with DYNAMIC_LIST
|
||||
- Fixed CMake-based builds that use the "Ninja" generator
|
||||
|
||||
loongarch64:
|
||||
- fixed a build failure due to missing support for the new half-precision float type
|
||||
- fixed a long-standing bug in asserting 64bit capability in the c_check helper script
|
||||
|
||||
x86_64:
|
||||
- added a workaround for miscompilation of the AVX512 GEMM kernels by LLVM on Windows
|
||||
- fixed a build failure in the LAED3 code when compiling with MinGW on Windows
|
||||
- fixed CMake-based compilation with the NVIDIA HPC compiler
|
||||
- Fixed CMake-based builds that use the "Ninja" generator
|
||||
|
||||
wasm:
|
||||
- added optimized kernels for STRSM and DTRSM
|
||||
|
||||
====================================================================
|
||||
Version 0.3.32
|
||||
23-Mar-2026
|
||||
|
||||
general:
|
||||
- Moved the preliminary support for a Web Assembly target to its own WASM
|
||||
architecture and WASM128_GENERIC target
|
||||
- Fixed a potential performance difference between dedicated compilation for
|
||||
a target and its representation in DYNAMIC_ARCH builds by making additional
|
||||
cpu-specific parameters available to the DYNAMIC_ARCH configuration
|
||||
- Fixed the reimplementation of LAPACK ?GESV to conform to the reference (i.e.
|
||||
compute the LU factorization even when NRHS is zero)
|
||||
- Improved the error message that is displayed when the compile-time allocation
|
||||
of memory buffers is exceeded
|
||||
- Fixed a problem with non-serialized accesses to parallelized SYRK by concurrent
|
||||
callers
|
||||
- Fixed an ABI mismatch in the internal version of CDOT/ZDOT used by the C fallback
|
||||
versions of the LAPACK source
|
||||
- Improved the f_check script for detecting the Fortran compiler to handle embedded
|
||||
dashes in path names
|
||||
- Fixed several memory access issues in the utests that were detected by Address
|
||||
Sanitizer
|
||||
- Fixed Makefile errors in cases where only a subset of precision types was selected
|
||||
- Fixed missing function errors in Makefile builds without LAPACK or without threads
|
||||
- Fixed a syntax error in the benchmarks Makefile
|
||||
- Fixed compiler warnings in the CBLAS testsuite
|
||||
- Fixed the OpenMP compiler option used with the Intel Ifx compiler
|
||||
- Updated the README sections on supported cpus and operating systems, and added
|
||||
notes pertaining to JAVA
|
||||
- Updated the documentation page for supported BLAS-like extensions
|
||||
- included fixes from the Reference-LAPACK project:
|
||||
- Improved step length selection in the fallback path of ?LAED4
|
||||
(Reference-LAPACK PR 1191)
|
||||
- Rounding up of LWORK and removal of redundant type conversions in the GVD
|
||||
functions (Reference-LAPACK PR 1202)
|
||||
- internal errors were getting ignored in calculation of selected eigenvalues
|
||||
(Reference-LAPACK PR 1204)
|
||||
|
||||
arm64:
|
||||
- Fixed a potential miscompilation of the SDOT/DDOT/DSDOT kernels
|
||||
- Fixed DYNAMIC_ARCH compilation with CMake and compilers lacking SVE support
|
||||
- Improved the performance of BGEMM and SBGEMM kernels for Neoverse V2
|
||||
- Added optimized SSUM and DSUM kernels for Neoverse N1
|
||||
- Added preliminary support for Neoverse V3 cpus as NEOVERSEV2
|
||||
- Added cpu autodetection of Cortex A725 and X925 cpus
|
||||
- Fixed a CMake build problem with flang on Mac OS
|
||||
- Fixed build problems with gcc versions 12 and earlier that do not support fp16
|
||||
- Fixed compilation of GEMM kernels for VORTEXM4/ARMV9SME without multithreading
|
||||
- Fixed the optimized CDOT/ZDOT kernel to compile with LLVM under Windows on Arm
|
||||
- Renamed the copy of the DllMain function used in static linking on MS Windows to
|
||||
OpenBLASDllMain to avoid symbol name conflicts with other libraries
|
||||
|
||||
ioongarch64:
|
||||
- fixed POTRF returning wrong results on LA464 due to a wrong parameter setting
|
||||
|
||||
power:
|
||||
- Fixed compilation problems caused by missing support for half-precision floats (FP16)
|
||||
- Fixed a potential miscompilation of the POWER10 DGEMV kernel by limiting its optimization
|
||||
level
|
||||
- Fixed a SCAL issue on PPCG4/PPC970 running Linux
|
||||
- Worked around a SCAL issue on PPC970 running FreeBSD by switching to the generic C kernels
|
||||
|
||||
riscv64:
|
||||
- Optimized the CROT/ZROT kernel for vector length 128 in the non-unit stride path
|
||||
- Improved SBGEMM/SHGEMM and related helper functions for type conversion
|
||||
- Fixed probing for BFLOAT16 support in DYNAMIC_ARCH cpu detection at runtime
|
||||
|
||||
x86_64:
|
||||
- Fixed a potential miscompilation (by gcc 15.x) of the AVX512 SGEMM kernel for "small"
|
||||
matrix sizes
|
||||
- Fixed the SROT and DROT kernels for Haswell to have consistent (FMA) rounding
|
||||
in the main loop and tail call
|
||||
- Added automatic detection of Intel Arrow Lake H/U, Panther Lake and Jasper Lake
|
||||
- Added automatic detection of Intel Emerald Rapids and upcoming cpu models
|
||||
- Updated the cache size translation table in the cpu model autodetection code
|
||||
- Improved cpu detection fallback to also include Nehalem as a non-AVX option
|
||||
- Fixed a Makefile build issue with clang and the SkylakeX SGEMM kernel
|
||||
- Renamed the copy of the DllMain function used in static linking on MS Windows to
|
||||
OpenBLASDllMain to avoid symbol name conflicts with other libraries
|
||||
|
||||
wasm:
|
||||
- Added optimized intrinsics kernels for SGEMM and DGEMM as well as DOT, ROT and SUM
|
||||
|
||||
====================================================================
|
||||
Version 0.3.31
|
||||
15-Jan-2025
|
||||
15-Jan-2026
|
||||
|
||||
general:
|
||||
- reverted a matrix partitioning optimization from 0.3.30 that could lead to
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
TOPDIR = .
|
||||
include ./Makefile.system
|
||||
LNCMD = ln -fs
|
||||
OSNAME_DISPLAY ?= $(OSNAME)
|
||||
ifeq ($(FIXED_LIBNAME), 1)
|
||||
LNCMD = true
|
||||
endif
|
||||
@@ -58,7 +59,7 @@ all :: tests
|
||||
@echo
|
||||
@echo " OpenBLAS build complete. ($(LIB_COMPONENTS))"
|
||||
@echo
|
||||
@echo " OS ... $(OSNAME) "
|
||||
@echo " OS ... $(OSNAME_DISPLAY) "
|
||||
@echo " Architecture ... $(ARCH) "
|
||||
ifndef BINARY64
|
||||
@echo " BINARY ... 32bit "
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(C_COMPILER), CLANG)
|
||||
CCOMMON_OPT += -fno-integrated-as
|
||||
CCOMMON_OPT += -fno-integrated-as -Wa,-mpwr10
|
||||
endif
|
||||
# workaround for C->FORTRAN ABI violation in LAPACKE
|
||||
ifeq ($(F_COMPILER), GFORTRAN)
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# This library's version
|
||||
VERSION = 0.3.31.dev
|
||||
VERSION = 0.3.33.dev
|
||||
|
||||
# If you set this prefix, the library name will be lib$(LIBNAMESUFFIX)openblas.a
|
||||
# and lib$(LIBNAMESUFFIX)openblas.so, with a matching soname in the shared library
|
||||
|
||||
+23
-1
@@ -194,7 +194,7 @@ ifeq ($(TARGET_CORE), EXCAVATOR)
|
||||
GETARCH_FLAGS := -DFORCE_BARCELONA
|
||||
endif
|
||||
ifeq ($(TARGET_CORE), ZEN)
|
||||
GETARCH_FLAGS := -DFORCE_BARCELONA
|
||||
GETARCH_FLAGS := -DFORCE_NEHALEM
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -247,6 +247,11 @@ NO_PARALLEL_MAKE=0
|
||||
endif
|
||||
GETARCH_FLAGS += -DNO_PARALLEL_MAKE=$(NO_PARALLEL_MAKE)
|
||||
|
||||
ifndef MAKE_NB_JOBS
|
||||
ifneq (,$(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS))))
|
||||
MAKE_NB_JOBS=-1
|
||||
endif
|
||||
endif
|
||||
ifdef MAKE_NB_JOBS
|
||||
GETARCH_FLAGS += -DMAKE_NB_JOBS=$(MAKE_NB_JOBS)
|
||||
endif
|
||||
@@ -417,6 +422,9 @@ endif
|
||||
ifeq ($(C_COMPILER), CLANG)
|
||||
CLANGVERSIONGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
|
||||
CLANGVERSIONGTEQ12 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 12)
|
||||
ifeq ($(F_COMPILER), GFORTRAN)
|
||||
GCCVERSIONGT4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 4)
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
@@ -733,6 +741,20 @@ DYNAMIC_CORE += THUNDERX2T99
|
||||
DYNAMIC_CORE += TSV110
|
||||
DYNAMIC_CORE += EMAG8180
|
||||
DYNAMIC_CORE += THUNDERX3T110
|
||||
|
||||
ifeq ($(OSNAME), Darwin)
|
||||
DYNAMIC_CORE = ARMV8
|
||||
DYNAMIC_CORE += NEOVERSEN1
|
||||
ifneq ($(NO_SME), 1)
|
||||
DYNAMIC_CORE += ARMV9SME
|
||||
ifeq ($(OSNAME), Darwin)
|
||||
ifneq ($(C_COMPILER), GCC)
|
||||
DYNAMIC_CORE += VORTEXM4
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef DYNAMIC_LIST
|
||||
override DYNAMIC_CORE = ARMV8 $(DYNAMIC_LIST)
|
||||
XCCOMMON_OPT = -DDYNAMIC_LIST -DDYN_ARMV8
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
CCOMMON_OPT += -msimd128
|
||||
@@ -61,6 +61,9 @@ endif
|
||||
ifeq ($(CORE), SKYLAKEX)
|
||||
ifndef NO_AVX512
|
||||
CCOMMON_OPT += -march=skylake-avx512
|
||||
ifeq ($(C_COMPILER), CLANG)
|
||||
CCOMMON_OPT += -mllvm -exhaustive-register-search
|
||||
endif
|
||||
ifneq ($(F_COMPILER), NAG)
|
||||
FCOMMON_OPT += -march=skylake-avx512
|
||||
endif
|
||||
@@ -93,6 +96,7 @@ ifeq ($(C_COMPILER), GCC)
|
||||
endif
|
||||
endif
|
||||
else ifeq ($(C_COMPILER), CLANG)
|
||||
CCOMMON_OPT += -mllvm -exhaustive-register-search
|
||||
# cooperlake support was added in clang 9
|
||||
ifeq ($(CLANGVERSIONGTEQ9), 1)
|
||||
CCOMMON_OPT += -march=cooperlake
|
||||
@@ -135,6 +139,7 @@ ifeq ($(C_COMPILER), GCC)
|
||||
endif
|
||||
endif
|
||||
else ifeq ($(C_COMPILER), CLANG)
|
||||
CCOMMON_OPT += -mllvm -exhaustive-register-search
|
||||
# sapphire rapids support was added in clang 12
|
||||
ifeq ($(CLANGVERSIONGTEQ12), 1)
|
||||
CCOMMON_OPT += -march=sapphirerapids
|
||||
|
||||
@@ -148,11 +148,12 @@ Please read `GotoBLAS_01Readme.txt` for older CPU models already supported by th
|
||||
- **Intel Haswell**: Optimized Level-3 and Level-2 BLAS with AVX2 and FMA on x86-64.
|
||||
- **Intel Skylake-X**: Optimized Level-3 and Level-2 BLAS with AVX512 and FMA on x86-64.
|
||||
- **Intel Cooper Lake**: as Skylake-X with improved BFLOAT16 support.
|
||||
- **Intel Sapphire Rapids**: as Cooper Lake with improved BFLOAT16 SBGEMM kernel.
|
||||
- **AMD Bobcat**: Used GotoBLAS2 Barcelona codes.
|
||||
- **AMD Bulldozer**: x86-64 ?GEMM FMA4 kernels. (Thanks to Werner Saar)
|
||||
- **AMD PILEDRIVER**: Uses Bulldozer codes with some optimizations.
|
||||
- **AMD STEAMROLLER**: Uses Bulldozer codes with some optimizations.
|
||||
- **AMD ZEN**: Uses Haswell codes with some optimizations for Zen 2/3 (use SkylakeX for Zen4)
|
||||
- **AMD ZEN**: Uses Haswell codes with some optimizations for Zen 2/3, SkylakeX for Zen4, Cooperlake for Zen5
|
||||
|
||||
#### MIPS32
|
||||
|
||||
@@ -175,7 +176,7 @@ Please read `GotoBLAS_01Readme.txt` for older CPU models already supported by th
|
||||
- **Cortex-A53**: same as ARMV8 (different cpu specifications)
|
||||
- **Cortex-A55**: same as ARMV8 (different cpu specifications)
|
||||
- **Cortex A57**: Optimized Level-3 and Level-2 functions
|
||||
- **Cortex A72**: same as A57 ( different cpu specifications)
|
||||
- **Cortex A72**: same as A57 (different cpu specifications)
|
||||
- **Cortex A73**: same as A57 (different cpu specifications)
|
||||
- **Cortex A76**: same as A57 (different cpu specifications)
|
||||
- **Falkor**: same as A57 (different cpu specifications)
|
||||
@@ -186,9 +187,15 @@ Please read `GotoBLAS_01Readme.txt` for older CPU models already supported by th
|
||||
- **EMAG 8180**: preliminary support based on A57
|
||||
- **Neoverse N1**: (AWS Graviton2) preliminary support
|
||||
- **Neoverse V1**: (AWS Graviton3) optimized Level-3 BLAS
|
||||
- **Neoverse N2**: preliminary support
|
||||
- **Neoverse V2**: preliminary support
|
||||
- **Neoverse V3**: preliminary support
|
||||
- **Neoverse V3AE**: preliminary support
|
||||
- **Apple Vortex**: preliminary support based on ThunderX2/3
|
||||
- **Apple VortexM4**: preliminary support based on ThunderX2/3, SME kernels for SGEMM,SSYMM,STRMM,SSYRK,SSYR2K
|
||||
- **A64FX**: preliminary support, optimized Level-3 BLAS
|
||||
- **ARMV8SVE**: any ARMV8 cpu with SVE extensions
|
||||
- **ARMV9SME**: any ARMV9 cpu with SVE and SME extensions
|
||||
|
||||
#### PPC/PPC64
|
||||
|
||||
@@ -249,6 +256,12 @@ e.g.:
|
||||
```
|
||||
The old-style TARGET=LOONGSON3R5 is still supported
|
||||
|
||||
#### WASM
|
||||
Not a cpu target in the strict sense, but portable WebAssembly for browser-based applications and the like. See emscripten.org for the compiler and related information
|
||||
|
||||
- **WASM128_GENERIC**: Optimized SGEMM,DGEMM, DAXPY, SSUM/DSUM, SDOT/DDOT and SROT/DROT
|
||||
|
||||
|
||||
### Support for multiple targets in a single library
|
||||
|
||||
OpenBLAS can be built for multiple targets with runtime detection of the target cpu by specifying `DYNAMIC_ARCH=1` in Makefile.rule, on the gmake command line or as `-DDYNAMIC_ARCH=TRUE` in cmake.
|
||||
@@ -277,23 +290,29 @@ Please note that it is not possible to combine support for different architectur
|
||||
### Supported OS
|
||||
|
||||
- **GNU/Linux**
|
||||
- **MinGW or Visual Studio (CMake)/Windows**: Please read <https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio>.
|
||||
- **Darwin/macOS/OSX/iOS**: Experimental. Although GotoBLAS2 already supports Darwin, we are not OSX/iOS experts.
|
||||
- **MinGW or Visual Studio (CMake)/Windows**: Please read <https://github.com/OpenMathLib/OpenBLAS/docs/nstall.md#visual-studio-native-windows-abi>.
|
||||
- **Darwin/macOS/OSX/iOS**: Already supported on PPC and x86 by the original GotoBLAS, now also on ARM64 but we are not OSX/iOS experts.
|
||||
- **FreeBSD**: Supported by the community. We don't actively test the library on this OS.
|
||||
- **OpenBSD**: Supported by the community. We don't actively test the library on this OS.
|
||||
- **NetBSD**: Supported by the community. We don't actively test the library on this OS.
|
||||
- **DragonFly BSD**: Supported by the community. We don't actively test the library on this OS.
|
||||
- **Android**: Supported by the community. Please read <https://github.com/xianyi/OpenBLAS/wiki/How-to-build-OpenBLAS-for-Android>.
|
||||
- **AIX**: Supported on PPC up to POWER10
|
||||
- **Android**: Supported by the community. Please read <https://github.com/OpenMathLib/OpenBLAS/docs/install.md#android>.
|
||||
- **AIX**: Supported on PPC up to POWER10 but testing is increasingly problematic due to lack of publicly available systems
|
||||
- **Haiku**: Supported by the community. We don't actively test the library on this OS.
|
||||
- **SunOS**: Supported by the community. We don't actively test the library on this OS.
|
||||
- **Cortex-M**: Supported by the community. Please read <https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-on-Cortex-M>.
|
||||
- **Cortex-M**: Supported by the community. Please read <https://github.com/OpenMathLib/OpenBLAS/docs/install.md#cortex-m>.
|
||||
|
||||
## Usage
|
||||
|
||||
Statically link with `libopenblas.a` or dynamically link with `-lopenblas` if OpenBLAS was
|
||||
compiled as a shared library.
|
||||
|
||||
### Considerations for using the library from Java
|
||||
|
||||
The default stack size of only 1MB may be too small, especially if you built OpenBLAS to support larger matrix sizes than provided for by the default settings. Use the -Xss option to request a larger stack size if you encounter problems.
|
||||
|
||||
When a Windows build of OpenBLAS was created using the MINGW gfortran (for the LAPACK parts), the java application may hang on startup due to a deadlock between the gfortran runtime library initialization and any pipes created by a Win11/SBT/Play Framework environment. Use -Djdk.console=jdk.internal.le to work around this.
|
||||
|
||||
### Setting the number of threads using environment variables
|
||||
|
||||
Environment variables are used to specify a maximum number of threads.
|
||||
|
||||
@@ -153,3 +153,7 @@ EV6
|
||||
14.CSKY
|
||||
CSKY
|
||||
CK860FV
|
||||
|
||||
15. WebAssembly/Emscripten:
|
||||
WASM128_GENERIC
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ jobs:
|
||||
openblas_utest.exe
|
||||
|
||||
- job: Windows_mingw_gmake
|
||||
timeoutInMinutes: 100
|
||||
pool:
|
||||
vmImage: 'windows-latest'
|
||||
steps:
|
||||
|
||||
@@ -23,7 +23,7 @@ config="$2"
|
||||
compiler_name="$3"
|
||||
shift 3
|
||||
flags="$*"
|
||||
is_ios=false
|
||||
darwin_os=""
|
||||
|
||||
# First, we need to know the target OS and compiler name
|
||||
{
|
||||
@@ -70,7 +70,7 @@ case "$data" in *OS_FREEBSD*) os=FreeBSD ;; esac
|
||||
case "$data" in *OS_NETBSD*) os=NetBSD ;; esac
|
||||
case "$data" in *OS_OPENBSD*) os=OpenBSD ;; esac
|
||||
case "$data" in *OS_DRAGONFLY*) os=DragonFly ;; esac
|
||||
case "$data" in *OS_DARWIN*) os=Darwin ;; esac
|
||||
case "$data" in *OS_DARWIN*) os=Darwin; darwin_os=macOS ;; esac
|
||||
case "$data" in *OS_SUNOS*) os=SunOS ;; esac
|
||||
case "$data" in *OS_AIX*) os=AIX ;; esac
|
||||
case "$data" in *OS_OSF*) os=osf ;; esac
|
||||
@@ -79,7 +79,7 @@ case "$data" in *OS_CYGWIN_NT*) os=CYGWIN_NT ;; esac
|
||||
case "$data" in *OS_INTERIX*) os=Interix ;; esac
|
||||
case "$data" in *OS_ANDROID*) os=Android ;; esac
|
||||
case "$data" in *OS_HAIKU*) os=Haiku ;; esac
|
||||
case "$data" in *OS_IOS*) is_ios=true ;; esac
|
||||
case "$data" in *OS_IOS*) darwin_os=iOS ;; esac
|
||||
|
||||
case "$data" in
|
||||
*ARCH_X86_64*) architecture=x86_64 ;;
|
||||
@@ -97,6 +97,7 @@ case "$data" in
|
||||
*ARCH_RISCV64*) architecture=riscv64 ;;
|
||||
*ARCH_LOONGARCH64*) architecture=loongarch64 ;;
|
||||
*ARCH_CSKY*) architecture=csky ;;
|
||||
*ARCH_WASM*) architecture=wasm ;;
|
||||
esac
|
||||
|
||||
defined=0
|
||||
@@ -130,7 +131,7 @@ case "$architecture" in
|
||||
defined=1
|
||||
;;
|
||||
arm|arm64) defined=1 ;;
|
||||
zarch|e2k|alpha|ia64|riscv64|loonarch64)
|
||||
zarch|e2k|alpha|ia64|riscv64|loongarch64|wasm)
|
||||
defined=1
|
||||
BINARY=64
|
||||
;;
|
||||
@@ -254,6 +255,7 @@ case "$data" in
|
||||
*ARCH_ZARCH*) architecture=zarch ;;
|
||||
*ARCH_LOONGARCH64*) architecture=loongarch64 ;;
|
||||
*ARCH_CSKY*) architecture=csky ;;
|
||||
*ARCH_WASM*) architecture=wasm ;;
|
||||
esac
|
||||
|
||||
binformat='bin32'
|
||||
@@ -402,7 +404,7 @@ fi
|
||||
data=`$compiler_name $flags -S ctest1.c && grep globl ctest1.s | head -n 1 && rm -f ctest1.s`
|
||||
|
||||
need_fu=''
|
||||
if echo "$data" | grep 'globl[[:space:]][_\.]'; then
|
||||
if echo "$data" | grep -q 'globl[[:space:]][_\.]'; then
|
||||
need_fu="${data##*globl[[:space:]]}"
|
||||
need_fu="${need_fu%%[!_\.]*}"
|
||||
fi
|
||||
@@ -419,7 +421,7 @@ fi
|
||||
[ "$os" = "Android" ] && [ "$hostos" = "Linux" ] && [ -n "$TERMUX_APP_PID" ] \
|
||||
&& cross=0
|
||||
|
||||
[ "$is_ios" = true ] && cross=1
|
||||
[ "$darwin_os" = iOS ] && cross=1
|
||||
|
||||
[ "$USE_OPENMP" != 1 ] && openmp=''
|
||||
|
||||
@@ -487,11 +489,11 @@ done
|
||||
:> "$makefile" || exit 1
|
||||
:> "$config" || exit 1
|
||||
|
||||
|
||||
# print $data, "\n";
|
||||
|
||||
{
|
||||
printf "OSNAME=%s\n" "$os"
|
||||
[ -n "$darwin_os" ] && printf "OSNAME_DISPLAY=%s\n" "$darwin_os"
|
||||
printf "ARCH=%s\n" "$architecture"
|
||||
printf "C_COMPILER=%s\n" "$compiler"
|
||||
[ $binformat != 'bin32' ] && printf "BINARY32=\n"
|
||||
|
||||
+10
-1
@@ -56,6 +56,7 @@ if ($@){
|
||||
}
|
||||
|
||||
$compiler = "";
|
||||
$darwin_os = "";
|
||||
$compiler = LSB if ($data =~ /COMPILER_LSB/);
|
||||
$compiler = CLANG if ($data =~ /COMPILER_CLANG/);
|
||||
$compiler = PGI if ($data =~ /COMPILER_PGI/);
|
||||
@@ -73,7 +74,13 @@ $os = FreeBSD if ($data =~ /OS_FREEBSD/);
|
||||
$os = NetBSD if ($data =~ /OS_NETBSD/);
|
||||
$os = OpenBSD if ($data =~ /OS_OPENBSD/);
|
||||
$os = DragonFly if ($data =~ /OS_DRAGONFLY/);
|
||||
$os = Darwin if ($data =~ /OS_DARWIN/);
|
||||
if ($data =~ /OS_DARWIN/) {
|
||||
$os = Darwin;
|
||||
$darwin_os = "macOS";
|
||||
}
|
||||
if ($data =~ /OS_IOS/) {
|
||||
$darwin_os = "iOS";
|
||||
}
|
||||
$os = SunOS if ($data =~ /OS_SUNOS/);
|
||||
$os = AIX if ($data =~ /OS_AIX/);
|
||||
$os = osf if ($data =~ /OS_OSF/);
|
||||
@@ -391,6 +398,7 @@ if ($architecture ne $hostarch) {
|
||||
|
||||
$cross = 1 if ($os ne $hostos);
|
||||
$cross = 0 if (($os eq "Android") && ($hostos eq "Linux") && ($ENV{TERMUX_APP_PID} != ""));
|
||||
$cross = 1 if $darwin_os eq "iOS";
|
||||
|
||||
$openmp = "" if $ENV{USE_OPENMP} != 1;
|
||||
|
||||
@@ -454,6 +462,7 @@ open(CONFFILE, "> $config" ) || die "Can't create $config";
|
||||
# print $data, "\n";
|
||||
|
||||
print MAKEFILE "OSNAME=$os\n";
|
||||
print MAKEFILE "OSNAME_DISPLAY=$darwin_os\n" if $darwin_os ne "";
|
||||
print MAKEFILE "ARCH=$architecture\n";
|
||||
print MAKEFILE "C_COMPILER=$compiler\n";
|
||||
print MAKEFILE "BINARY32=\n" if $binformat ne bin32;
|
||||
|
||||
+19
-2
@@ -48,10 +48,27 @@ if (DYNAMIC_ARCH)
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 11) # SVE ACLE supported in LLVM >= 11
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2 ARMV8SVE A64FX)
|
||||
endif ()
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 19 OR (${CMAKE_C_COMPILER_ID} MATCHES AppleClang AND ${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 17) ) # SME ACLE supported in LLVM >= 19 and AppleClang >= 17
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME VORTEXM4)
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 17) # SME ACLE supported in LLVM >= 17
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME)
|
||||
endif()
|
||||
|
||||
if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 19 OR (${CMAKE_C_COMPILER_ID} MATCHES AppleClang AND ${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 17) ) # SME w/out SVE supported in LLVM >= 19 and AppleClang >= 17
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} VORTEXM4)
|
||||
endif()
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR ${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
|
||||
set(DYNAMIC_CORE ARMV8 NEOVERSEN1)
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 19 OR (${CMAKE_C_COMPILER_ID} MATCHES AppleClang AND ${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 17) ) # SME ACLE supported in LLVM >= 19 and AppleClang >= 17
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} VORTEXM4)
|
||||
endif()
|
||||
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 14) # SME ACLE supported in GCC >= 14
|
||||
set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (DYNAMIC_LIST)
|
||||
set(DYNAMIC_CORE ARMV8 ${DYNAMIC_LIST})
|
||||
endif ()
|
||||
|
||||
@@ -113,6 +113,7 @@ if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI")
|
||||
endif ()
|
||||
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "NVHPC")
|
||||
set (GCC_VERSION 100)
|
||||
if (POWER)
|
||||
set(CCOMMON_OPT "${CCOMMON_OPT} -tp pwr8")
|
||||
elseif (X86_64)
|
||||
|
||||
+8
-6
@@ -71,7 +71,7 @@ set(SLASRC
|
||||
slaqr0.f slaqr1.f slaqr2.f slaqr3.f slaqr4.f slaqr5.f
|
||||
slaqtr.f slar1v.f slar2v.f ilaslr.f ilaslc.f
|
||||
slarf.f slarfb.f slarfb_gett.f slarfg.f slarfgp.f slarft.f slarfx.f slarfy.f slargv.f
|
||||
slarrv.f slartv.f
|
||||
slarf1f.f slarf1l.f slarrv.f slartv.f
|
||||
slarz.f slarzb.f slarzt.f slasy2.f
|
||||
slasyf.f slasyf_rook.f slasyf_rk.f slasyf_aa.f
|
||||
slatbs.f slatdf.f slatps.f slatrd.f slatrs.f slatrz.f
|
||||
@@ -178,6 +178,7 @@ set(CLASRC
|
||||
claqz0.f claqz1.f claqz2.f claqz3.f
|
||||
claqsp.f claqsy.f clar1v.f clar2v.f ilaclr.f ilaclc.f
|
||||
clarf.f clarfb.f clarfb_gett.f clarfg.f clarfgp.f clarft.f
|
||||
clarf1f.f clarf1l.f
|
||||
clarfx.f clarfy.f clargv.f clarnv.f clarrv.f clartg.f90 clartv.f
|
||||
clarz.f clarzb.f clarzt.f clascl.f claset.f clasr.f classq.f90
|
||||
clasyf.f clasyf_rook.f clasyf_rk.f clasyf_aa.f
|
||||
@@ -262,7 +263,7 @@ set(DLASRC
|
||||
dlaqr0.f dlaqr1.f dlaqr2.f dlaqr3.f dlaqr4.f dlaqr5.f
|
||||
dlaqtr.f dlar1v.f dlar2v.f iladlr.f iladlc.f
|
||||
dlarf.f dlarfb.f dlarfb_gett.f dlarfg.f dlarfgp.f dlarft.f dlarfx.f dlarfy.f
|
||||
dlargv.f dlarrv.f dlartv.f
|
||||
dlarf1f.f dlarf1l.f dlargv.f dlarrv.f dlartv.f
|
||||
dlarz.f dlarzb.f dlarzt.f dlasy2.f
|
||||
dlasyf.f dlasyf_rook.f dlasyf_rk.f dlasyf_aa.f
|
||||
dlatbs.f dlatdf.f dlatps.f dlatrd.f dlatrs.f dlatrz.f
|
||||
@@ -371,7 +372,7 @@ set(ZLASRC
|
||||
zlaqr0.f zlaqr1.f zlaqr2.f zlaqr3.f zlaqr4.f zlaqr5.f
|
||||
zlaqsp.f zlaqsy.f zlar1v.f zlar2v.f ilazlr.f ilazlc.f
|
||||
zlarcm.f zlarf.f zlarfb.f zlarfb_gett.f
|
||||
zlarfg.f zlarfgp.f zlarft.f
|
||||
zlarfg.f zlarfgp.f zlarft.f zlarf1f.f zlarf1l.f
|
||||
zlarfx.f zlarfy.f zlargv.f zlarnv.f zlarrv.f zlartg.f90 zlartv.f
|
||||
zlarz.f zlarzb.f zlarzt.f zlascl.f zlaset.f zlasr.f
|
||||
zlassq.f90 zlasyf.f zlasyf_rook.f zlasyf_rk.f zlasyf_aa.f
|
||||
@@ -575,7 +576,7 @@ set(SLASRC
|
||||
slaqr0.c slaqr1.c slaqr2.c slaqr3.c slaqr4.c slaqr5.c
|
||||
slaqtr.c slar1v.c slar2v.c ilaslr.c ilaslc.c
|
||||
slarf.c slarfb.c slarfb_gett.c slarfg.c slarfgp.c slarft.c slarfx.c slarfy.c slargv.c
|
||||
slarrv.c slartv.c
|
||||
slarf1f.c slarf1l.c slarrv.c slartv.c
|
||||
slarz.c slarzb.c slarzt.c slasy2.c
|
||||
slasyf.c slasyf_rook.c slasyf_rk.c slasyf_aa.c
|
||||
slatbs.c slatdf.c slatps.c slatrd.c slatrs.c slatrz.c
|
||||
@@ -681,6 +682,7 @@ set(CLASRC
|
||||
claqr0.c claqr1.c claqr2.c claqr3.c claqr4.c claqr5.c
|
||||
claqsp.c claqsy.c clar1v.c clar2v.c ilaclr.c ilaclc.c
|
||||
clarf.c clarfb.c clarfb_gett.c clarfg.c clarfgp.c clarft.c
|
||||
clarf1f.c clarf1l.c
|
||||
clarfx.c clarfy.c clargv.c clarnv.c clarrv.c clartg.c clartv.c
|
||||
clarz.c clarzb.c clarzt.c clascl.c claset.c clasr.c classq.c
|
||||
clasyf.c clasyf_rook.c clasyf_rk.c clasyf_aa.c
|
||||
@@ -764,7 +766,7 @@ set(DLASRC
|
||||
dlaqr0.c dlaqr1.c dlaqr2.c dlaqr3.c dlaqr4.c dlaqr5.c
|
||||
dlaqtr.c dlar1v.c dlar2v.c iladlr.c iladlc.c
|
||||
dlarf.c dlarfb.c dlarfb_gett.c dlarfg.c dlarfgp.c dlarft.c dlarfx.c dlarfy.c
|
||||
dlargv.c dlarrv.c dlartv.c
|
||||
dlarf1f.c dlarf1l.c dlargv.c dlarrv.c dlartv.c
|
||||
dlarz.c dlarzb.c dlarzt.c dlasy2.c
|
||||
dlasyf.c dlasyf_rook.c dlasyf_rk.c dlasyf_aa.c
|
||||
dlatbs.c dlatdf.c dlatps.c dlatrd.c dlatrs.c dlatrz.c
|
||||
@@ -871,7 +873,7 @@ set(ZLASRC
|
||||
zlaqhb.c zlaqhe.c zlaqhp.c zlaqp2.c zlaqp2rk.c zlaqp3rk.c zlaqps.c zlaqsb.c
|
||||
zlaqr0.c zlaqr1.c zlaqr2.c zlaqr3.c zlaqr4.c zlaqr5.c
|
||||
zlaqsp.c zlaqsy.c zlar1v.c zlar2v.c ilazlr.c ilazlc.c
|
||||
zlarcm.c zlarf.c zlarfb.c zlarfb_gett.c
|
||||
zlarcm.c zlarf.c zlarfb.c zlarfb_gett.c zlarf1f.c zlarf1l.c
|
||||
zlarfg.c zlarfgp.c zlarft.c
|
||||
zlarfx.c zlarfy.c zlargv.c zlarnv.c zlarrv.c zlartg.c zlartv.c
|
||||
zlarz.c zlarzb.c zlarzt.c zlascl.c zlaset.c zlasr.c
|
||||
|
||||
@@ -98,6 +98,10 @@ if (${COMPILER_ID} STREQUAL "GNU")
|
||||
set(COMPILER_ID "GCC")
|
||||
endif ()
|
||||
|
||||
if (HOST_OS STREQUAL "EMSCRIPTEN")
|
||||
set (ARCH wasm)
|
||||
endif()
|
||||
|
||||
string(TOUPPER ${ARCH} UC_ARCH)
|
||||
file(WRITE ${TARGET_CONF_TEMP}
|
||||
"#define OS_${HOST_OS}\t1\n"
|
||||
@@ -1500,6 +1504,15 @@ endif ()
|
||||
"#define DTB_DEFAULT_ENTRIES 128\n"
|
||||
"#define DTB_SIZE 4096\n"
|
||||
"#define L2_ASSOCIATIVE 4\n")
|
||||
elseif ("${TCORE}" STREQUAL "WASM128_GENERIC")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 32768\n"
|
||||
"#define L1_DATA_LINESIZE 32\n"
|
||||
"#define L2_SIZE 1048576\n"
|
||||
"#define L2_LINESIZE 32 \n"
|
||||
"#define DTB_DEFAULT_ENTRIES 128\n"
|
||||
"#define DTB_SIZE 4096\n"
|
||||
"#define L2_ASSOCIATIVE 4\n")
|
||||
elseif ("${TCORE}" STREQUAL "LA64_GENERIC")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define DTB_DEFAULT_ENTRIES 64\n")
|
||||
|
||||
+6
-2
@@ -68,10 +68,10 @@ endif ()
|
||||
if (DEFINED BINARY AND DEFINED TARGET AND BINARY EQUAL 32)
|
||||
message(STATUS "Compiling a ${BINARY}-bit binary.")
|
||||
set(NO_AVX 1)
|
||||
if (${TARGET} STREQUAL "HASWELL" OR ${TARGET} STREQUAL "SANDYBRIDGE" OR ${TARGET} STREQUAL "SKYLAKEX" OR ${TARGET} STREQUAL "COOPERLAKE" OR ${TARGET} STREQUAL "SAPPHIRERAPIDS")
|
||||
if (${TARGET} STREQUAL "HASWELL" OR ${TARGET} STREQUAL "ZEN" OR ${TARGET} STREQUAL "SANDYBRIDGE" OR ${TARGET} STREQUAL "SKYLAKEX" OR ${TARGET} STREQUAL "COOPERLAKE" OR ${TARGET} STREQUAL "SAPPHIRERAPIDS")
|
||||
set(TARGET "NEHALEM")
|
||||
endif ()
|
||||
if (${TARGET} STREQUAL "BULLDOZER" OR ${TARGET} STREQUAL "PILEDRIVER" OR ${TARGET} STREQUAL "ZEN")
|
||||
if (${TARGET} STREQUAL "BULLDOZER" OR ${TARGET} STREQUAL "PILEDRIVER")
|
||||
set(TARGET "BARCELONA")
|
||||
endif ()
|
||||
if (${TARGET} STREQUAL "ARMV8" OR ${TARGET} STREQUAL "CORTEXA57" OR ${TARGET} STREQUAL "CORTEXA53" OR ${TARGET} STREQUAL "CORTEXA55")
|
||||
@@ -879,6 +879,10 @@ if (DEFINED ARCH)
|
||||
set(USE_GEMM3M 1)
|
||||
endif ()
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
set(USE_GEMM3M 0)
|
||||
endif ()
|
||||
|
||||
if (${CORE} STREQUAL "generic")
|
||||
set(USE_GEMM3M 0)
|
||||
endif ()
|
||||
|
||||
@@ -40,6 +40,8 @@ if(CMAKE_CL_64 OR MINGW64)
|
||||
else()
|
||||
set(X86_64 1)
|
||||
endif()
|
||||
elseif(OS_EMSCRIPTEN)
|
||||
set(WASM 1)
|
||||
elseif(MINGW OR (MSVC AND NOT CMAKE_CROSSCOMPILING))
|
||||
set(X86 1)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc.*|power.*|Power.*" OR (CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc.*"))
|
||||
@@ -145,13 +147,22 @@ endif()
|
||||
endif()
|
||||
|
||||
if (ARM64)
|
||||
if (NOT NO_SVE)
|
||||
file(WRITE ${PROJECT_BINARY_DIR}/sve.c "#include <arm_sve.h>\n\n int main(void){}\n")
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -march=armv8-a+sve -c -o ${PROJECT_BINARY_DIR}/sve.o ${PROJECT_BINARY_DIR}/sve.c OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_SVE)
|
||||
if (NO_SVE EQUAL 1)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_SVE")
|
||||
endif()
|
||||
file(REMOVE "${PROJECT_BINARY_DIR}/sve.c" "${PROJECT_BINARY_DIR}/sve.o")
|
||||
endif()
|
||||
|
||||
if (NOT NO_SME)
|
||||
file(WRITE ${PROJECT_BINARY_DIR}/sme.c ".text \n.global sme_test\n\nsme_test:\nsmstart\nsmstop\nret\n")
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -march=armv9-a+sve2+sme -c -v -o ${PROJECT_BINARY_DIR}/sme.o ${PROJECT_BINARY_DIR}/sme.c OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_SME)
|
||||
file(WRITE ${PROJECT_BINARY_DIR}/sme.S ".text \n.global sme_test\n\nsme_test:\nsmstart\nsmstop\nret\n")
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -march=armv9-a+sve2+sme -c -v -o ${PROJECT_BINARY_DIR}/sme.o ${PROJECT_BINARY_DIR}/sme.S OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_SME)
|
||||
if (NO_SME EQUAL 1)
|
||||
set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_SME")
|
||||
endif()
|
||||
file(REMOVE "${PROJECT_BINARY_DIR}/sme.c" "${PROJECT_BINARY_DIR}/sme.o")
|
||||
file(REMOVE "${PROJECT_BINARY_DIR}/sme.S" "${PROJECT_BINARY_DIR}/sme.o")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ macro(ParseMakefileVars MAKEFILE_IN)
|
||||
if (${OSNAME} STREQUAL Windows)
|
||||
set (OSNAME WINNT)
|
||||
endif ()
|
||||
message(STATUS OS ${OSNAME} COMPILER ${C_COMPILER})
|
||||
#message(STATUS OS ${OSNAME} COMPILER ${C_COMPILER})
|
||||
set (IfElse 0)
|
||||
set (ElseSeen 0)
|
||||
set (SkipIfs 0)
|
||||
|
||||
@@ -386,9 +386,11 @@ typedef int blasint;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#if defined(ARCH_WASM)
|
||||
#ifndef YIELDING
|
||||
#define YIELDING
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#undef YIELDING // MSVC doesn't support assembly code
|
||||
@@ -498,6 +500,10 @@ please https://github.com/xianyi/OpenBLAS/issues/246
|
||||
#include "common_csky.h"
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_WASM
|
||||
#include "common_wasm.h"
|
||||
#endif
|
||||
|
||||
#ifndef ASSEMBLER
|
||||
#ifdef OS_WINDOWSSTORE
|
||||
typedef char env_var_t[MAX_PATH];
|
||||
|
||||
@@ -3159,6 +3159,8 @@ typedef struct {
|
||||
#define NEG_TCOPY ZNEG_TCOPY
|
||||
#define LARF_L ZLARF_L
|
||||
#define LARF_R ZLARF_R
|
||||
#define LAED3_SINGLE dlaed3_single
|
||||
#define LAED3_PARALLEL dlaed3_parallel
|
||||
#else
|
||||
#define GETF2 CGETF2
|
||||
#define GETRF CGETRF
|
||||
@@ -3180,6 +3182,8 @@ typedef struct {
|
||||
#define NEG_TCOPY CNEG_TCOPY
|
||||
#define LARF_L CLARF_L
|
||||
#define LARF_R CLARF_R
|
||||
#define LAED3_SINGLE slaed3_single
|
||||
#define LAED3_PARALLEL slaed3_parallel
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
typedef struct {
|
||||
int dtb_entries;
|
||||
int switch_ratio;
|
||||
int divide_rate;
|
||||
int divide_limit;
|
||||
int preferred_size;
|
||||
int offsetA, offsetB, align;
|
||||
#if BUILD_HFLOAT16 == 1
|
||||
int shgemm_p, shgemm_q, shgemm_r;
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/*****************************************************************************
|
||||
Copyright (c) 2011-2014, The OpenBLAS Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Neither the name of the OpenBLAS project nor the names of
|
||||
its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**********************************************************************************/
|
||||
|
||||
/*********************************************************************/
|
||||
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
/* without modification, are permitted provided that the following */
|
||||
/* conditions are met: */
|
||||
/* */
|
||||
/* 1. Redistributions of source code must retain the above */
|
||||
/* copyright notice, this list of conditions and the following */
|
||||
/* disclaimer. */
|
||||
/* */
|
||||
/* 2. Redistributions in binary form must reproduce the above */
|
||||
/* copyright notice, this list of conditions and the following */
|
||||
/* disclaimer in the documentation and/or other materials */
|
||||
/* provided with the distribution. */
|
||||
/* */
|
||||
/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
|
||||
/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
|
||||
/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
|
||||
/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
|
||||
/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
|
||||
/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
|
||||
/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
|
||||
/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
|
||||
/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
|
||||
/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
|
||||
/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
|
||||
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
|
||||
/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
|
||||
/* POSSIBILITY OF SUCH DAMAGE. */
|
||||
/* */
|
||||
/* The views and conclusions contained in the software and */
|
||||
/* documentation are those of the authors and should not be */
|
||||
/* interpreted as representing official policies, either expressed */
|
||||
/* or implied, of The University of Texas at Austin. */
|
||||
/*********************************************************************/
|
||||
|
||||
#ifndef COMMON_WASM
|
||||
#define COMMON_WASM
|
||||
|
||||
#define MB __sync_synchronize()
|
||||
#define WMB __sync_synchronize()
|
||||
#define RMB __sync_synchronize()
|
||||
|
||||
#ifndef ASSEMBLER
|
||||
|
||||
|
||||
static inline int blas_quickdivide(blasint x, blasint y){
|
||||
return x / y;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#define BUFFER_SIZE ( 16 << 20)
|
||||
#define SEEK_ADDRESS
|
||||
|
||||
#endif
|
||||
|
||||
+4
-1
@@ -321,8 +321,11 @@ int detect(void)
|
||||
return CPU_CORTEXX2;
|
||||
else if (strstr(cpu_part, "0xd4e")) //X3
|
||||
return CPU_CORTEXX2;
|
||||
else if (strstr(cpu_part, "0xd4f")) //NVIDIA Grace et al.
|
||||
else if (strstr(cpu_part, "0xd4f"))
|
||||
return CPU_NEOVERSEV2;
|
||||
else if (strstr(cpu_part, "0xd87") || strstr(cpu_part, "0xd85") // A725,X925
|
||||
|| strstr(cpu_part, "0xd84") || strstr(cpu_part, "0xd83")) // V3,V3AE
|
||||
return CPU_NEOVERSEV2;
|
||||
else if (strstr(cpu_part, "0xd0b"))
|
||||
return CPU_CORTEXA76;
|
||||
}
|
||||
|
||||
+2
-2
@@ -395,8 +395,8 @@ void get_cpuconfig(void) {
|
||||
}
|
||||
}
|
||||
|
||||
if(os_support_lsx) printf("#define HAVE_LSX\n");
|
||||
if(os_support_lasx) printf("#define HAVE_LASX\n");
|
||||
if(os_support_lsx()) printf("#define HAVE_LSX\n");
|
||||
if(os_support_lasx()) printf("#define HAVE_LASX\n");
|
||||
|
||||
get_cpucount(&num_cores);
|
||||
if (num_cores)
|
||||
|
||||
+40
-41
@@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
Copyright (c) 2011-2014, The OpenBLAS Project
|
||||
Copyright (c) 2011-2026, The OpenBLAS Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -13,9 +13,9 @@ met:
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Neither the name of the OpenBLAS project nor the names of
|
||||
its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written
|
||||
3. Neither the name of the OpenBLAS project nor the names of
|
||||
its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
@@ -109,7 +109,7 @@ int detect(void){
|
||||
return CPU_1004K;
|
||||
} else if (strstr(p, " 24K")) {
|
||||
return CPU_24K;
|
||||
} else
|
||||
} else
|
||||
return CPU_UNKNOWN;
|
||||
}
|
||||
#endif
|
||||
@@ -136,6 +136,40 @@ void get_subdirname(void){
|
||||
printf("mips");
|
||||
}
|
||||
|
||||
int get_feature(char *search) {
|
||||
|
||||
#ifdef __linux
|
||||
FILE *infile;
|
||||
char buffer[2048], *p, *t;
|
||||
p = (char *)NULL;
|
||||
|
||||
infile = fopen("/proc/cpuinfo", "r");
|
||||
|
||||
while (fgets(buffer, sizeof(buffer), infile)) {
|
||||
|
||||
if (!strncmp("Features", buffer, 8) ||
|
||||
!strncmp("ASEs implemented", buffer, 16)) {
|
||||
p = strchr(buffer, ':') + 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(infile);
|
||||
|
||||
if (p == NULL)
|
||||
return 0;
|
||||
|
||||
t = strtok(p, " ");
|
||||
while (t = strtok(NULL, " ")) {
|
||||
if (strstr(t, search)) {
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
void get_cpuconfig(void){
|
||||
if(detect()==CPU_P5600){
|
||||
printf("#define P5600\n");
|
||||
@@ -165,7 +199,7 @@ void get_cpuconfig(void){
|
||||
}else{
|
||||
printf("#define UNKNOWN\n");
|
||||
}
|
||||
#ifndef NO_MSA
|
||||
#ifndef NO_MSA
|
||||
if (get_feature("msa")) printf("#define HAVE_MSA\n");
|
||||
#endif
|
||||
}
|
||||
@@ -181,38 +215,3 @@ void get_libname(void){
|
||||
printf("mips\n");
|
||||
}
|
||||
}
|
||||
|
||||
int get_feature(char *search)
|
||||
{
|
||||
|
||||
#ifdef __linux
|
||||
FILE *infile;
|
||||
char buffer[2048], *p,*t;
|
||||
p = (char *) NULL ;
|
||||
|
||||
infile = fopen("/proc/cpuinfo", "r");
|
||||
|
||||
while (fgets(buffer, sizeof(buffer), infile))
|
||||
{
|
||||
|
||||
if (!strncmp("Features", buffer, 8) || !strncmp("ASEs implemented", buffer, 16))
|
||||
{
|
||||
p = strchr(buffer, ':') + 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(infile);
|
||||
|
||||
if( p == NULL ) return 0;
|
||||
|
||||
t = strtok(p," ");
|
||||
while( t = strtok(NULL," "))
|
||||
{
|
||||
if (strstr(t, search)) { return(1); }
|
||||
}
|
||||
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
+39
-40
@@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
Copyright (c) 2011-2014, The OpenBLAS Project
|
||||
Copyright (c) 2011-2026, The OpenBLAS Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -13,9 +13,9 @@ met:
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Neither the name of the OpenBLAS project nor the names of
|
||||
its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written
|
||||
3. Neither the name of the OpenBLAS project nor the names of
|
||||
its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
@@ -145,13 +145,47 @@ void get_subarchitecture(void){
|
||||
printf("SICORTEX");
|
||||
}else{
|
||||
printf("MIPS64_GENERIC");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void get_subdirname(void){
|
||||
printf("mips64");
|
||||
}
|
||||
|
||||
int get_feature(char *search) {
|
||||
|
||||
#ifdef __linux
|
||||
FILE *infile;
|
||||
char buffer[2048], *p, *t;
|
||||
p = (char *)NULL;
|
||||
|
||||
infile = fopen("/proc/cpuinfo", "r");
|
||||
|
||||
while (fgets(buffer, sizeof(buffer), infile)) {
|
||||
|
||||
if (!strncmp("Features", buffer, 8) ||
|
||||
!strncmp("ASEs implemented", buffer, 16)) {
|
||||
p = strchr(buffer, ':') + 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(infile);
|
||||
|
||||
if (p == NULL)
|
||||
return 0;
|
||||
|
||||
t = strtok(p, " ");
|
||||
while (t = strtok(NULL, " ")) {
|
||||
if (strstr(t, search)) {
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
void get_cpuconfig(void){
|
||||
if(detect()==CPU_LOONGSON3R3) {
|
||||
printf("#define LOONGSON3R3\n");
|
||||
@@ -228,38 +262,3 @@ void get_libname(void){
|
||||
printf("mips64_generic\n");
|
||||
}
|
||||
}
|
||||
|
||||
int get_feature(char *search)
|
||||
{
|
||||
|
||||
#ifdef __linux
|
||||
FILE *infile;
|
||||
char buffer[2048], *p,*t;
|
||||
p = (char *) NULL ;
|
||||
|
||||
infile = fopen("/proc/cpuinfo", "r");
|
||||
|
||||
while (fgets(buffer, sizeof(buffer), infile))
|
||||
{
|
||||
|
||||
if (!strncmp("Features", buffer, 8) || !strncmp("ASEs implemented", buffer, 16))
|
||||
{
|
||||
p = strchr(buffer, ':') + 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(infile);
|
||||
|
||||
if( p == NULL ) return 0;
|
||||
|
||||
t = strtok(p," ");
|
||||
while( t = strtok(NULL," "))
|
||||
{
|
||||
if (strstr(t, search)) { return(1); }
|
||||
}
|
||||
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
+1695
-1774
File diff suppressed because it is too large
Load Diff
@@ -178,10 +178,10 @@ ARCH_CSKY
|
||||
#endif
|
||||
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
ARCH_RISCV64
|
||||
ARCH_WASM
|
||||
OS_WINDOWS
|
||||
#endif
|
||||
|
||||
#if defined(TARGET_OS_IPHONE)
|
||||
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
|
||||
OS_IOS
|
||||
#endif
|
||||
|
||||
+8
-15
@@ -23,17 +23,10 @@ typedef struct { real r, i; } complex;
|
||||
typedef struct { doublereal r, i; } doublecomplex;
|
||||
#ifdef _MSC_VER
|
||||
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
|
||||
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
|
||||
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
|
||||
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
|
||||
#else
|
||||
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
|
||||
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
|
||||
#endif
|
||||
#define pCf(z) (*_pCf(z))
|
||||
#define pCd(z) (*_pCd(z))
|
||||
typedef int logical;
|
||||
typedef short int shortlogical;
|
||||
typedef char logical1;
|
||||
@@ -440,12 +433,12 @@ static real c_b43 = (float)1.;
|
||||
extern /* Subroutine */ int ctest_(integer*, complex*, complex*, complex*, real*);
|
||||
static complex mwpcs[5], mwpct[5];
|
||||
extern /* Subroutine */ int itest1_(integer*, integer*), stest1_(real*,real*,real*,real*);
|
||||
extern /* Subroutine */ int cscaltest_(integer*, complex*, complex*, integer*);
|
||||
extern /* Subroutine */ void cscaltest_(integer*, complex*, complex*, integer*);
|
||||
static complex cx[8];
|
||||
extern real scnrm2test_(integer*, complex*, integer*);
|
||||
static integer np1;
|
||||
extern integer icamaxtest_(integer*, complex*, integer*);
|
||||
extern /* Subroutine */ int csscaltest_(integer*, real*, complex*, integer*);
|
||||
extern /* Subroutine */ void csscaltest_(integer*, real*, complex*, integer*);
|
||||
extern real scasumtest_(integer*, complex*, integer*);
|
||||
static integer len;
|
||||
|
||||
@@ -468,7 +461,7 @@ static real c_b43 = (float)1.;
|
||||
i__1 = len;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
i__2 = i__ - 1;
|
||||
i__3 = i__ + (np1 + combla_1.incx * 5 << 3) - 49;
|
||||
i__3 = i__ + ((np1 + combla_1.incx * 5) << 3) - 49;
|
||||
cx[i__2].r = cv[i__3].r, cx[i__2].i = cv[i__3].i;
|
||||
/* L20: */
|
||||
}
|
||||
@@ -483,13 +476,13 @@ static real c_b43 = (float)1.;
|
||||
} else if (combla_1.icase == 8) {
|
||||
/* .. CSCAL .. */
|
||||
cscaltest_(&combla_1.n, &ca, cx, &combla_1.incx);
|
||||
ctest_(&len, cx, &ctrue5[(np1 + combla_1.incx * 5 << 3) - 48],
|
||||
&ctrue5[(np1 + combla_1.incx * 5 << 3) - 48], sfac);
|
||||
ctest_(&len, cx, &ctrue5[((np1 + combla_1.incx * 5) << 3) - 48],
|
||||
&ctrue5[((np1 + combla_1.incx * 5) << 3) - 48], sfac);
|
||||
} else if (combla_1.icase == 9) {
|
||||
/* .. CSSCALTEST .. */
|
||||
csscaltest_(&combla_1.n, &sa, cx, &combla_1.incx);
|
||||
ctest_(&len, cx, &ctrue6[(np1 + combla_1.incx * 5 << 3) - 48],
|
||||
&ctrue6[(np1 + combla_1.incx * 5 << 3) - 48], sfac);
|
||||
ctest_(&len, cx, &ctrue6[((np1 + combla_1.incx * 5) << 3) - 48],
|
||||
&ctrue6[((np1 + combla_1.incx * 5) << 3) - 48], sfac);
|
||||
} else if (combla_1.icase == 10) {
|
||||
/* .. ICAMAXTEST .. */
|
||||
i__1 = icamaxtest_(&combla_1.n, cx, &combla_1.incx);
|
||||
@@ -737,7 +730,7 @@ static real c_b43 = (float)1.;
|
||||
static complex ctemp;
|
||||
extern /* Subroutine */ int ctest_(integer*, complex*, complex*, complex*, real*);
|
||||
static integer ksize;
|
||||
extern /* Subroutine */ int cdotctest_(integer*, complex*, integer*, complex*, integer*,complex*), ccopytest_(integer*, complex*, integer*, complex*, integer*), cdotutest_(integer*, complex*, integer*, complex*, integer*, complex*),
|
||||
extern /* Subroutine */ void cdotctest_(integer*, complex*, integer*, complex*, integer*,complex*), ccopytest_(integer*, complex*, integer*, complex*, integer*), cdotutest_(integer*, complex*, integer*, complex*, integer*, complex*),
|
||||
cswaptest_(integer*, complex*, integer*, complex*, integer*), caxpytest_(integer*, complex*, complex*, integer*, complex*, integer*);
|
||||
static integer ki, kn;
|
||||
static complex cx[7], cy[7];
|
||||
|
||||
+32
-46
@@ -23,17 +23,12 @@ typedef struct { real r, i; } complex;
|
||||
typedef struct { doublereal r, i; } doublecomplex;
|
||||
#ifdef _MSC_VER
|
||||
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
|
||||
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
|
||||
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
|
||||
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
|
||||
#else
|
||||
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
|
||||
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
|
||||
#endif
|
||||
#define pCf(z) (*_pCf(z))
|
||||
#define pCd(z) (*_pCd(z))
|
||||
typedef int logical;
|
||||
typedef short int shortlogical;
|
||||
typedef char logical1;
|
||||
@@ -319,7 +314,7 @@ static logical c_false = FALSE_;
|
||||
static char snamet[12];
|
||||
static real thresh;
|
||||
static logical rorder;
|
||||
extern /* Subroutine */ void cc2chke_(char*, ftnlen);
|
||||
extern /* Subroutine */ void cc2chke_(char*);
|
||||
static integer layout;
|
||||
static logical ltestt, tsterr;
|
||||
static complex alf[7];
|
||||
@@ -712,7 +707,7 @@ L100:
|
||||
ftnlen)12);
|
||||
/* Test error exits. */
|
||||
if (tsterr) {
|
||||
cc2chke_(snames[isnum - 1], (ftnlen)12);
|
||||
cc2chke_(snames[isnum - 1]);
|
||||
}
|
||||
/* Test computations. */
|
||||
infoc_1.infot = 0;
|
||||
@@ -892,8 +887,8 @@ L240:
|
||||
static integer ia, ib, ic;
|
||||
static logical banded;
|
||||
static integer nc, nd, im, in, kl, ml, nk, nl, ku, ix, iy, ms, lx, ly, ns;
|
||||
extern /* Subroutine */ int ccgbmv_(integer*, char*, integer*, integer*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void ccgemv_(integer*, char*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void ccgbmv_(integer*, char*, integer*, integer*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*);
|
||||
extern /* Subroutine */ void ccgemv_(integer*, char*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*);
|
||||
extern logical lceres_(char*, char*, integer*, integer*, complex*, complex*, integer*, ftnlen, ftnlen);
|
||||
static char ctrans[14];
|
||||
static real errmax;
|
||||
@@ -1142,8 +1137,7 @@ L240:
|
||||
}
|
||||
ccgemv_(iorder, trans, &m, &n, &alpha,
|
||||
&aa[1], &lda, &xx[1], &incx,
|
||||
&beta, &yy[1], &incy, (ftnlen)
|
||||
1);
|
||||
&beta, &yy[1], &incy);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -1158,8 +1152,7 @@ L240:
|
||||
}
|
||||
ccgbmv_(iorder, trans, &m, &n, &kl, &
|
||||
ku, &alpha, &aa[1], &lda, &xx[
|
||||
1], &incx, &beta, &yy[1], &
|
||||
incy, (ftnlen)1);
|
||||
1], &incx, &beta, &yy[1], &incy);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -1347,10 +1340,10 @@ L140:
|
||||
static integer nc, ik, in;
|
||||
static logical packed;
|
||||
static integer nk, ks, ix, iy, ns, lx, ly;
|
||||
extern /* Subroutine */ void cchbmv_(integer*, char*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cchemv_(integer*, char*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cchbmv_(integer*, char*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*);
|
||||
extern /* Subroutine */ void cchemv_(integer*, char*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*);
|
||||
extern logical lceres_(char*, char*, integer*, integer*, complex*, complex*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cchpmv_(integer*, char*, integer*, complex*, complex*, complex*, integer*, complex*, complex*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cchpmv_(integer*, char*, integer*, complex*, complex*, complex*, integer*, complex*, complex*, integer*);
|
||||
static real errmax;
|
||||
static complex transl;
|
||||
static integer laa, lda;
|
||||
@@ -1566,7 +1559,7 @@ L140:
|
||||
}
|
||||
cchemv_(iorder, uplo, &n, &alpha, &aa[1],
|
||||
&lda, &xx[1], &incx, &beta, &yy[1]
|
||||
, &incy, (ftnlen)1);
|
||||
, &incy);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -1581,7 +1574,7 @@ L140:
|
||||
}
|
||||
cchbmv_(iorder, uplo, &n, &k, &alpha, &aa[
|
||||
1], &lda, &xx[1], &incx, &beta, &
|
||||
yy[1], &incy, (ftnlen)1);
|
||||
yy[1], &incy);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -1596,7 +1589,7 @@ L140:
|
||||
}
|
||||
cchpmv_(iorder, uplo, &n, &alpha, &aa[1],
|
||||
&xx[1], &incx, &beta, &yy[1], &
|
||||
incy, (ftnlen)1);
|
||||
incy);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -1792,15 +1785,15 @@ L130:
|
||||
static logical packed;
|
||||
static integer nk, ks, ix, ns, lx;
|
||||
extern logical lceres_(char*, char*, integer*, integer*, complex*, complex*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cctbmv_(integer*, char*, char*, char*, integer*, integer*, complex*, integer*, complex*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cctbsv_(integer*, char*, char*, char*, integer*, integer*, complex*, integer*, complex*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cctbmv_(integer*, char*, char*, char*, integer*, integer*, complex*, integer*, complex*, integer*);
|
||||
extern /* Subroutine */ void cctbsv_(integer*, char*, char*, char*, integer*, integer*, complex*, integer*, complex*, integer*);
|
||||
static char ctrans[14];
|
||||
extern /* Subroutine */ void cctpmv_(integer*, char*, char*, char*, integer*, complex*, complex*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cctpmv_(integer*, char*, char*, char*, integer*, complex*, complex*, integer*);
|
||||
static real errmax;
|
||||
extern /* Subroutine */ void cctrmv_(integer*, char*, char*, char*, integer*, complex*, integer*, complex*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cctpsv_(integer*, char*, char*, char*, integer*, complex*, complex*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cctrmv_(integer*, char*, char*, char*, integer*, complex*, integer*, complex*, integer*);
|
||||
extern /* Subroutine */ void cctpsv_(integer*, char*, char*, char*, integer*, complex*, complex*, integer*);
|
||||
static complex transl;
|
||||
extern /* Subroutine */ void cctrsv_(integer*, char*, char*, char*, integer*, complex*, integer*, complex*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cctrsv_(integer*, char*, char*, char*, integer*, complex*, integer*, complex*, integer*);
|
||||
static char transs[1];
|
||||
static integer laa, icd, lda;
|
||||
extern logical lce_(complex*, complex*, integer*);
|
||||
@@ -2010,8 +2003,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cctrmv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
aa[1], &lda, &xx[1], &incx);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2025,8 +2017,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cctbmv_(iorder, uplo, trans, diag, &n, &k,
|
||||
&aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
&aa[1], &lda, &xx[1], &incx);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2040,8 +2031,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cctpmv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &xx[1], &incx, (ftnlen)1, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
aa[1], &xx[1], &incx);
|
||||
}
|
||||
} else if (s_cmp(sname + 9, "sv", (ftnlen)2, (
|
||||
ftnlen)2) == 0) {
|
||||
@@ -2058,8 +2048,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cctrsv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
aa[1], &lda, &xx[1], &incx);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2073,8 +2062,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cctbsv_(iorder, uplo, trans, diag, &n, &k,
|
||||
&aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
&aa[1], &lda, &xx[1], &incx);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2088,8 +2076,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cctpsv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &xx[1], &incx, (ftnlen)1, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
aa[1], &xx[1], &incx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2634,10 +2621,10 @@ L150:
|
||||
static char uplo[1];
|
||||
static integer i__, j, n;
|
||||
extern /* Subroutine */ int cmake_(char*, char*, char*, integer*, integer*, complex*, integer*, complex*, integer*, integer*, integer*, logical*, complex*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void ccher_(integer*, char*, integer*, real*, complex*, integer*, complex*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void ccher_(integer*, char*, integer*, real*, complex*, integer*, complex*, integer*);
|
||||
static complex alpha, w[1];
|
||||
static logical isame[13];
|
||||
extern /* Subroutine */ void cchpr_(integer*, char*, integer*, real*, complex*, integer*, complex*, ftnlen);
|
||||
extern /* Subroutine */ void cchpr_(integer*, char*, integer*, real*, complex*, integer*, complex*);
|
||||
extern /* Subroutine */ int cmvch_(char*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*, complex*, real*, complex*, real*, real*, logical*, integer*, logical*, ftnlen);
|
||||
static integer nargs;
|
||||
static logical reset;
|
||||
@@ -2812,7 +2799,7 @@ L150:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
ccher_(iorder, uplo, &n, &ralpha, &xx[1], &incx, &aa[
|
||||
1], &lda, (ftnlen)1);
|
||||
1], &lda);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2825,8 +2812,7 @@ L150:
|
||||
al__1.aunit = *ntra;
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cchpr_(iorder, uplo, &n, &ralpha, &xx[1], &incx, &aa[
|
||||
1], (ftnlen)1);
|
||||
cchpr_(iorder, uplo, &n, &ralpha, &xx[1], &incx, &aa[1]);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -3005,8 +2991,8 @@ L130:
|
||||
static integer incxs, incys;
|
||||
static logical upper;
|
||||
static char uplos[1];
|
||||
extern /* Subroutine */ void ccher2_(integer*, char*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cchpr2_(integer*, char*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, ftnlen);
|
||||
extern /* Subroutine */ void ccher2_(integer*, char*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, integer*);
|
||||
extern /* Subroutine */ void cchpr2_(integer*, char*, integer*, complex*, complex*, integer*, complex*, integer*, complex*);
|
||||
static integer ia, ja, ic, nc, jj, lj, in;
|
||||
static logical packed;
|
||||
static integer ix, iy, ns, lx, ly;
|
||||
@@ -3202,7 +3188,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
ccher2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
|
||||
yy[1], &incy, &aa[1], &lda, (ftnlen)1);
|
||||
yy[1], &incy, &aa[1], &lda);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -3216,7 +3202,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cchpr2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
|
||||
yy[1], &incy, &aa[1], (ftnlen)1);
|
||||
yy[1], &incy, &aa[1]);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
|
||||
+35
-40
@@ -23,17 +23,12 @@ typedef struct { real r, i; } complex;
|
||||
typedef struct { doublereal r, i; } doublecomplex;
|
||||
#ifdef _MSC_VER
|
||||
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
|
||||
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
|
||||
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
|
||||
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
|
||||
#else
|
||||
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
|
||||
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
|
||||
#endif
|
||||
#define pCf(z) (*_pCf(z))
|
||||
#define pCd(z) (*_pCd(z))
|
||||
typedef int logical;
|
||||
typedef short int shortlogical;
|
||||
typedef char logical1;
|
||||
@@ -284,10 +279,10 @@ int /* Main program */ main(void)
|
||||
real r__1;
|
||||
|
||||
/* Local variables */
|
||||
integer nalf, idim[9];
|
||||
logical same;
|
||||
integer nbet, ntra;
|
||||
logical rewi;
|
||||
static integer nalf, idim[9];
|
||||
static logical same;
|
||||
static integer nbet, ntra;
|
||||
static logical rewi;
|
||||
extern /* Subroutine */ int cchk1_(char *, real *, real *, integer *,
|
||||
integer *, logical *, logical *, logical *, integer *, integer *,
|
||||
integer *, complex *, integer *, complex *, integer *, complex *,
|
||||
@@ -311,35 +306,35 @@ int /* Main program */ main(void)
|
||||
integer *, complex *, integer *, complex *, integer *, complex *,
|
||||
complex *, complex *, complex *, complex *, complex *, complex *,
|
||||
complex *, complex *, real *, complex *, integer *);
|
||||
complex c__[4225] /* was [65][65] */;
|
||||
real g[65];
|
||||
integer i__, j, n;
|
||||
logical fatal;
|
||||
complex w[130];
|
||||
static complex c__[4225] /* was [65][65] */;
|
||||
static real g[65];
|
||||
static integer i__, j, n;
|
||||
static logical fatal;
|
||||
static complex w[130];
|
||||
extern /* Subroutine */ int cmmch_(char *, char *, integer *, integer *,
|
||||
integer *, complex *, complex *, integer *, complex *, integer *,
|
||||
complex *, complex *, integer *, complex *, real *, complex *,
|
||||
integer *, real *, real *, logical *, integer *, logical *);
|
||||
extern real sdiff_(real *, real *);
|
||||
logical trace;
|
||||
integer nidim;
|
||||
char snaps[32];
|
||||
integer isnum;
|
||||
logical ltest[9];
|
||||
complex aa[4225], ab[8450] /* was [65][130] */, bb[4225], cc[4225], as[
|
||||
static logical trace;
|
||||
static integer nidim;
|
||||
static char snaps[32];
|
||||
static integer isnum;
|
||||
static logical ltest[9];
|
||||
static complex aa[4225], ab[8450] /* was [65][130] */, bb[4225], cc[4225], as[
|
||||
4225], bs[4225], cs[4225], ct[65];
|
||||
logical sfatal, corder;
|
||||
char snamet[12], transa[1], transb[1];
|
||||
real thresh;
|
||||
logical rorder;
|
||||
extern /* Subroutine */ int cc3chke_(char *);
|
||||
integer layout;
|
||||
logical ltestt, tsterr;
|
||||
complex alf[7];
|
||||
static logical sfatal, corder;
|
||||
static char snamet[12], transa[1], transb[1];
|
||||
static real thresh;
|
||||
static logical rorder;
|
||||
extern /* Subroutine */ void cc3chke_(char *);
|
||||
static integer layout;
|
||||
static logical ltestt, tsterr;
|
||||
static complex alf[7];
|
||||
extern logical lce_(complex *, complex *, integer *);
|
||||
complex bet[7];
|
||||
real eps, err;
|
||||
char tmpchar;
|
||||
static complex bet[7];
|
||||
static real eps, err;
|
||||
static char tmpchar;
|
||||
|
||||
/* Test program for the COMPLEX Level 3 Blas. */
|
||||
|
||||
@@ -856,7 +851,7 @@ L230:
|
||||
*, char *, char *, integer *, integer *, integer *, complex *,
|
||||
integer *, integer *, complex *, integer *);
|
||||
integer ia, ib, ma, mb, na, nb, nc, ik, im, in;
|
||||
extern /* Subroutine */ int ccgemm_(integer *, char *, char *, integer *,
|
||||
extern /* Subroutine */ void ccgemm_(integer *, char *, char *, integer *,
|
||||
integer *, integer *, complex *, complex *, integer *, complex *,
|
||||
integer *, complex *, complex *, integer *);
|
||||
integer ks, ms, ns;
|
||||
@@ -1268,13 +1263,13 @@ L130:
|
||||
*, char *, char *, integer *, integer *, complex *, integer *,
|
||||
integer *, complex *, integer *);
|
||||
integer ia, ib, na, nc, im, in;
|
||||
extern /* Subroutine */ int cchemm_(integer *, char *, char *, integer *,
|
||||
extern /* Subroutine */ void cchemm_(integer *, char *, char *, integer *,
|
||||
integer *, complex *, complex *, integer *, complex *, integer *,
|
||||
complex *, complex *, integer *);
|
||||
integer ms, ns;
|
||||
extern logical lceres_(char *, char *, integer *, integer *, complex *,
|
||||
complex *, integer *);
|
||||
extern /* Subroutine */ int ccsymm_(integer *, char *, char *, integer *,
|
||||
extern /* Subroutine */ void ccsymm_(integer *, char *, char *, integer *,
|
||||
integer *, complex *, complex *, integer *, complex *, integer *,
|
||||
complex *, complex *, integer *);
|
||||
real errmax;
|
||||
@@ -1668,11 +1663,11 @@ L120:
|
||||
integer ia, na, nc, im, in, ms, ns;
|
||||
extern logical lceres_(char *, char *, integer *, integer *, complex *,
|
||||
complex *, integer *);
|
||||
extern /* Subroutine */ int cctrmm_(integer *, char *, char *, char *,
|
||||
extern /* Subroutine */ void cctrmm_(integer *, char *, char *, char *,
|
||||
char *, integer *, integer *, complex *, complex *, integer *,
|
||||
complex *, integer *);
|
||||
char tranas[1], transa[1];
|
||||
extern /* Subroutine */ int cctrsm_(integer *, char *, char *, char *,
|
||||
extern /* Subroutine */ void cctrsm_(integer *, char *, char *, char *,
|
||||
char *, integer *, integer *, complex *, complex *, integer *,
|
||||
complex *, integer *);
|
||||
real errmax;
|
||||
@@ -2143,7 +2138,7 @@ L160:
|
||||
integer *, char *, integer *, char *, char *, integer *, integer *
|
||||
, real *, integer *, real *, integer *);
|
||||
integer ia, ib, jc, ma, na, nc, ik, in, jj, lj, ks;
|
||||
extern /* Subroutine */ int ccherk_(integer *, char *, char *, integer *,
|
||||
extern /* Subroutine */ void ccherk_(integer *, char *, char *, integer *,
|
||||
integer *, real *, complex *, integer *, real *, complex *,
|
||||
integer *);
|
||||
integer ns;
|
||||
@@ -2151,7 +2146,7 @@ L160:
|
||||
extern logical lceres_(char *, char *, integer *, integer *, complex *,
|
||||
complex *, integer *);
|
||||
real errmax;
|
||||
extern /* Subroutine */ int ccsyrk_(integer *, char *, char *, integer *,
|
||||
extern /* Subroutine */ void ccsyrk_(integer *, char *, char *, integer *,
|
||||
integer *, complex *, complex *, integer *, complex *, complex *,
|
||||
integer *);
|
||||
char transs[1], transt[1];
|
||||
@@ -2643,12 +2638,12 @@ L130:
|
||||
complex *, integer *);
|
||||
real errmax;
|
||||
char transs[1], transt[1];
|
||||
extern /* Subroutine */ int ccher2k_(integer *, char *, char *, integer *,
|
||||
extern /* Subroutine */ void ccher2k_(integer *, char *, char *, integer *,
|
||||
integer *, complex *, complex *, integer *, complex *, integer *,
|
||||
real *, complex *, integer *);
|
||||
integer laa, lbb, lda, lcc, ldb, ldc;
|
||||
extern logical lce_(complex *, complex *, integer *);
|
||||
extern /* Subroutine */ int ccsyr2k_(integer *, char *, char *, integer *,
|
||||
extern /* Subroutine */ void ccsyr2k_(integer *, char *, char *, integer *,
|
||||
integer *, complex *, complex *, integer *, complex *, integer *,
|
||||
complex *, complex *, integer *);
|
||||
complex als;
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ void F77_drot( const int *N, double *X, const int *incX, double *Y,
|
||||
}
|
||||
|
||||
void F77_drotm(const int *N, double *X, const int *incX, double *Y,
|
||||
const int *incY, const double *dparam)
|
||||
const int *incY, double *dparam)
|
||||
{
|
||||
cblas_drotm(*N, X, *incX, Y, *incY, dparam);
|
||||
return;
|
||||
|
||||
+13
-8
@@ -332,7 +332,8 @@ static doublereal c_b34 = 1.;
|
||||
|
||||
/* Local variables */
|
||||
static integer k;
|
||||
extern /* Subroutine */ int drotgtest_(doublereal*,doublereal*,doublereal*,doublereal*), stest1_(doublereal*,doublereal*,doublereal*,doublereal*);
|
||||
extern /* Subroutine */ void drotgtest_(doublereal*,doublereal*,doublereal*,doublereal*);
|
||||
extern int stest1_(doublereal*,doublereal*,doublereal*,doublereal*);
|
||||
static doublereal sa, sb, sc, ss;
|
||||
|
||||
/* .. Parameters .. */
|
||||
@@ -404,7 +405,8 @@ L40:
|
||||
static integer i__;
|
||||
extern doublereal dnrm2test_(integer*, doublereal*, integer*);
|
||||
static doublereal stemp[1], strue[8];
|
||||
extern /* Subroutine */ int stest_(integer*,doublereal*,doublereal*,doublereal*,doublereal*), dscaltest_(integer*,doublereal*,doublereal*,integer*);
|
||||
extern /* Subroutine */ int stest_(integer*,doublereal*,doublereal*,doublereal*,doublereal*);
|
||||
extern void dscaltest_(integer*,doublereal*,doublereal*,integer*);
|
||||
extern doublereal dasumtest_(integer*,doublereal*,integer*);
|
||||
extern /* Subroutine */ int itest1_(integer*,integer*), stest1_(doublereal*,doublereal*,doublereal*,doublereal*);
|
||||
static doublereal sx[8];
|
||||
@@ -430,7 +432,7 @@ L40:
|
||||
/* .. Set vector arguments .. */
|
||||
i__1 = len;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
sx[i__ - 1] = dv[i__ + (np1 + combla_1.incx * 5 << 3) - 49];
|
||||
sx[i__ - 1] = dv[i__ + ((np1 + combla_1.incx * 5) << 3) - 49];
|
||||
/* L20: */
|
||||
}
|
||||
|
||||
@@ -450,7 +452,7 @@ L40:
|
||||
, sx, &combla_1.incx);
|
||||
i__1 = len;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
strue[i__ - 1] = dtrue5[i__ + (np1 + combla_1.incx * 5 <<
|
||||
strue[i__ - 1] = dtrue5[i__ + ((np1 + combla_1.incx * 5) <<
|
||||
3) - 49];
|
||||
/* L40: */
|
||||
}
|
||||
@@ -517,8 +519,10 @@ L40:
|
||||
static integer lenx, leny;
|
||||
extern doublereal ddottest_(integer*,doublereal*,integer*,doublereal*,integer*);
|
||||
static integer i__, j, ksize;
|
||||
extern /* Subroutine */ int stest_(integer*,doublereal*,doublereal*,doublereal*,doublereal*), dcopytest_(integer*,doublereal*,integer*,doublereal*,integer*), dswaptest_(integer*,doublereal*,integer*,doublereal*,integer*),
|
||||
daxpytest_(integer*,doublereal*,doublereal*,integer*,doublereal*,integer*), stest1_(doublereal*,doublereal*,doublereal*,doublereal*);
|
||||
extern /* Subroutine */ int stest_(integer*,doublereal*,doublereal*,doublereal*,doublereal*);
|
||||
extern void dcopytest_(integer*,doublereal*,integer*,doublereal*,integer*), dswaptest_(integer*,doublereal*,integer*,doublereal*,integer*),
|
||||
daxpytest_(integer*,doublereal*,doublereal*,integer*,doublereal*,integer*);
|
||||
extern int stest1_(doublereal*,doublereal*,doublereal*,doublereal*);
|
||||
static integer ki, kn, mx, my;
|
||||
static doublereal sx[7], sy[7], stx[7], sty[7];
|
||||
|
||||
@@ -618,9 +622,10 @@ L40:
|
||||
;
|
||||
|
||||
/* Local variables */
|
||||
extern /* Subroutine */ int drottest_(integer*,doublereal*,integer*,doublereal*,integer*,doublereal*,doublereal*);
|
||||
extern /* Subroutine */ void drottest_(integer*,doublereal*,integer*,doublereal*,integer*,doublereal*,doublereal*);
|
||||
static integer i__, k, ksize;
|
||||
extern /* Subroutine */int stest_(integer*,doublereal*,doublereal*,doublereal*,doublereal*), drotmtest_(integer*,doublereal*,integer*,doublereal*,integer*,doublereal*);
|
||||
extern /* Subroutine */int stest_(integer*,doublereal*,doublereal*,doublereal*,doublereal*);
|
||||
extern void drotmtest_(integer*,doublereal*,integer*,doublereal*,integer*,doublereal*);
|
||||
static integer ki, kn;
|
||||
static doublereal dparam[5], sx[10], sy[10], stx[10], sty[10];
|
||||
|
||||
|
||||
+32
-53
@@ -21,19 +21,6 @@ typedef float real;
|
||||
typedef double doublereal;
|
||||
typedef struct { real r, i; } complex;
|
||||
typedef struct { doublereal r, i; } doublecomplex;
|
||||
#ifdef _MSC_VER
|
||||
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
|
||||
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
|
||||
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
|
||||
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
|
||||
#else
|
||||
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
|
||||
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
|
||||
#endif
|
||||
#define pCf(z) (*_pCf(z))
|
||||
#define pCd(z) (*_pCd(z))
|
||||
typedef int logical;
|
||||
typedef short int shortlogical;
|
||||
typedef char logical1;
|
||||
@@ -318,7 +305,7 @@ static logical c_false = FALSE_;
|
||||
static char snamet[12];
|
||||
static doublereal thresh;
|
||||
static logical rorder;
|
||||
extern /* Subroutine */ void cd2chke_(char*, ftnlen);
|
||||
extern /* Subroutine */ void cd2chke_(char*);
|
||||
static integer layout;
|
||||
static logical ltestt, tsterr;
|
||||
static doublereal alf[7];
|
||||
@@ -706,7 +693,7 @@ L100:
|
||||
ftnlen)12);
|
||||
/* Test error exits. */
|
||||
if (tsterr) {
|
||||
cd2chke_(snames[isnum - 1], (ftnlen)12);
|
||||
cd2chke_(snames[isnum - 1]);
|
||||
}
|
||||
/* Test computations. */
|
||||
infoc_1.infot = 0;
|
||||
@@ -885,8 +872,8 @@ L240:
|
||||
static integer ia, ib, ic;
|
||||
static logical banded;
|
||||
static integer nc, nd, im, in, kl, ml, nk, nl, ku, ix, iy, ms, lx, ly, ns;
|
||||
extern /* Subroutine */ void cdgbmv_(integer*, char*, integer*, integer*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cdgemv_(integer*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cdgbmv_(integer*, char*, integer*, integer*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*);
|
||||
extern /* Subroutine */ void cdgemv_(integer*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*);
|
||||
extern logical lderes_(char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
|
||||
static char ctrans[14];
|
||||
static doublereal errmax, transl;
|
||||
@@ -1118,8 +1105,7 @@ L240:
|
||||
}
|
||||
cdgemv_(iorder, trans, &m, &n, &alpha,
|
||||
&aa[1], &lda, &xx[1], &incx,
|
||||
&beta, &yy[1], &incy, (ftnlen)
|
||||
1);
|
||||
&beta, &yy[1], &incy);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -1135,7 +1121,7 @@ L240:
|
||||
cdgbmv_(iorder, trans, &m, &n, &kl, &
|
||||
ku, &alpha, &aa[1], &lda, &xx[
|
||||
1], &incx, &beta, &yy[1], &
|
||||
incy, (ftnlen)1);
|
||||
incy);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -1329,10 +1315,10 @@ L140:
|
||||
static logical packed;
|
||||
static integer nk, ks, ix, iy, ns, lx, ly;
|
||||
extern logical lderes_(char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdsbmv_(integer*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cdspmv_(integer*, char*, integer*, doublereal*, doublereal*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cdsbmv_(integer*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*);
|
||||
extern /* Subroutine */ void cdspmv_(integer*, char*, integer*, doublereal*, doublereal*, doublereal*, integer*, doublereal*, doublereal*, integer*);
|
||||
static doublereal errmax, transl;
|
||||
extern /* Subroutine */ void cdsymv_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cdsymv_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*);
|
||||
static integer laa, lda;
|
||||
extern logical lde_(doublereal*, doublereal*, integer*);
|
||||
static doublereal als, bls, err;
|
||||
@@ -1536,7 +1522,7 @@ L140:
|
||||
}
|
||||
cdsymv_(iorder, uplo, &n, &alpha, &aa[1],
|
||||
&lda, &xx[1], &incx, &beta, &yy[1]
|
||||
, &incy, (ftnlen)1);
|
||||
, &incy);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -1551,7 +1537,7 @@ L140:
|
||||
}
|
||||
cdsbmv_(iorder, uplo, &n, &k, &alpha, &aa[
|
||||
1], &lda, &xx[1], &incx, &beta, &
|
||||
yy[1], &incy, (ftnlen)1);
|
||||
yy[1], &incy);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -1566,7 +1552,7 @@ L140:
|
||||
}
|
||||
cdspmv_(iorder, uplo, &n, &alpha, &aa[1],
|
||||
&xx[1], &incx, &beta, &yy[1], &
|
||||
incy, (ftnlen)1);
|
||||
incy);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -1770,15 +1756,15 @@ L130:
|
||||
static logical packed;
|
||||
static integer nk, ks, ix, ns, lx;
|
||||
extern logical lderes_(char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdtbmv_(integer*, char*, char*, char*, integer*, integer*, doublereal*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdtbsv_(integer*, char*, char*, char*, integer*, integer*, doublereal*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdtbmv_(integer*, char*, char*, char*, integer*, integer*, doublereal*, integer*, doublereal*, integer*);
|
||||
extern /* Subroutine */ void cdtbsv_(integer*, char*, char*, char*, integer*, integer*, doublereal*, integer*, doublereal*, integer*);
|
||||
static char ctrans[14];
|
||||
static doublereal errmax;
|
||||
extern /* Subroutine */ void cdtpmv_(integer*, char*, char*, char*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdtrmv_(integer*, char*, char*, char*, integer*, doublereal*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdtpmv_(integer*, char*, char*, char*, integer*, doublereal*, doublereal*, integer*);
|
||||
extern /* Subroutine */ void cdtrmv_(integer*, char*, char*, char*, integer*, doublereal*, integer*, doublereal*, integer*);
|
||||
static doublereal transl;
|
||||
extern /* Subroutine */ void cdtpsv_(integer*, char*, char*, char*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdtrsv_(integer*, char*, char*, char*, integer*, doublereal*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdtpsv_(integer*, char*, char*, char*, integer*, doublereal*, doublereal*, integer*);
|
||||
extern /* Subroutine */ void cdtrsv_(integer*, char*, char*, char*, integer*, doublereal*, integer*, doublereal*, integer*);
|
||||
static char transs[1];
|
||||
static integer laa, icd, lda;
|
||||
extern logical lde_(doublereal*, doublereal*, integer*);
|
||||
@@ -1978,8 +1964,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cdtrmv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
aa[1], &lda, &xx[1], &incx);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -1993,8 +1978,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cdtbmv_(iorder, uplo, trans, diag, &n, &k,
|
||||
&aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
&aa[1], &lda, &xx[1], &incx);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2008,8 +1992,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cdtpmv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &xx[1], &incx, (ftnlen)1, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
aa[1], &xx[1], &incx);
|
||||
}
|
||||
} else if (s_cmp(sname + 9, "sv", (ftnlen)2, (
|
||||
ftnlen)2) == 0) {
|
||||
@@ -2026,8 +2009,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cdtrsv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
aa[1], &lda, &xx[1], &incx);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2041,8 +2023,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cdtbsv_(iorder, uplo, trans, diag, &n, &k,
|
||||
&aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
&aa[1], &lda, &xx[1], &incx);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2056,8 +2037,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cdtpsv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &xx[1], &incx, (ftnlen)1, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
aa[1], &xx[1], &incx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2587,11 +2567,11 @@ L150:
|
||||
static logical isame[13];
|
||||
extern /* Subroutine */ int dmvch_(char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, doublereal*, doublereal*, doublereal*, doublereal*, doublereal*, logical*, integer*, logical*, ftnlen);
|
||||
static integer nargs;
|
||||
extern /* Subroutine */ void cdspr_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, ftnlen);
|
||||
extern /* Subroutine */ void cdspr_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*);
|
||||
static logical reset;
|
||||
static char cuplo[14];
|
||||
static integer incxs;
|
||||
extern /* Subroutine */ void cdsyr_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cdsyr_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*);
|
||||
static logical upper;
|
||||
static char uplos[1];
|
||||
static integer ia, ja, ic, nc, jj, lj, in;
|
||||
@@ -2751,7 +2731,7 @@ L150:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cdsyr_(iorder, uplo, &n, &alpha, &xx[1], &incx, &aa[1]
|
||||
, &lda, (ftnlen)1);
|
||||
, &lda);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2764,8 +2744,7 @@ L150:
|
||||
al__1.aunit = *ntra;
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cdspr_(iorder, uplo, &n, &alpha, &xx[1], &incx, &aa[1]
|
||||
, (ftnlen)1);
|
||||
cdspr_(iorder, uplo, &n, &alpha, &xx[1], &incx, &aa[1]);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -2948,8 +2927,8 @@ L130:
|
||||
static integer incxs, incys;
|
||||
static logical upper;
|
||||
static char uplos[1];
|
||||
extern /* Subroutine */ void cdspr2_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, ftnlen);
|
||||
extern /* Subroutine */ void cdsyr2_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cdspr2_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*);
|
||||
extern /* Subroutine */ void cdsyr2_(integer*, char*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, integer*);
|
||||
static integer ia, ja, ic, nc, jj, lj, in;
|
||||
static logical packed;
|
||||
static integer ix, iy, ns, lx, ly;
|
||||
@@ -3132,7 +3111,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cdsyr2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
|
||||
yy[1], &incy, &aa[1], &lda, (ftnlen)1);
|
||||
yy[1], &incy, &aa[1], &lda);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -3146,7 +3125,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cdspr2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
|
||||
yy[1], &incy, &aa[1], (ftnlen)1);
|
||||
yy[1], &incy, &aa[1]);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
|
||||
+14
-32
@@ -21,19 +21,6 @@ typedef float real;
|
||||
typedef double doublereal;
|
||||
typedef struct { real r, i; } complex;
|
||||
typedef struct { doublereal r, i; } doublecomplex;
|
||||
#ifdef _MSC_VER
|
||||
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
|
||||
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
|
||||
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
|
||||
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
|
||||
#else
|
||||
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
|
||||
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
|
||||
#endif
|
||||
#define pCf(z) (*_pCf(z))
|
||||
#define pCd(z) (*_pCd(z))
|
||||
typedef int logical;
|
||||
typedef short int shortlogical;
|
||||
typedef char logical1;
|
||||
@@ -309,7 +296,7 @@ static logical c_false = FALSE_;
|
||||
static char snamet[12], transa[1], transb[1];
|
||||
static doublereal thresh;
|
||||
static logical rorder;
|
||||
extern /* Subroutine */ void cd3chke_(char*, ftnlen);
|
||||
extern /* Subroutine */ void cd3chke_(char*);
|
||||
static integer layout;
|
||||
static logical ltestt, tsterr;
|
||||
static doublereal alf[7];
|
||||
@@ -658,7 +645,7 @@ L80:
|
||||
ftnlen)12);
|
||||
/* Test error exits. */
|
||||
if (tsterr) {
|
||||
cd3chke_(snames[isnum - 1], (ftnlen)12);
|
||||
cd3chke_(snames[isnum - 1]);
|
||||
}
|
||||
/* Test computations. */
|
||||
infoc_1.infot = 0;
|
||||
@@ -807,7 +794,7 @@ L230:
|
||||
static logical reset;
|
||||
extern /* Subroutine */ void dprcn1_(integer*, integer*, char*, integer*, char*, char*, integer*, integer*, integer*, doublereal*, integer*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
static integer ia, ib, ma, mb, na, nb, nc, ik, im, in;
|
||||
extern /* Subroutine */ void cdgemm_(integer*, char*, char*, integer*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdgemm_(integer*, char*, char*, integer*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*);
|
||||
static integer ks, ms, ns;
|
||||
extern logical lderes_(char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
|
||||
static char tranas[1], tranbs[1], transa[1], transb[1];
|
||||
@@ -1012,8 +999,7 @@ L230:
|
||||
}
|
||||
cdgemm_(iorder, transa, transb, &m, &n, &k, &
|
||||
alpha, &aa[1], &lda, &bb[1], &ldb, &
|
||||
beta, &cc[1], &ldc, (ftnlen)1, (
|
||||
ftnlen)1);
|
||||
beta, &cc[1], &ldc);
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
|
||||
@@ -1204,7 +1190,7 @@ L130:
|
||||
extern /* Subroutine */ void dprcn2_(integer*, integer*, char*, integer*, char*, char*, integer*, integer*, doublereal*, integer*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
static integer ia, ib, na, nc, im, in, ms, ns;
|
||||
extern logical lderes_(char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdsymm_(integer*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdsymm_(integer*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*);
|
||||
static doublereal errmax;
|
||||
static integer laa, lbb, lda, lcc, ldb, ldc;
|
||||
extern logical lde_(doublereal*, doublereal*, integer*);
|
||||
@@ -1386,8 +1372,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cdsymm_(iorder, side, uplo, &m, &n, &alpha, &aa[1]
|
||||
, &lda, &bb[1], &ldb, &beta, &cc[1], &ldc,
|
||||
(ftnlen)1, (ftnlen)1);
|
||||
, &lda, &bb[1], &ldb, &beta, &cc[1], &ldc);
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
|
||||
@@ -1580,9 +1565,9 @@ L120:
|
||||
extern /* Subroutine */ void dprcn3_(integer*, integer*, char*, integer*, char*, char*, char*, char*, integer*, integer*, doublereal*, integer*, integer*, ftnlen, ftnlen, ftnlen, ftnlen, ftnlen);
|
||||
static integer ia, na, nc, im, in, ms, ns;
|
||||
extern logical lderes_(char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdtrmm_(integer*, char*, char*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdtrmm_(integer*, char*, char*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*);
|
||||
static char tranas[1], transa[1];
|
||||
extern /* Subroutine */ void cdtrsm_(integer*, char*, char*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdtrsm_(integer*, char*, char*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*);
|
||||
static doublereal errmax;
|
||||
static integer laa, icd, lbb, lda, ldb;
|
||||
extern logical lde_(doublereal*, doublereal*, integer*);
|
||||
@@ -1762,8 +1747,7 @@ L120:
|
||||
}
|
||||
cdtrmm_(iorder, side, uplo, transa, diag,
|
||||
&m, &n, &alpha, &aa[1], &lda, &bb[
|
||||
1], &ldb, (ftnlen)1, (ftnlen)1, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
1], &ldb);
|
||||
} else if (s_cmp(sname + 9, "sm", (ftnlen)2, (
|
||||
ftnlen)2) == 0) {
|
||||
if (*trace) {
|
||||
@@ -1780,8 +1764,7 @@ L120:
|
||||
}
|
||||
cdtrsm_(iorder, side, uplo, transa, diag,
|
||||
&m, &n, &alpha, &aa[1], &lda, &bb[
|
||||
1], &ldb, (ftnlen)1, (ftnlen)1, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
1], &ldb);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -2038,7 +2021,7 @@ L160:
|
||||
static integer ia, ib, jc, ma, na, nc, ik, in, jj, lj, ks, ns;
|
||||
extern logical lderes_(char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
|
||||
static doublereal errmax;
|
||||
extern /* Subroutine */ void cdsyrk_(integer*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdsyrk_(integer*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, doublereal*, integer*);
|
||||
static char transs[1];
|
||||
static integer laa, lda, lcc, ldc;
|
||||
extern logical lde_(doublereal*, doublereal*, integer*);
|
||||
@@ -2199,8 +2182,7 @@ L160:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cdsyrk_(iorder, uplo, trans, &n, &k, &alpha, &aa[
|
||||
1], &lda, &beta, &cc[1], &ldc, (ftnlen)1,
|
||||
(ftnlen)1);
|
||||
1], &lda, &beta, &cc[1], &ldc);
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
|
||||
@@ -2420,7 +2402,7 @@ L130:
|
||||
static char transs[1];
|
||||
static integer laa, lbb, lda, lcc, ldb, ldc;
|
||||
extern logical lde_(doublereal*, doublereal*, integer*);
|
||||
extern /* Subroutine */ void cdsyr2k_(integer*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cdsyr2k_(integer*, char*, char*, integer*, integer*, doublereal*, doublereal*, integer*, doublereal*, integer*, doublereal*, doublereal*, integer*);
|
||||
static doublereal als;
|
||||
static integer ict, icu;
|
||||
static doublereal err;
|
||||
@@ -2604,7 +2586,7 @@ L130:
|
||||
}
|
||||
cdsyr2k_(iorder, uplo, trans, &n, &k, &alpha, &aa[
|
||||
1], &lda, &bb[1], &ldb, &beta, &cc[1], &
|
||||
ldc, (ftnlen)1, (ftnlen)1);
|
||||
ldc);
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
|
||||
|
||||
+10
-6
@@ -342,7 +342,8 @@ static real c_b34 = (float)1.;
|
||||
|
||||
/* Local variables */
|
||||
static integer k;
|
||||
extern /* Subroutine */ int srotgtest_(real*,real*,real*,real*), stest1_(real*,real*,real*,real*);
|
||||
extern /* Subroutine */ void srotgtest_(real*,real*,real*,real*);
|
||||
extern int stest1_(real*,real*,real*,real*);
|
||||
static real sa, sb, sc, ss;
|
||||
|
||||
/* .. Parameters .. */
|
||||
@@ -435,7 +436,8 @@ L40:
|
||||
static integer i__;
|
||||
extern real snrm2test_(integer*,real*,integer*);
|
||||
static real stemp[1], strue[8];
|
||||
extern /* Subroutine */ int stest_(integer*, real*,real*,real*,real*), sscaltest_(integer*,real*,real*,integer*);
|
||||
extern /* Subroutine */ int stest_(integer*, real*,real*,real*,real*);
|
||||
extern void sscaltest_(integer*,real*,real*,integer*);
|
||||
extern real sasumtest_(integer*,real*,integer*);
|
||||
extern /* Subroutine */ int itest1_(integer*,integer*), stest1_(real*,real*,real*,real*);
|
||||
static real sx[8];
|
||||
@@ -462,7 +464,7 @@ L40:
|
||||
/* .. Set vector arguments .. */
|
||||
i__1 = len;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
sx[i__ - 1] = dv[i__ + (np1 + combla_1.incx * 5 << 3) - 49];
|
||||
sx[i__ - 1] = dv[i__ + ((np1 + combla_1.incx * 5) << 3) - 49];
|
||||
/* L20: */
|
||||
}
|
||||
|
||||
@@ -482,7 +484,7 @@ L40:
|
||||
, sx, &combla_1.incx);
|
||||
i__1 = len;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
strue[i__ - 1] = dtrue5[i__ + (np1 + combla_1.incx * 5 <<
|
||||
strue[i__ - 1] = dtrue5[i__ + ((np1 + combla_1.incx * 5) <<
|
||||
3) - 49];
|
||||
/* L40: */
|
||||
}
|
||||
@@ -592,7 +594,8 @@ L40:
|
||||
static integer lenx, leny;
|
||||
extern real sdottest_(integer*,real*,integer*,real*,integer*);
|
||||
static integer i__, j, ksize;
|
||||
extern /* Subroutine */ int stest_(integer*,real*,real*,real*,real*), scopytest_(integer*,real*,integer*,real*,integer*), sswaptest_(integer*,real*,integer*,real*,integer*),
|
||||
extern /* Subroutine */ int stest_(integer*,real*,real*,real*,real*);
|
||||
extern void scopytest_(integer*,real*,integer*,real*,integer*), sswaptest_(integer*,real*,integer*,real*,integer*),
|
||||
saxpytest_(integer*,real*,real*,integer*,real*,integer*);
|
||||
static integer ki;
|
||||
extern /* Subroutine */ int stest1_(real*,real*,real*,real*);
|
||||
@@ -710,7 +713,8 @@ L40:
|
||||
/* Local variables */
|
||||
extern /* Subroutine */ void srottest_(integer*,real*,integer*,real*,integer*,real*,real*);
|
||||
static integer i__, k, ksize;
|
||||
extern /* Subroutine */ int stest_(integer*,real*,real*,real*,real*), srotmtest_(integer*,real*,integer*,real*,integer*,real*);
|
||||
extern /* Subroutine */ int stest_(integer*,real*,real*,real*,real*);
|
||||
extern void srotmtest_(integer*,real*,integer*,real*,integer*,real*);
|
||||
static integer ki, kn;
|
||||
static real sx[19], sy[19], sparam[5], stx[19], sty[19];
|
||||
|
||||
|
||||
+34
-55
@@ -21,19 +21,6 @@ typedef float real;
|
||||
typedef double doublereal;
|
||||
typedef struct { real r, i; } complex;
|
||||
typedef struct { doublereal r, i; } doublecomplex;
|
||||
#ifdef _MSC_VER
|
||||
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
|
||||
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
|
||||
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
|
||||
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
|
||||
#else
|
||||
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
|
||||
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
|
||||
#endif
|
||||
#define pCf(z) (*_pCf(z))
|
||||
#define pCd(z) (*_pCd(z))
|
||||
typedef int logical;
|
||||
typedef short int shortlogical;
|
||||
typedef char logical1;
|
||||
@@ -319,7 +306,7 @@ extern /* Subroutine */ int schk6_(char* sname, real* eps, real* thresh, integer
|
||||
static logical rorder;
|
||||
static integer layout;
|
||||
static logical ltestt;
|
||||
extern /* Subroutine */ int cs2chke_(char*, ftnlen);
|
||||
extern /* Subroutine */ void cs2chke_(char*);
|
||||
static logical tsterr;
|
||||
static real alf[7];
|
||||
static integer inc[7], nkb;
|
||||
@@ -702,7 +689,7 @@ L100:
|
||||
ftnlen)12);
|
||||
/* Test error exits. */
|
||||
if (tsterr) {
|
||||
cs2chke_(snames[isnum - 1], (ftnlen)12);
|
||||
cs2chke_(snames[isnum - 1]);
|
||||
}
|
||||
/* Test computations. */
|
||||
infoc_1.infot = 0;
|
||||
@@ -880,8 +867,8 @@ L240:
|
||||
static integer ia, ib, ic;
|
||||
static logical banded;
|
||||
static integer nc, nd, im, in, kl, ml, nk, nl, ku, ix, iy, ms, lx, ly, ns;
|
||||
extern /* Subroutine */ void csgbmv_(integer*, char*, integer*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void csgemv_(integer*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void csgbmv_(integer*, char*, integer*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*);
|
||||
extern /* Subroutine */ void csgemv_(integer*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*);
|
||||
static char ctrans[14];
|
||||
static real errmax;
|
||||
extern logical lseres_(char* type__, char* uplo, integer* m, integer* n, real* aa, real* as, integer* lda, ftnlen ltype_len, ftnlen uplo_len);
|
||||
@@ -1115,8 +1102,7 @@ L240:
|
||||
}
|
||||
csgemv_(iorder, trans, &m, &n, &alpha,
|
||||
&aa[1], &lda, &xx[1], &incx,
|
||||
&beta, &yy[1], &incy, (ftnlen)
|
||||
1);
|
||||
&beta, &yy[1], &incy);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -1132,7 +1118,7 @@ L240:
|
||||
csgbmv_(iorder, trans, &m, &n, &kl, &
|
||||
ku, &alpha, &aa[1], &lda, &xx[
|
||||
1], &incx, &beta, &yy[1], &
|
||||
incy, (ftnlen)1);
|
||||
incy);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -1327,10 +1313,10 @@ L140:
|
||||
static integer nk, ks, ix, iy, ns, lx, ly;
|
||||
static real errmax;
|
||||
extern logical lseres_(char* , char*, integer*, integer*, real*, real*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cssbmv_(integer*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cssbmv_(integer*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*);
|
||||
static real transl;
|
||||
extern /* Subroutine */ void csspmv_(integer*, char*, integer*, real*, real*, real*, integer*, real*, real*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cssymv_(integer*, char*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void csspmv_(integer*, char*, integer*, real*, real*, real*, integer*, real*, real*, integer*);
|
||||
extern /* Subroutine */ void cssymv_(integer*, char*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*);
|
||||
static integer laa, lda;
|
||||
static real als, bls;
|
||||
extern logical lse_(real*, real*, integer*);
|
||||
@@ -1531,7 +1517,7 @@ L140:
|
||||
}
|
||||
cssymv_(iorder, uplo, &n, &alpha, &aa[1],
|
||||
&lda, &xx[1], &incx, &beta, &yy[1]
|
||||
, &incy, (ftnlen)1);
|
||||
, &incy);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -1546,7 +1532,7 @@ L140:
|
||||
}
|
||||
cssbmv_(iorder, uplo, &n, &k, &alpha, &aa[
|
||||
1], &lda, &xx[1], &incx, &beta, &
|
||||
yy[1], &incy, (ftnlen)1);
|
||||
yy[1], &incy);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -1561,7 +1547,7 @@ L140:
|
||||
}
|
||||
csspmv_(iorder, uplo, &n, &alpha, &aa[1],
|
||||
&xx[1], &incx, &beta, &yy[1], &
|
||||
incy, (ftnlen)1);
|
||||
incy);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -1767,14 +1753,14 @@ L130:
|
||||
static char ctrans[14];
|
||||
static real errmax;
|
||||
extern logical lseres_(char*, char*, integer*, integer*, real*, real*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cstbmv_(integer*, char*, char*, char*, integer*, integer*, real*, integer*, real*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cstbmv_(integer*, char*, char*, char*, integer*, integer*, real*, integer*, real*, integer*);
|
||||
static real transl;
|
||||
extern /* Subroutine */ void cstbsv_(integer*, char*, char*, char*, integer*, integer*, real*, integer*, real*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cstbsv_(integer*, char*, char*, char*, integer*, integer*, real*, integer*, real*, integer*);
|
||||
static char transs[1];
|
||||
extern /* Subroutine */ void cstpmv_(integer*, char*, char*, char*, integer*, real*, real*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cstrmv_(integer*, char*, char*, char*, integer*, real*, integer*, real*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cstpsv_(integer*, char*, char*, char*, integer*, real*, real*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cstrsv_(integer*, char*, char*, char*, integer*, real*, integer*, real*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cstpmv_(integer*, char*, char*, char*, integer*, real*, real*, integer*);
|
||||
extern /* Subroutine */ void cstrmv_(integer*, char*, char*, char*, integer*, real*, integer*, real*, integer*);
|
||||
extern /* Subroutine */ void cstpsv_(integer*, char*, char*, char*, integer*, real*, real*, integer*);
|
||||
extern /* Subroutine */ void cstrsv_(integer*, char*, char*, char*, integer*, real*, integer*, real*, integer*);
|
||||
static integer laa, icd, lda, ict, icu;
|
||||
extern logical lse_(real*, real*, integer*);
|
||||
static real err;
|
||||
@@ -1972,8 +1958,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cstrmv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
aa[1], &lda, &xx[1], &incx);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -1987,8 +1972,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cstbmv_(iorder, uplo, trans, diag, &n, &k,
|
||||
&aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
&aa[1], &lda, &xx[1], &incx);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2002,8 +1986,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cstpmv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &xx[1], &incx, (ftnlen)1, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
aa[1], &xx[1], &incx);
|
||||
}
|
||||
} else if (s_cmp(sname + 9, "sv", (ftnlen)2, (
|
||||
ftnlen)2) == 0) {
|
||||
@@ -2020,8 +2003,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cstrsv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
aa[1], &lda, &xx[1], &incx);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2035,8 +2017,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cstbsv_(iorder, uplo, trans, diag, &n, &k,
|
||||
&aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
&aa[1], &lda, &xx[1], &incx);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2050,8 +2031,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cstpsv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &xx[1], &incx, (ftnlen)1, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
aa[1], &xx[1], &incx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2585,10 +2565,10 @@ L150:
|
||||
static logical reset;
|
||||
static char cuplo[14];
|
||||
static integer incxs;
|
||||
extern /* Subroutine */ void csspr_(integer*, char*, integer*, real*, real*, integer*, real*, ftnlen);
|
||||
extern /* Subroutine */ void csspr_(integer*, char*, integer*, real*, real*, integer*, real*);
|
||||
static logical upper;
|
||||
static char uplos[1];
|
||||
extern /* Subroutine */ void cssyr_(integer*, char*, integer*, real*, real*, integer*, real*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cssyr_(integer*, char*, integer*, real*, real*, integer*, real*, integer*);
|
||||
static integer ia, ja, ic, nc, jj, lj, in;
|
||||
static logical packed;
|
||||
static integer ix, ns, lx;
|
||||
@@ -2747,7 +2727,7 @@ L150:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cssyr_(iorder, uplo, &n, &alpha, &xx[1], &incx, &aa[1]
|
||||
, &lda, (ftnlen)1);
|
||||
, &lda);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2760,8 +2740,7 @@ L150:
|
||||
al__1.aunit = *ntra;
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
csspr_(iorder, uplo, &n, &alpha, &xx[1], &incx, &aa[1]
|
||||
, (ftnlen)1);
|
||||
csspr_(iorder, uplo, &n, &alpha, &xx[1], &incx, &aa[1]);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -2945,13 +2924,13 @@ L130:
|
||||
static logical upper;
|
||||
static char uplos[1];
|
||||
static integer ia, ja, ic;
|
||||
extern /* Subroutine */ void csspr2_(integer*, char*, integer*, real*, real*, integer*, real*, integer*, real*, ftnlen);
|
||||
extern /* Subroutine */ void csspr2_(integer*, char*, integer*, real*, real*, integer*, real*, integer*, real*);
|
||||
static integer nc, jj, lj, in;
|
||||
static logical packed;
|
||||
extern /* Subroutine */ void cssyr2_(integer*, char*, integer*, real*, real*, integer*, real*, integer*, real*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void cssyr2_(integer*, char*, integer*, real*, real*, integer*, real*, integer*, real*, integer*);
|
||||
static integer ix, iy, ns, lx, ly;
|
||||
static real errmax;
|
||||
extern logical lseres_(char* type__, char* uplo, integer* m, integer* n, real* aa, real* as, integer* lda, ftnlen ltype_len, ftnlen uplo_len);
|
||||
extern logical lseres_(char* type__, char* uplo, integer* m, integer* n, real* aa, real* as, integer* lda, ftnlen, ftnlen);
|
||||
static real transl;
|
||||
static integer laa, lda;
|
||||
static real als;
|
||||
@@ -3131,7 +3110,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cssyr2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
|
||||
yy[1], &incy, &aa[1], &lda, (ftnlen)1);
|
||||
yy[1], &incy, &aa[1], &lda);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -3145,7 +3124,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
csspr2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
|
||||
yy[1], &incy, &aa[1], (ftnlen)1);
|
||||
yy[1], &incy, &aa[1]);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -3380,7 +3359,7 @@ L170:
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
if (gen || (upper && i__ <= j) || (lower && i__ >= j)) {
|
||||
if (i__ <= j && (j - i__ <= *ku || i__ >= j && i__ - j <= *kl))
|
||||
if (((i__ <= j && j - i__ <= *ku) || (i__ >= j && i__ - j <= *kl)))
|
||||
{
|
||||
a[i__ + j * a_dim1] = sbeg_(reset) + *transl;
|
||||
} else {
|
||||
|
||||
+15
-33
@@ -21,19 +21,6 @@ typedef float real;
|
||||
typedef double doublereal;
|
||||
typedef struct { real r, i; } complex;
|
||||
typedef struct { doublereal r, i; } doublecomplex;
|
||||
#ifdef _MSC_VER
|
||||
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
|
||||
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
|
||||
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
|
||||
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
|
||||
#else
|
||||
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
|
||||
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
|
||||
#endif
|
||||
#define pCf(z) (*_pCf(z))
|
||||
#define pCd(z) (*_pCd(z))
|
||||
typedef int logical;
|
||||
typedef short int shortlogical;
|
||||
typedef char logical1;
|
||||
@@ -309,7 +296,7 @@ static logical c_false = FALSE_;
|
||||
static logical rorder;
|
||||
static integer layout;
|
||||
static logical ltestt, tsterr;
|
||||
extern /* Subroutine */ void cs3chke_(char*, ftnlen);
|
||||
extern /* Subroutine */ void cs3chke_(char*);
|
||||
static real alf[7], bet[7];
|
||||
extern logical lse_(real*, real*, integer*);
|
||||
static real eps, err;
|
||||
@@ -522,7 +509,7 @@ L30:
|
||||
if (i__1 < 2) {
|
||||
goto L60;
|
||||
}
|
||||
for (i__ = 1; i__ <= 9; ++i__) {
|
||||
for (i__ = 1; i__ <= 6; ++i__) {
|
||||
if (s_cmp(snamet, snames[i__ - 1] , (ftnlen)12, (ftnlen)12) ==
|
||||
0) {
|
||||
goto L50;
|
||||
@@ -656,7 +643,7 @@ L80:
|
||||
ftnlen)12);
|
||||
/* Test error exits. */
|
||||
if (tsterr) {
|
||||
cs3chke_(snames[isnum - 1], (ftnlen)12);
|
||||
cs3chke_(snames[isnum - 1]);
|
||||
}
|
||||
/* Test computations. */
|
||||
infoc_1.infot = 0;
|
||||
@@ -800,7 +787,7 @@ L230:
|
||||
extern /* Subroutine */ int smake_(char*, char*, char*, integer*, integer*, real*, integer*, real*, integer*, logical*, real*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ int smmch_(char*, char*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, real*, real*, real*, integer*, real*, real*, logical*, integer*, logical*, ftnlen, ftnlen);
|
||||
static integer ia, ib, ma, mb, na, nb, nc, ik, im, in, ks, ms, ns;
|
||||
extern /* Subroutine */ void csgemm_(integer*, char*, char*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void csgemm_(integer*, char*, char*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*);
|
||||
static char tranas[1], tranbs[1], transa[1], transb[1];
|
||||
static real errmax;
|
||||
extern logical lseres_(char*, char*, integer*, integer*, real*, real*, integer*, ftnlen, ftnlen);
|
||||
@@ -1003,8 +990,7 @@ L230:
|
||||
}
|
||||
csgemm_(iorder, transa, transb, &m, &n, &k, &
|
||||
alpha, &aa[1], &lda, &bb[1], &ldb, &
|
||||
beta, &cc[1], &ldc, (ftnlen)1, (
|
||||
ftnlen)1);
|
||||
beta, &cc[1], &ldc);
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
|
||||
@@ -1197,7 +1183,7 @@ L130:
|
||||
static integer ia, ib, na, nc, im, in, ms, ns;
|
||||
static real errmax;
|
||||
extern logical lseres_(char*, char*, integer*, integer*, real*, real*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cssymm_(integer*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cssymm_(integer*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*);
|
||||
extern void sprcn2_(integer*, integer*, char*, integer*, char*, char*, integer*, integer*, real*, integer*, integer*, real*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ int smake_(char*, char*, char*, integer*, integer*, real*, integer*, real*, integer*, logical*, real*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ int smmch_(char*, char*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, real*, real*, real*, integer*, real*, real*, logical*, integer*, logical*, ftnlen, ftnlen);
|
||||
@@ -1378,8 +1364,7 @@ L130:
|
||||
// f_rew(&al__1);
|
||||
}
|
||||
cssymm_(iorder, side, uplo, &m, &n, &alpha, &aa[1]
|
||||
, &lda, &bb[1], &ldb, &beta, &cc[1], &ldc,
|
||||
(ftnlen)1, (ftnlen)1);
|
||||
, &lda, &bb[1], &ldb, &beta, &cc[1], &ldc);
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
|
||||
@@ -1575,8 +1560,8 @@ L120:
|
||||
extern /* Subroutine */ int smake_(char*, char*, char*, integer*, integer*, real*, integer*, real*, integer*, logical*, real*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ int smmch_(char*, char*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, real*, real*, real*, integer*, real*, real*, logical*, integer*, logical*, ftnlen, ftnlen);
|
||||
extern logical lseres_(char*, char*, integer*, integer*, real*, real*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cstrmm_(integer*, char*, char*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, ftnlen, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cstrsm_(integer*, char*, char*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, ftnlen, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cstrmm_(integer*, char*, char*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*);
|
||||
extern /* Subroutine */ void cstrsm_(integer*, char*, char*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*);
|
||||
static integer laa, icd, lbb, lda, ldb, ics;
|
||||
static real als;
|
||||
static integer ict, icu;
|
||||
@@ -1752,8 +1737,7 @@ L120:
|
||||
}
|
||||
cstrmm_(iorder, side, uplo, transa, diag,
|
||||
&m, &n, &alpha, &aa[1], &lda, &bb[
|
||||
1], &ldb, (ftnlen)1, (ftnlen)1, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
1], &ldb);
|
||||
} else if (s_cmp(sname + 9, "sm", (ftnlen)2, (
|
||||
ftnlen)2) == 0) {
|
||||
if (*trace) {
|
||||
@@ -1768,8 +1752,7 @@ L120:
|
||||
}
|
||||
cstrsm_(iorder, side, uplo, transa, diag,
|
||||
&m, &n, &alpha, &aa[1], &lda, &bb[
|
||||
1], &ldb, (ftnlen)1, (ftnlen)1, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
1], &ldb);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -2028,7 +2011,7 @@ L160:
|
||||
static real errmax;
|
||||
extern logical lseres_(char*, char*, integer*, integer*, real*, real*, integer*, ftnlen, ftnlen);
|
||||
static char transs[1];
|
||||
extern /* Subroutine */ void cssyrk_(integer*, char*, char*, integer*, integer*, real*, real*, integer*, real*, real*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cssyrk_(integer*, char*, char*, integer*, integer*, real*, real*, integer*, real*, real*, integer*);
|
||||
static integer laa, lda, lcc, ldc;
|
||||
static real als;
|
||||
static integer ict, icu;
|
||||
@@ -2186,8 +2169,7 @@ L160:
|
||||
// f_rew(&al__1);
|
||||
}
|
||||
cssyrk_(iorder, uplo, trans, &n, &k, &alpha, &aa[
|
||||
1], &lda, &beta, &cc[1], &ldc, (ftnlen)1,
|
||||
(ftnlen)1);
|
||||
1], &lda, &beta, &cc[1], &ldc);
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
|
||||
@@ -2409,7 +2391,7 @@ L130:
|
||||
static integer laa, lbb, lda, lcc, ldb, ldc;
|
||||
static real als;
|
||||
static integer ict, icu;
|
||||
extern /* Subroutine */ void cssyr2k_(integer*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cssyr2k_(integer*, char*, char*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*);
|
||||
extern logical lse_(real*, real*, integer*);
|
||||
extern /* Subroutine */ int smmch_(char*, char*, integer*, integer*, integer*, real*, real*, integer*, real*, integer*, real*, real*, integer*, real*, real*, real*, integer*, real*, real*, logical*, integer*, logical*, ftnlen, ftnlen);
|
||||
static real err;
|
||||
@@ -2591,7 +2573,7 @@ L130:
|
||||
}
|
||||
cssyr2k_(iorder, uplo, trans, &n, &k, &alpha, &aa[
|
||||
1], &lda, &bb[1], &ldb, &beta, &cc[1], &
|
||||
ldc, (ftnlen)1, (ftnlen)1);
|
||||
ldc);
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
|
||||
|
||||
+11
-18
@@ -22,18 +22,10 @@ typedef double doublereal;
|
||||
typedef struct { real r, i; } complex;
|
||||
typedef struct { doublereal r, i; } doublecomplex;
|
||||
#ifdef _MSC_VER
|
||||
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
|
||||
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
|
||||
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
|
||||
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
|
||||
#else
|
||||
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
|
||||
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
|
||||
#endif
|
||||
#define pCf(z) (*_pCf(z))
|
||||
#define pCd(z) (*_pCd(z))
|
||||
typedef int logical;
|
||||
typedef short int shortlogical;
|
||||
typedef char logical1;
|
||||
@@ -380,11 +372,12 @@ static doublereal c_b43 = 1.;
|
||||
static integer i__;
|
||||
extern /* Subroutine */ int ctest_(integer*, doublecomplex*, doublecomplex*, doublecomplex*, doublereal*);
|
||||
static doublecomplex mwpcs[5], mwpct[5];
|
||||
extern /* Subroutine */ int zscaltest_(integer*, doublecomplex*, doublecomplex*, integer*), itest1_(integer*, integer*), stest1_(doublereal*, doublereal*, doublereal*, doublereal*);
|
||||
extern /* Subroutine */ void zscaltest_(integer*, doublecomplex*, doublecomplex*, integer*);
|
||||
extern int itest1_(integer*, integer*), stest1_(doublereal*, doublereal*, doublereal*, doublereal*);
|
||||
static doublecomplex cx[8];
|
||||
extern doublereal dznrm2test_(integer*, doublecomplex*, integer*);
|
||||
static integer np1;
|
||||
extern /* Subroutine */ int zdscaltest_(integer*, doublereal*, doublecomplex*, integer*);
|
||||
extern /* Subroutine */ void zdscaltest_(integer*, doublereal*, doublecomplex*, integer*);
|
||||
extern integer izamaxtest_(integer*, doublecomplex*, integer*);
|
||||
extern doublereal dzasumtest_(integer*, doublecomplex*, integer*);
|
||||
static integer len;
|
||||
@@ -408,7 +401,7 @@ static doublereal c_b43 = 1.;
|
||||
i__1 = len;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
i__2 = i__ - 1;
|
||||
i__3 = i__ + (np1 + combla_1.incx * 5 << 3) - 49;
|
||||
i__3 = i__ + ((np1 + combla_1.incx * 5) << 3) - 49;
|
||||
cx[i__2].r = cv[i__3].r, cx[i__2].i = cv[i__3].i;
|
||||
/* L20: */
|
||||
}
|
||||
@@ -423,13 +416,13 @@ static doublereal c_b43 = 1.;
|
||||
} else if (combla_1.icase == 8) {
|
||||
/* .. ZSCALTEST .. */
|
||||
zscaltest_(&combla_1.n, &ca, cx, &combla_1.incx);
|
||||
ctest_(&len, cx, &ctrue5[(np1 + combla_1.incx * 5 << 3) - 48],
|
||||
&ctrue5[(np1 + combla_1.incx * 5 << 3) - 48], sfac);
|
||||
ctest_(&len, cx, &ctrue5[((np1 + combla_1.incx * 5) << 3) - 48],
|
||||
&ctrue5[((np1 + combla_1.incx * 5) << 3) - 48], sfac);
|
||||
} else if (combla_1.icase == 9) {
|
||||
/* .. ZDSCALTEST .. */
|
||||
zdscaltest_(&combla_1.n, &sa, cx, &combla_1.incx);
|
||||
ctest_(&len, cx, &ctrue6[(np1 + combla_1.incx * 5 << 3) - 48],
|
||||
&ctrue6[(np1 + combla_1.incx * 5 << 3) - 48], sfac);
|
||||
ctest_(&len, cx, &ctrue6[((np1 + combla_1.incx * 5) << 3) - 48],
|
||||
&ctrue6[((np1 + combla_1.incx * 5) << 3) - 48], sfac);
|
||||
} else if (combla_1.icase == 10) {
|
||||
/* .. IZAMAXTEST .. */
|
||||
i__1 = izamaxtest_(&combla_1.n, cx, &combla_1.incx);
|
||||
@@ -591,11 +584,11 @@ static doublereal c_b43 = 1.;
|
||||
extern /* Subroutine */ int ctest_(integer*, doublecomplex*, doublecomplex*, doublecomplex*, doublereal*);
|
||||
static integer ksize;
|
||||
static doublecomplex ztemp;
|
||||
extern /* Subroutine */ int zdotctest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*), zcopytest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
extern /* Subroutine */ void zdotctest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*), zcopytest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
static integer ki;
|
||||
extern /* Subroutine */ int zdotutest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*), zswaptest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
extern /* Subroutine */ void zdotutest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*), zswaptest_(integer*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
static integer kn;
|
||||
extern /* Subroutine */ int zaxpytest_(integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
extern /* Subroutine */ void zaxpytest_(integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
static doublecomplex cx[7], cy[7];
|
||||
static integer mx, my;
|
||||
|
||||
|
||||
+32
-48
@@ -22,17 +22,12 @@ typedef double doublereal;
|
||||
typedef struct { real r, i; } complex;
|
||||
typedef struct { doublereal r, i; } doublecomplex;
|
||||
#ifdef _MSC_VER
|
||||
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
|
||||
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
|
||||
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
|
||||
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
|
||||
#else
|
||||
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
|
||||
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
|
||||
#endif
|
||||
#define pCf(z) (*_pCf(z))
|
||||
#define pCd(z) (*_pCd(z))
|
||||
typedef int logical;
|
||||
typedef short int shortlogical;
|
||||
@@ -322,7 +317,7 @@ static logical c_false = FALSE_;
|
||||
static logical rorder;
|
||||
static integer layout;
|
||||
static logical ltestt, tsterr;
|
||||
extern /* Subroutine */ void cz2chke_(char*, ftnlen);
|
||||
extern /* Subroutine */ void cz2chke_(char*);
|
||||
static doublecomplex alf[7];
|
||||
static integer inc[7], nkb;
|
||||
static doublecomplex bet[7];
|
||||
@@ -713,7 +708,7 @@ L100:
|
||||
ftnlen)12);
|
||||
/* Test error exits. */
|
||||
if (tsterr) {
|
||||
cz2chke_(snames[isnum - 1], (ftnlen)12);
|
||||
cz2chke_(snames[isnum - 1]);
|
||||
}
|
||||
/* Test computations. */
|
||||
infoc_1.infot = 0;
|
||||
@@ -893,9 +888,9 @@ L240:
|
||||
static integer ia, ib, ic;
|
||||
static logical banded;
|
||||
static integer nc, nd, im, in, kl, ml, nk, nl, ku, ix, iy, ms, lx, ly, ns;
|
||||
extern /* Subroutine */ void czgbmv_(integer*, char*, integer*, integer*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void czgbmv_(integer*, char*, integer*, integer*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
|
||||
static char ctrans[14];
|
||||
extern /* Subroutine */ void czgemv_(integer*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void czgemv_(integer*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
|
||||
static doublereal errmax;
|
||||
static doublecomplex transl;
|
||||
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
@@ -1144,8 +1139,7 @@ L240:
|
||||
}
|
||||
czgemv_(iorder, trans, &m, &n, &alpha,
|
||||
&aa[1], &lda, &xx[1], &incx,
|
||||
&beta, &yy[1], &incy, (ftnlen)
|
||||
1);
|
||||
&beta, &yy[1], &incy);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -1160,8 +1154,7 @@ L240:
|
||||
}
|
||||
czgbmv_(iorder, trans, &m, &n, &kl, &
|
||||
ku, &alpha, &aa[1], &lda, &xx[
|
||||
1], &incx, &beta, &yy[1], &
|
||||
incy, (ftnlen)1);
|
||||
1], &incx, &beta, &yy[1], &incy);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -1349,12 +1342,12 @@ L140:
|
||||
static integer nc, ik, in;
|
||||
static logical packed;
|
||||
static integer nk, ks, ix, iy, ns, lx, ly;
|
||||
extern /* Subroutine */ void czhbmv_(integer*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void czhemv_(integer*, char*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void czhbmv_(integer*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
|
||||
extern /* Subroutine */ void czhemv_(integer*, char*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
|
||||
static doublereal errmax;
|
||||
static doublecomplex transl;
|
||||
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void czhpmv_(integer*, char*, integer*, doublecomplex*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void czhpmv_(integer*, char*, integer*, doublecomplex*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
|
||||
static integer laa, lda;
|
||||
static doublecomplex als, bls;
|
||||
static doublereal err;
|
||||
@@ -1568,7 +1561,7 @@ L140:
|
||||
}
|
||||
czhemv_(iorder, uplo, &n, &alpha, &aa[1],
|
||||
&lda, &xx[1], &incx, &beta, &yy[1]
|
||||
, &incy, (ftnlen)1);
|
||||
, &incy);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -1583,7 +1576,7 @@ L140:
|
||||
}
|
||||
czhbmv_(iorder, uplo, &n, &k, &alpha, &aa[
|
||||
1], &lda, &xx[1], &incx, &beta, &
|
||||
yy[1], &incy, (ftnlen)1);
|
||||
yy[1], &incy);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -1597,8 +1590,7 @@ L140:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
czhpmv_(iorder, uplo, &n, &alpha, &aa[1],
|
||||
&xx[1], &incx, &beta, &yy[1], &
|
||||
incy, (ftnlen)1);
|
||||
&xx[1], &incx, &beta, &yy[1], &incy);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -1798,13 +1790,13 @@ L130:
|
||||
static doublereal errmax;
|
||||
static doublecomplex transl;
|
||||
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cztbmv_(integer*, char*, char*, char*, integer*, integer*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cztbmv_(integer*, char*, char*, char*, integer*, integer*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
static char transs[1];
|
||||
extern /* Subroutine */ void cztbsv_(integer*, char*, char*, char*, integer*, integer*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cztpmv_(integer*, char*, char*, char*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cztpsv_(integer*, char*, char*, char*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cztrmv_(integer*, char*, char*, char*, integer*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cztrsv_(integer*, char*, char*, char*, integer*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cztbsv_(integer*, char*, char*, char*, integer*, integer*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
extern /* Subroutine */ void cztpmv_(integer*, char*, char*, char*, integer*, doublecomplex*, doublecomplex*, integer*);
|
||||
extern /* Subroutine */ void cztpsv_(integer*, char*, char*, char*, integer*, doublecomplex*, doublecomplex*, integer*);
|
||||
extern /* Subroutine */ void cztrmv_(integer*, char*, char*, char*, integer*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
extern /* Subroutine */ void cztrsv_(integer*, char*, char*, char*, integer*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
static integer laa, icd, lda, ict, icu;
|
||||
static doublereal err;
|
||||
extern logical lze_(doublecomplex*, doublecomplex*, integer*);
|
||||
@@ -2014,8 +2006,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cztrmv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
aa[1], &lda, &xx[1], &incx);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2029,8 +2020,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cztbmv_(iorder, uplo, trans, diag, &n, &k,
|
||||
&aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
&aa[1], &lda, &xx[1], &incx);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2044,8 +2034,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cztpmv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &xx[1], &incx, (ftnlen)1, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
aa[1], &xx[1], &incx);
|
||||
}
|
||||
} else if (s_cmp(sname + 9, "sv", (ftnlen)2, (
|
||||
ftnlen)2) == 0) {
|
||||
@@ -2062,8 +2051,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cztrsv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
aa[1], &lda, &xx[1], &incx);
|
||||
} else if (banded) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2077,8 +2065,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cztbsv_(iorder, uplo, trans, diag, &n, &k,
|
||||
&aa[1], &lda, &xx[1], &incx, (
|
||||
ftnlen)1, (ftnlen)1, (ftnlen)1);
|
||||
&aa[1], &lda, &xx[1], &incx);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2092,8 +2079,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
cztpsv_(iorder, uplo, trans, diag, &n, &
|
||||
aa[1], &xx[1], &incx, (ftnlen)1, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
aa[1], &xx[1], &incx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2644,11 +2630,11 @@ L150:
|
||||
static logical isame[13];
|
||||
extern /* Subroutine */ int zmake_(char*, char*, char*, integer*, integer*, doublecomplex*, integer*, doublecomplex*, integer*, integer*, integer*, logical*, doublecomplex*, ftnlen, ftnlen, ftnlen);
|
||||
static integer nargs;
|
||||
extern /* Subroutine */ void czher_(integer*, char*, integer*, doublereal*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void czher_(integer*, char*, integer*, doublereal*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
static logical reset;
|
||||
static char cuplo[14];
|
||||
static integer incxs;
|
||||
extern /* Subroutine */ void czhpr_(integer*, char*, integer*, doublereal*, doublecomplex*, integer*, doublecomplex*, ftnlen);
|
||||
extern /* Subroutine */ void czhpr_(integer*, char*, integer*, doublereal*, doublecomplex*, integer*, doublecomplex*);
|
||||
extern /* Subroutine */ int zmvch_(char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, doublereal*, doublecomplex*, doublereal*, doublereal*, logical*, integer*, logical*, ftnlen);
|
||||
static logical upper;
|
||||
static char uplos[1];
|
||||
@@ -2817,8 +2803,7 @@ L150:
|
||||
al__1.aunit = *ntra;
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
czher_(iorder, uplo, &n, &ralpha, &xx[1], &incx, &aa[
|
||||
1], &lda, (ftnlen)1);
|
||||
czher_(iorder, uplo, &n, &ralpha, &xx[1], &incx, &aa[1], &lda);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -2831,8 +2816,7 @@ L150:
|
||||
al__1.aunit = *ntra;
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
czhpr_(iorder, uplo, &n, &ralpha, &xx[1], &incx, &aa[
|
||||
1], (ftnlen)1);
|
||||
czhpr_(iorder, uplo, &n, &ralpha, &xx[1], &incx, &aa[1]);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -3011,8 +2995,8 @@ L130:
|
||||
extern /* Subroutine */ int zmvch_(char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, doublereal*, doublecomplex*, doublereal*, doublereal*, logical*, integer*, logical*, ftnlen);
|
||||
static logical upper;
|
||||
static char uplos[1];
|
||||
extern /* Subroutine */ void czher2_(integer*, char*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen);
|
||||
extern /* Subroutine */ void czhpr2_(integer*, char*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, ftnlen);
|
||||
extern /* Subroutine */ void czher2_(integer*, char*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
extern /* Subroutine */ void czhpr2_(integer*, char*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*);
|
||||
static integer ia, ja, ic, nc, jj, lj, in;
|
||||
static logical packed;
|
||||
static integer ix, iy, ns, lx, ly;
|
||||
@@ -3208,7 +3192,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
czher2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
|
||||
yy[1], &incy, &aa[1], &lda, (ftnlen)1);
|
||||
yy[1], &incy, &aa[1], &lda);
|
||||
} else if (packed) {
|
||||
if (*trace) {
|
||||
/*
|
||||
@@ -3222,7 +3206,7 @@ L130:
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
czhpr2_(iorder, uplo, &n, &alpha, &xx[1], &incx, &
|
||||
yy[1], &incy, &aa[1], (ftnlen)1);
|
||||
yy[1], &incy, &aa[1]);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
|
||||
+20
-27
@@ -25,11 +25,9 @@ typedef struct { doublereal r, i; } doublecomplex;
|
||||
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
|
||||
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
|
||||
#else
|
||||
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
|
||||
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
|
||||
#endif
|
||||
#define pCf(z) (*_pCf(z))
|
||||
#define pCd(z) (*_pCd(z))
|
||||
typedef int logical;
|
||||
typedef short int shortlogical;
|
||||
@@ -314,7 +312,7 @@ static logical c_false = FALSE_;
|
||||
static logical rorder;
|
||||
static integer layout;
|
||||
static logical ltestt, tsterr;
|
||||
extern /* Subroutine */ int cz3chke_(char*, ftnlen);
|
||||
extern /* Subroutine */ void cz3chke_(char*);
|
||||
static doublecomplex alf[7], bet[7];
|
||||
static doublereal eps, err;
|
||||
extern logical lze_(doublecomplex*, doublecomplex*, integer*);
|
||||
@@ -679,7 +677,7 @@ L80:
|
||||
ftnlen)12);
|
||||
/* Test error exits. */
|
||||
if (tsterr) {
|
||||
cz3chke_(snames[isnum - 1], (ftnlen)12);
|
||||
cz3chke_(snames[isnum - 1]);
|
||||
}
|
||||
/* Test computations. */
|
||||
infoc_1.infot = 0;
|
||||
@@ -831,7 +829,7 @@ L230:
|
||||
static integer ia, ib;
|
||||
extern /* Subroutine */ int zprcn1_(integer*, integer*, char*, integer*, char*, char*, integer*, integer*, integer*, doublecomplex*, integer*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
static integer ma, mb, na, nb, nc, ik, im, in, ks, ms, ns;
|
||||
extern /* Subroutine */ void czgemm_(integer*, char*, char*, integer*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void czgemm_(integer*, char*, char*, integer*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
|
||||
static char tranas[1], tranbs[1], transa[1], transb[1];
|
||||
static doublereal errmax;
|
||||
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
@@ -1047,8 +1045,7 @@ L230:
|
||||
}
|
||||
czgemm_(iorder, transa, transb, &m, &n, &k, &
|
||||
alpha, &aa[1], &lda, &bb[1], &ldb, &
|
||||
beta, &cc[1], &ldc, (ftnlen)1, (
|
||||
ftnlen)1);
|
||||
beta, &cc[1], &ldc);
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
|
||||
@@ -1242,10 +1239,10 @@ return 0;
|
||||
static integer ia, ib;
|
||||
extern /* Subroutine */ int zprcn2_(integer*, integer*, char*, integer*, char*, char*, integer*, integer*, doublecomplex*, integer*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
static integer na, nc, im, in, ms, ns;
|
||||
extern /* Subroutine */ void czhemm_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void czhemm_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
|
||||
static doublereal errmax;
|
||||
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void czsymm_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void czsymm_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
|
||||
static integer laa, lbb, lda, lcc, ldb, ldc, ics;
|
||||
static doublecomplex als, bls;
|
||||
static integer icu;
|
||||
@@ -1438,11 +1435,11 @@ return 0;
|
||||
if (isconj) {
|
||||
czhemm_(iorder, side, uplo, &m, &n, &alpha, &
|
||||
aa[1], &lda, &bb[1], &ldb, &beta, &cc[
|
||||
1], &ldc, (ftnlen)1, (ftnlen)1);
|
||||
1], &ldc);
|
||||
} else {
|
||||
czsymm_(iorder, side, uplo, &m, &n, &alpha, &
|
||||
aa[1], &lda, &bb[1], &ldb, &beta, &cc[
|
||||
1], &ldc, (ftnlen)1, (ftnlen)1);
|
||||
1], &ldc);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -1641,8 +1638,8 @@ return 0;
|
||||
static char tranas[1], transa[1];
|
||||
static doublereal errmax;
|
||||
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cztrmm_(integer*, char*, char*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cztrsm_(integer*, char*, char*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, ftnlen, ftnlen, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void cztrmm_(integer*, char*, char*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
extern /* Subroutine */ void cztrsm_(integer*, char*, char*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*);
|
||||
static integer laa, icd, lbb, lda, ldb, ics;
|
||||
static doublecomplex als;
|
||||
static integer ict, icu;
|
||||
@@ -1828,8 +1825,7 @@ return 0;
|
||||
}
|
||||
cztrmm_(iorder, side, uplo, transa, diag,
|
||||
&m, &n, &alpha, &aa[1], &lda, &bb[
|
||||
1], &ldb, (ftnlen)1, (ftnlen)1, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
1], &ldb);
|
||||
} else if (s_cmp(sname + 9, "sm", (ftnlen)2, (
|
||||
ftnlen)2) == 0) {
|
||||
if (*trace) {
|
||||
@@ -1846,8 +1842,7 @@ return 0;
|
||||
}
|
||||
cztrsm_(iorder, side, uplo, transa, diag,
|
||||
&m, &n, &alpha, &aa[1], &lda, &bb[
|
||||
1], &ldb, (ftnlen)1, (ftnlen)1, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
1], &ldb);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -2119,11 +2114,11 @@ return 0;
|
||||
extern /* Subroutine */ int zprcn6_(integer*, integer*, char*, integer*, char*, char*, integer*, integer*, doublereal*, integer*, doublereal*, integer*, ftnlen, ftnlen, ftnlen);
|
||||
static integer ik, in, jj, lj, ks, ns;
|
||||
static doublereal ralpha;
|
||||
extern /* Subroutine */ int czherk_(integer*, char*, char*, integer*, integer*, doublereal*, doublecomplex*, integer*, doublereal*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void czherk_(integer*, char*, char*, integer*, integer*, doublereal*, doublecomplex*, integer*, doublereal*, doublecomplex*, integer*);
|
||||
static doublereal errmax;
|
||||
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
static char transs[1], transt[1];
|
||||
extern /* Subroutine */ int czsyrk_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void czsyrk_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
|
||||
static integer laa, lda, lcc, ldc;
|
||||
static doublecomplex als;
|
||||
static integer ict, icu;
|
||||
@@ -2319,8 +2314,7 @@ return 0;
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
czherk_(iorder, uplo, trans, &n, &k, &ralpha,
|
||||
&aa[1], &lda, &rbeta, &cc[1], &ldc, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
&aa[1], &lda, &rbeta, &cc[1], &ldc);
|
||||
} else {
|
||||
if (*trace) {
|
||||
zprcn4_(ntra, &nc, sname, iorder, uplo,
|
||||
@@ -2334,8 +2328,7 @@ return 0;
|
||||
f_rew(&al__1);*/
|
||||
}
|
||||
czsyrk_(iorder, uplo, trans, &n, &k, &alpha, &
|
||||
aa[1], &lda, &beta, &cc[1], &ldc, (
|
||||
ftnlen)1, (ftnlen)1);
|
||||
aa[1], &lda, &beta, &cc[1], &ldc);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
@@ -2615,11 +2608,11 @@ return 0;
|
||||
static doublereal errmax;
|
||||
extern logical lzeres_(char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
static char transs[1], transt[1];
|
||||
extern /* Subroutine */ int czher2k_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublereal*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void czher2k_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublereal*, doublecomplex*, integer*);
|
||||
static integer laa, lbb, lda, lcc, ldb, ldc;
|
||||
static doublecomplex als;
|
||||
static integer ict, icu;
|
||||
extern /* Subroutine */ int czsyr2k_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*, ftnlen, ftnlen);
|
||||
extern /* Subroutine */ void czsyr2k_(integer*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*);
|
||||
static doublereal err;
|
||||
extern logical lze_(doublecomplex*, doublecomplex*, integer*);
|
||||
|
||||
@@ -2830,7 +2823,7 @@ return 0;
|
||||
}
|
||||
czher2k_(iorder, uplo, trans, &n, &k, &alpha,
|
||||
&aa[1], &lda, &bb[1], &ldb, &rbeta, &
|
||||
cc[1], &ldc, (ftnlen)1, (ftnlen)1);
|
||||
cc[1], &ldc);
|
||||
} else {
|
||||
if (*trace) {
|
||||
zprcn5_(ntra, &nc, sname, iorder, uplo,
|
||||
@@ -2845,7 +2838,7 @@ return 0;
|
||||
}
|
||||
czsyr2k_(iorder, uplo, trans, &n, &k, &alpha,
|
||||
&aa[1], &lda, &bb[1], &ldb, &beta, &
|
||||
cc[1], &ldc, (ftnlen)1, (ftnlen)1);
|
||||
cc[1], &ldc);
|
||||
}
|
||||
|
||||
/* Check if error-exit was taken incorrectly. */
|
||||
|
||||
+13
-1
@@ -13,7 +13,9 @@ This page documents those non-standard APIs.
|
||||
| ?omatcopy | s,d,c,z | out-of-place transposition/copying |
|
||||
| ?geadd | s,d,c,z | ATLAS-like matrix add `B = α*A+β*B` |
|
||||
| ?gemmt | s,d,c,z | `gemm` but only a triangular part updated |
|
||||
|
||||
| cblas_?gemm_batch | s,d,c,z,b | `gemm` with several groups of input data
|
||||
|
|
||||
| cblas_?gemm_batch_strided | s,d,c,z,b | `gemm` with groups of data stored at fixed offsets in the input arrays
|
||||
|
||||
## bfloat16 functionality
|
||||
|
||||
@@ -26,6 +28,15 @@ BLAS-like and conversion functions for `bfloat16` (available when OpenBLAS was c
|
||||
* `float cblas_sbdot` computes the dot product of two bfloat16 arrays
|
||||
* `void cblas_sbgemv` performs the matrix-vector operations of GEMV with the input matrix and X vector as bfloat16
|
||||
* `void cblas_sbgemm` performs the matrix-matrix operations of GEMM with both input arrays containing bfloat16
|
||||
* `void cblas_bgemv` performs the matrix-vector operations of GEMV with the input matrix, X vector and result as bfloat16
|
||||
* `void cblas_bgemm` performs the matrix-matrix operations of GEMM with both input arrays containing bfloat16 and the output being bfloat16 as well
|
||||
|
||||
## half-precision float or fp16 functionality
|
||||
|
||||
BLAS-like and conversion functions for `hfloat16` (available when OpenBLAS was compiled with `BUILD_HFLOAT16=1`):
|
||||
|
||||
* `void cblas_shgemm` performs the matrix-matrix operations of GEMM with both input arrays containing hfloat16
|
||||
|
||||
|
||||
## Utility functions
|
||||
|
||||
@@ -36,4 +47,5 @@ BLAS-like and conversion functions for `bfloat16` (available when OpenBLAS was c
|
||||
* `char * openblas_get_config()` returns the options OpenBLAS was built with, something like `NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Haswell`
|
||||
* `int openblas_set_affinity(int thread_index, size_t cpusetsize, cpu_set_t *cpuset)` sets the CPU affinity mask of the given thread
|
||||
to the provided cpuset. Only available on Linux, with semantics identical to `pthread_setaffinity_np`.
|
||||
* `openblas_set_thread_callback_function` overrides the default multithreading backend with the provided argument
|
||||
|
||||
|
||||
+6
-1
@@ -345,7 +345,12 @@ Multithreading support in OpenBLAS requires the use of internal buffers for shar
|
||||
If you get a message "error while loading shared libraries: libopenblas.so.0: ELF load command address/offset not properly aligned" when starting a program that is (dynamically) linked to OpenBLAS, this is very likely due to a bug in the GNU linker (ld) that is part of the
|
||||
GNU binutils package. This error was specifically observed on older versions of Ubuntu Linux updated with the (at the time) most recent binutils version 2.38, but an internet search turned up sporadic reports involving various other libraries dating back several years. A bugfix was created by the binutils developers and should be available in later versions of binutils.(See issue 3708 for details)
|
||||
|
||||
#### <a name="OpenMP"></a>Using OpenBLAS with OpenMP
|
||||
### <a name="CallingConvention"></a>The tests work fine, but calling any complex function from my code produces wrong or no results
|
||||
|
||||
This is almost certainly a problem with the calling convention used, in particular with the way the computed result is transported back to the caller. By default, OpenBLAS follows the F2C convention of returning the result on the stack rather than as the first argument to the function. So if your code has a prototype like "void cdotu ( complex *res, int n,...)" change it to "complex cdotu (int n,...)". Better yet,
|
||||
use the CBLAS interface rather than the Fortran one.
|
||||
|
||||
### <a name="OpenMP"></a>Using OpenBLAS with OpenMP
|
||||
|
||||
OpenMP provides its own locking mechanisms, so when your code makes BLAS/LAPACK calls from inside OpenMP parallel regions it is imperative
|
||||
that you use an OpenBLAS that is built with USE_OPENMP=1, as otherwise deadlocks might occur. Furthermore, OpenBLAS will automatically restrict itself to using only a single thread when called from an OpenMP parallel region. When it is certain that calls will only occur
|
||||
|
||||
+9
-6
@@ -443,6 +443,10 @@ To then use the built OpenBLAS shared library in Visual Studio:
|
||||
|
||||
### Windows on Arm
|
||||
|
||||
If you want to use a regular x64 Windows build of OpenBLAS with x64 software in the Prism emulator, be sure to use the latest version of Prism, and to check the box
|
||||
to "Disable floating point optimization" in the Emulation settings. (Right-click on the executable to open "Properties", then on the "Compatibility" tab click on
|
||||
"Change emulation settings").
|
||||
|
||||
A fully functional native OpenBLAS for WoA that can be built as both a static and dynamic library using LLVM toolchain and Visual Studio 2022. Before starting to build, make sure that you have installed Visual Studio 2022 on your ARM device, including the "Desktop Development with C++" component (that contains the cmake tool).
|
||||
(Note that you can use the free "Visual Studio 2022 Community Edition" for this task. In principle it would be possible to build with VisualStudio alone, but using
|
||||
the LLVM toolchain enables native compilation of the Fortran sources of LAPACK and of all the optimized assembly files, which VisualStudio cannot handle on its own)
|
||||
@@ -706,20 +710,19 @@ message about a missing declaration or missing header file complex.h)
|
||||
|
||||
### iPhone/iOS
|
||||
|
||||
As none of the current developers uses iOS, the following instructions are what
|
||||
As few of the current developers use iOS, the following instructions are what
|
||||
was found to work in our Azure CI setup, but as far as we know this builds a
|
||||
fully working OpenBLAS for this platform.
|
||||
|
||||
Go to the directory where you unpacked OpenBLAS,and enter the following commands:
|
||||
```bash
|
||||
CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
|
||||
|
||||
CC="$(xcrun --sdk iphoneos --find clang)"
|
||||
SDKROOT="$(xcrun --sdk iphoneos --show-sdk-path)"
|
||||
CFLAGS="-O2 -Wno-macro-redefined -isysroot $SDKROOT -arch arm64 -miphoneos-version-min=10.0"
|
||||
|
||||
make TARGET=ARMV8 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
|
||||
make TARGET=ARMV8 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 \
|
||||
CC="${CC}" CFLAGS="-O2 -Wno-macro-redefined -isysroot ${SDKROOT} -arch arm64 -miphoneos-version-min=10.0"
|
||||
```
|
||||
Adjust `MIN_IOS_VERSION` as necessary for your installation. E.g., change the version number
|
||||
Adjust `-miphoneos-version-min` as necessary for your installation. E.g., change the version number
|
||||
to the minimum iOS version you want to target and execute this file to build the library.
|
||||
|
||||
### HarmonyOS
|
||||
|
||||
+12
-4
@@ -59,13 +59,21 @@
|
||||
#define GEMM_Q 128
|
||||
#endif
|
||||
|
||||
#ifdef GEMM_DIVIDE_RATE
|
||||
#ifdef DYNAMIC_ARCH
|
||||
#define DIVIDE_LIMIT gotoblas->divide_limit
|
||||
#define DIVIDE_RATE gotoblas->divide_rate
|
||||
#else
|
||||
#define DIVIDE_LIMIT GEMM_DIVIDE_LIMIT
|
||||
#define DIVIDE_RATE GEMM_DIVIDE_RATE
|
||||
#endif
|
||||
|
||||
#ifdef GEMM_DIVIDE_LIMIT
|
||||
#define DIVIDE_LIMIT GEMM_DIVIDE_LIMIT
|
||||
#endif
|
||||
//#ifdef GEMM_DIVIDE_RATE
|
||||
//#define DIVIDE_RATE GEMM_DIVIDE_RATE
|
||||
//#endif
|
||||
|
||||
//#ifdef GEMM_DIVIDE_LIMIT
|
||||
//#define DIVIDE_LIMIT GEMM_DIVIDE_LIMIT
|
||||
//#endif
|
||||
|
||||
#ifdef THREADED_LEVEL3
|
||||
#include "level3_thread.c"
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#define CACHE_LINE_SIZE 8
|
||||
#endif
|
||||
|
||||
#define DIVIDE_RATE_MAX 2
|
||||
#ifndef DIVIDE_RATE
|
||||
#define DIVIDE_RATE 2
|
||||
#endif
|
||||
@@ -93,7 +94,7 @@ typedef struct {
|
||||
#else
|
||||
volatile
|
||||
#endif
|
||||
BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE];
|
||||
BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE_MAX];
|
||||
} job_t;
|
||||
|
||||
|
||||
@@ -294,7 +295,7 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
|
||||
FLOAT *a, *b, *c;
|
||||
job_t *job = (job_t *)args -> common;
|
||||
BLASLONG xxx, bufferside;
|
||||
FLOAT *buffer[DIVIDE_RATE];
|
||||
FLOAT *buffer[DIVIDE_RATE_MAX];
|
||||
|
||||
BLASLONG ls, min_l, jjs, min_jj;
|
||||
BLASLONG is, min_i, div_n;
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
#define CACHE_LINE_SIZE 8
|
||||
#endif
|
||||
|
||||
#define DIVIDE_RATE_MAX 2
|
||||
|
||||
#ifndef DIVIDE_RATE
|
||||
#define DIVIDE_RATE 2
|
||||
#endif
|
||||
@@ -69,7 +71,7 @@ _Atomic
|
||||
#else
|
||||
volatile
|
||||
#endif
|
||||
BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE];
|
||||
BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE_MAX];
|
||||
} job_t;
|
||||
|
||||
|
||||
@@ -133,7 +135,7 @@ _Atomic
|
||||
|
||||
static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa, FLOAT *sb, BLASLONG mypos){
|
||||
|
||||
FLOAT *buffer[DIVIDE_RATE];
|
||||
FLOAT *buffer[DIVIDE_RATE_MAX];
|
||||
|
||||
BLASLONG k, lda, ldc;
|
||||
BLASLONG m_from, m_to, n_from, n_to;
|
||||
|
||||
@@ -41,12 +41,18 @@
|
||||
#define CACHE_LINE_SIZE 8
|
||||
#endif
|
||||
|
||||
#define DIVIDE_RATE_MAX 2
|
||||
|
||||
#ifndef DIVIDE_RATE
|
||||
#define DIVIDE_RATE 2
|
||||
#endif
|
||||
|
||||
#ifndef GEMM_PREFERED_SIZE
|
||||
#define GEMM_PREFERED_SIZE 1
|
||||
#ifdef DYNAMIC_ARCH
|
||||
#undef GEMM_PREFERRED_SIZE
|
||||
#define GEMM_PREFERRED_SIZE gotoblas->preferred_size
|
||||
#endif
|
||||
#ifndef GEMM_PREFERRED_SIZE
|
||||
#define GEMM_PREFERRED_SIZE 1
|
||||
#endif
|
||||
|
||||
//The array of job_t may overflow the stack.
|
||||
@@ -93,7 +99,7 @@
|
||||
|
||||
typedef struct {
|
||||
volatile
|
||||
BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE];
|
||||
BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE_MAX];
|
||||
} job_t;
|
||||
|
||||
|
||||
@@ -234,7 +240,7 @@ typedef struct {
|
||||
|
||||
static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, IFLOAT *sa, IFLOAT *sb, BLASLONG mypos){
|
||||
|
||||
IFLOAT *buffer[DIVIDE_RATE];
|
||||
IFLOAT *buffer[DIVIDE_RATE_MAX];
|
||||
|
||||
BLASLONG k, lda, ldb, ldc;
|
||||
BLASLONG m_from, m_to, n_from, n_to;
|
||||
@@ -707,7 +713,7 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
|
||||
while (m > 0){
|
||||
width = blas_quickdivide(m + nthreads_m - num_parts - 1, nthreads_m - num_parts);
|
||||
|
||||
width = round_up(m, width, GEMM_PREFERED_SIZE);
|
||||
width = round_up(m, width, GEMM_PREFERRED_SIZE);
|
||||
|
||||
m -= width;
|
||||
|
||||
@@ -758,7 +764,7 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
|
||||
if (width < switch_ratio) {
|
||||
width = switch_ratio;
|
||||
}
|
||||
width = round_up(width_n, width, GEMM_PREFERED_SIZE);
|
||||
width = round_up(width_n, width, GEMM_PREFERRED_SIZE);
|
||||
|
||||
width_n -= width;
|
||||
if (width_n < 0) {
|
||||
|
||||
@@ -127,10 +127,10 @@ endif
|
||||
xerbla.$(SUFFIX) : xerbla.c
|
||||
$(CC) $(CFLAGS) -c $< -o $(@F)
|
||||
|
||||
dynamic.$(SUFFIX) : dynamic.c
|
||||
dynamic%$(SUFFIX) : dynamic%c
|
||||
$(CC) $(CFLAGS) -c $< -o $(@F)
|
||||
|
||||
dynamic.$(PSUFFIX) : dynamic.c
|
||||
dynamic%$(PSUFFIX) : dynamic%c
|
||||
$(CC) $(PFLAGS) -c $< -o $(@F)
|
||||
|
||||
parameter.$(SUFFIX) : parameter.c ../../param.h
|
||||
|
||||
@@ -951,9 +951,15 @@ static gotoblas_t *get_coretype(void){
|
||||
else
|
||||
return &gotoblas_DUNNINGTON;
|
||||
default:
|
||||
if (support_avx2())
|
||||
return &gotoblas_ZEN;
|
||||
else
|
||||
return &gotoblas_NEHALEM;
|
||||
}
|
||||
default:
|
||||
if (support_avx2())
|
||||
return &gotoblas_ZEN;
|
||||
else
|
||||
return &gotoblas_NEHALEM;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*********************************************************************/
|
||||
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
||||
/* Copyright 2023-2024 The OpenBLAS Project */
|
||||
/* Copyright 2023-2024, 2026 The OpenBLAS Project */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
@@ -38,7 +38,13 @@
|
||||
/*********************************************************************/
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <strings.h>
|
||||
#else
|
||||
#define strncasecmp _strnicmp
|
||||
#endif
|
||||
|
||||
#if (defined OS_LINUX || defined OS_ANDROID)
|
||||
#include <asm/hwcap.h>
|
||||
#include <sys/auxv.h>
|
||||
@@ -129,10 +135,16 @@ extern gotoblas_t gotoblas_ARMV9SME;
|
||||
#else
|
||||
#define gotoblas_ARMV9SME gotoblas_ARMV8
|
||||
#endif
|
||||
#ifdef DYN_VORTEX
|
||||
extern gotoblas_t gotoblas_VORTEX;
|
||||
#elif defined(DYN_NEOVERSEN1)
|
||||
#define gotoblas_VORTEX gotoblas_NEOVERSEN1
|
||||
#else
|
||||
#define gotoblas_VORTEX gotoblas_ARMV8
|
||||
#endif
|
||||
#ifdef DYN_VORTEXM4
|
||||
extern gotoblas_t gotoblas_VORTEXM4;
|
||||
#else
|
||||
#error "dont have vortexm4"
|
||||
#define gotoblas_VORTEXM4 gotoblas_ARMV8
|
||||
#endif
|
||||
#ifdef DYN_CORTEXA55
|
||||
@@ -145,18 +157,39 @@ extern gotoblas_t gotoblas_A64FX;
|
||||
#else
|
||||
#define gotoblas_A64FX gotoblas_ARMV8
|
||||
#endif
|
||||
|
||||
#else //not a user-specified dynamic_list
|
||||
|
||||
#ifdef OS_DARWIN
|
||||
#define gotoblas_CORTEXA53 gotoblas_ARMV8
|
||||
#else
|
||||
extern gotoblas_t gotoblas_CORTEXA53;
|
||||
#endif
|
||||
#define gotoblas_CORTEXA55 gotoblas_CORTEXA53
|
||||
#ifdef OS_DARWIN
|
||||
#define gotoblas_CORTEXA57 gotoblas_ARMV8
|
||||
#else
|
||||
extern gotoblas_t gotoblas_CORTEXA57;
|
||||
#endif
|
||||
#define gotoblas_CORTEXA72 gotoblas_CORTEXA57
|
||||
#define gotoblas_CORTEXA73 gotoblas_CORTEXA57
|
||||
#define gotoblas_FALKOR gotoblas_CORTEXA57
|
||||
#ifdef OS_DARWIN
|
||||
#define gotoblas_THUNDERX gotoblas_ARMV8
|
||||
#define gotoblas_THUNDERX2T99 gotoblas_ARMV8
|
||||
#define gotoblas_THUNDERX3T110 gotoblas_ARMV8
|
||||
#define gotoblas_TSV110 gotoblas_ARMV8
|
||||
#define gotoblas_EMAG8180 gotoblas_ARMV8
|
||||
#else
|
||||
extern gotoblas_t gotoblas_THUNDERX;
|
||||
extern gotoblas_t gotoblas_THUNDERX2T99;
|
||||
extern gotoblas_t gotoblas_THUNDERX3T110;
|
||||
extern gotoblas_t gotoblas_TSV110;
|
||||
extern gotoblas_t gotoblas_EMAG8180;
|
||||
#endif
|
||||
extern gotoblas_t gotoblas_NEOVERSEN1;
|
||||
#define gotoblas_VORTEX gotoblas_NEOVERSEN1
|
||||
#ifndef OS_DARWIN
|
||||
#ifndef NO_SVE
|
||||
extern gotoblas_t gotoblas_NEOVERSEV1;
|
||||
extern gotoblas_t gotoblas_NEOVERSEN2;
|
||||
@@ -168,6 +201,12 @@ extern gotoblas_t gotoblas_A64FX;
|
||||
#define gotoblas_ARMV8SVE gotoblas_ARMV8
|
||||
#define gotoblas_A64FX gotoblas_ARMV8
|
||||
#endif
|
||||
#else
|
||||
#define gotoblas_NEOVERSEV1 gotoblas_ARMV8
|
||||
#define gotoblas_NEOVERSEN2 gotoblas_ARMV8
|
||||
#define gotoblas_ARMV8SVE gotoblas_ARMV8
|
||||
#define gotoblas_A64FX gotoblas_ARMV8
|
||||
#endif
|
||||
#ifndef NO_SME
|
||||
extern gotoblas_t gotoblas_ARMV9SME;
|
||||
#if defined (__clang__) && defined(OS_DARWIN)
|
||||
@@ -184,7 +223,6 @@ extern gotoblas_t gotoblas_VORTEXM4;
|
||||
#define gotoblas_VORTEXM4 gotoblas_NEOVERSEN1
|
||||
#endif
|
||||
|
||||
extern gotoblas_t gotoblas_THUNDERX3T110;
|
||||
#endif
|
||||
#define gotoblas_NEOVERSEV2 gotoblas_NEOVERSEN2
|
||||
|
||||
@@ -192,7 +230,7 @@ extern void openblas_warning(int verbose, const char * msg);
|
||||
#define FALLBACK_VERBOSE 1
|
||||
#define NEOVERSEN1_FALLBACK "OpenBLAS : Your OS does not support SVE instructions. OpenBLAS is using Neoverse N1 kernels as a fallback, which may give poorer performance.\n"
|
||||
|
||||
#define NUM_CORETYPES 20
|
||||
#define NUM_CORETYPES 21
|
||||
|
||||
/*
|
||||
* In case asm/hwcap.h is outdated on the build system, make sure
|
||||
@@ -232,6 +270,7 @@ static char *corename[] = {
|
||||
"armv8sve",
|
||||
"a64fx",
|
||||
"armv9sme",
|
||||
"vortex",
|
||||
"vortexm4",
|
||||
"unknown"
|
||||
};
|
||||
@@ -256,7 +295,8 @@ char *gotoblas_corename(void) {
|
||||
if (gotoblas == &gotoblas_ARMV8SVE) return corename[16];
|
||||
if (gotoblas == &gotoblas_A64FX) return corename[17];
|
||||
if (gotoblas == &gotoblas_ARMV9SME) return corename[18];
|
||||
if (gotoblas == &gotoblas_VORTEXM4) return corename[19];
|
||||
if (gotoblas == &gotoblas_VORTEX) return corename[19];
|
||||
if (gotoblas == &gotoblas_VORTEXM4) return corename[20];
|
||||
return corename[NUM_CORETYPES];
|
||||
}
|
||||
|
||||
@@ -295,7 +335,8 @@ static gotoblas_t *force_coretype(char *coretype) {
|
||||
case 16: return (&gotoblas_ARMV8SVE);
|
||||
case 17: return (&gotoblas_A64FX);
|
||||
case 18: return (&gotoblas_ARMV9SME);
|
||||
case 19: return (&gotoblas_VORTEXM4);
|
||||
case 19: return (&gotoblas_VORTEX);
|
||||
case 20: return (&gotoblas_VORTEXM4);
|
||||
}
|
||||
snprintf(message, 128, "Core not found: %s\n", coretype);
|
||||
openblas_warning(1, message);
|
||||
@@ -312,7 +353,7 @@ static gotoblas_t *get_coretype(void) {
|
||||
return &gotoblas_VORTEXM4;
|
||||
}
|
||||
#endif
|
||||
return &gotoblas_NEOVERSEN1;
|
||||
return &gotoblas_VORTEX;
|
||||
#endif
|
||||
|
||||
#if (!defined OS_LINUX && !defined OS_ANDROID)
|
||||
@@ -397,6 +438,8 @@ static gotoblas_t *get_coretype(void) {
|
||||
case 0xd08: // Cortex A72
|
||||
return &gotoblas_CORTEXA72;
|
||||
case 0xd09: // Cortex A73
|
||||
case 0xd0a: // Cortex A75
|
||||
case 0xd0b: // Cortex A76
|
||||
return &gotoblas_CORTEXA73;
|
||||
case 0xd0c: // Neoverse N1
|
||||
return &gotoblas_NEOVERSEN1;
|
||||
@@ -413,7 +456,11 @@ static gotoblas_t *get_coretype(void) {
|
||||
return &gotoblas_NEOVERSEN1;
|
||||
}else
|
||||
return &gotoblas_NEOVERSEV1;
|
||||
case 0xd4f:
|
||||
case 0xd4f: // Neoverse V2
|
||||
case 0xd83: // Neoverse V3AE
|
||||
case 0xd84: // Neoverse V3
|
||||
case 0xd85: // Cortex X925
|
||||
case 0xd87: // Cortex A725
|
||||
if (!(getauxval(AT_HWCAP) & HWCAP_SVE)) {
|
||||
openblas_warning(FALLBACK_VERBOSE, NEOVERSEN1_FALLBACK);
|
||||
return &gotoblas_NEOVERSEN1;
|
||||
@@ -483,7 +530,7 @@ static gotoblas_t *get_coretype(void) {
|
||||
break;
|
||||
case 0x61: // Apple
|
||||
if (support_sme1()) return &gotoblas_VORTEXM4;
|
||||
return &gotoblas_NEOVERSEN1;
|
||||
return &gotoblas_VORTEX;
|
||||
break;
|
||||
default:
|
||||
snprintf(coremsg, 128, "Unknown CPU model - implementer %x part %x\n",implementer,part);
|
||||
|
||||
@@ -152,6 +152,7 @@ char* gotoblas_corename(void) {
|
||||
static gotoblas_t* get_coretype(void) {
|
||||
uint64_t vector_mask;
|
||||
unsigned vlenb = 0;
|
||||
char coremsg[128];
|
||||
|
||||
#if !defined(OS_LINUX)
|
||||
return NULL;
|
||||
|
||||
@@ -72,6 +72,12 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#if (MAX_CPU_NUMBER > 256)
|
||||
#ifndef BIGNUMA
|
||||
#define BIGNUMA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(OS_LINUX) && defined(SMP)
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
+15
-2
@@ -1317,7 +1317,11 @@ UNLOCK_COMMAND(&alloc_lock);
|
||||
error:
|
||||
printf("OpenBLAS : Program will terminate because you tried to allocate too many TLS memory regions.\n");
|
||||
printf("This library was built to support a maximum of %d threads - either rebuild OpenBLAS\n", NUM_BUFFERS);
|
||||
printf("with a larger NUM_THREADS value or set the environment variable OPENBLAS_NUM_THREADS to\n");
|
||||
#ifdef USE_OPENMP
|
||||
printf("with a larger NUM_THREADS value or set the environment variable OMP_NUM_THREADS to\n");
|
||||
#else
|
||||
printf("with a larger NUM_THREADS value or set the environment variable OPENBLAS_NUM_THREADS to\n");
|
||||
#endif
|
||||
printf("a sufficiently small number. This error typically occurs when the software that relies on\n");
|
||||
printf("OpenBLAS calls BLAS functions from many threads in parallel, or when your computer has more\n");
|
||||
printf("cpu cores than what OpenBLAS was configured to handle.\n");
|
||||
@@ -3039,8 +3043,13 @@ void *blas_memory_alloc(int procpos){
|
||||
#endif
|
||||
if (memory_overflowed) goto terminate;
|
||||
fprintf(stderr,"OpenBLAS warning: precompiled NUM_THREADS exceeded, adding auxiliary array for thread metadata.\n");
|
||||
fprintf(stderr,"Note that your application may still crash, if it is calling OpenBLAS from multiple threads in parallel\n");
|
||||
fprintf(stderr,"To avoid this warning, please rebuild your copy of OpenBLAS with a larger NUM_THREADS setting\n");
|
||||
#ifdef USE_OPENMP
|
||||
fprintf(stderr,"or set the environment variable OMP_NUM_THREADS to %d or lower\n", MAX_CPU_NUMBER);
|
||||
#else
|
||||
fprintf(stderr,"or set the environment variable OPENBLAS_NUM_THREADS to %d or lower\n", MAX_CPU_NUMBER);
|
||||
#endif
|
||||
memory_overflowed=1;
|
||||
MB;
|
||||
new_release_info = (struct release_t*) malloc(NEW_BUFFERS * sizeof(struct release_t));
|
||||
@@ -3142,7 +3151,11 @@ terminate:
|
||||
#endif
|
||||
printf("OpenBLAS : Program is Terminated. Because you tried to allocate too many memory regions.\n");
|
||||
printf("This library was built to support a maximum of %d threads - either rebuild OpenBLAS\n", NUM_BUFFERS);
|
||||
printf("with a larger NUM_THREADS value or set the environment variable OPENBLAS_NUM_THREADS to\n");
|
||||
#ifdef USE_OPENMP
|
||||
printf("with a larger NUM_THREADS value or set the environment variable OMP_NUM_THREADS to\n");
|
||||
#else
|
||||
printf("with a larger NUM_THREADS value or set the environment variable OPENBLAS_NUM_THREADS to\n");
|
||||
#endif
|
||||
printf("a sufficiently small number. This error typically occurs when the software that relies on\n");
|
||||
printf("OpenBLAS calls BLAS functions from many threads in parallel, or when your computer has more\n");
|
||||
printf("cpu cores than what OpenBLAS was configured to handle.\n");
|
||||
|
||||
@@ -80,9 +80,9 @@ int openblas_get_parallel(void);
|
||||
|
||||
char* CNAME(void) {
|
||||
char tmpstr[20];
|
||||
strcpy(tmp_config_str, openblas_config_str);
|
||||
strncpy(tmp_config_str, openblas_config_str, 255-40);
|
||||
#ifdef DYNAMIC_ARCH
|
||||
strcat(tmp_config_str, gotoblas_corename());
|
||||
strncat(tmp_config_str, gotoblas_corename(),20);
|
||||
#endif
|
||||
if (openblas_get_parallel() == 0)
|
||||
sprintf(tmpstr, " SINGLE_THREADED");
|
||||
|
||||
@@ -343,13 +343,13 @@ linker_a=""
|
||||
|
||||
if [ -n "$link" ]; then
|
||||
|
||||
link=`echo "$link" | sed 's/\-Y[[:space:]]P\,/\-Y/g'`
|
||||
link=`echo " $link" | sed 's/ \-Y[[:space:]]P\,/ \-Y/g'`
|
||||
|
||||
link=`echo "$link" | sed 's/\-R[[:space:]]*/\-rpath\%/g'`
|
||||
link=`echo "$link" | sed 's/ \-R[[:space:]]*/ \-rpath\%/g'`
|
||||
|
||||
link=`echo "$link" | sed 's/\-rpath[[:space:]]+/\-rpath\%/g'`
|
||||
link=`echo "$link" | sed 's/ \-rpath[[:space:]]+/ \-rpath\%/g'`
|
||||
|
||||
link=`echo "$link" | sed 's/\-rpath-link[[:space:]]+/\-rpath-link\%/g'`
|
||||
link=`echo "$link" | sed 's/ \-rpath-link[[:space:]]+/ \-rpath-link\%/g'`
|
||||
|
||||
flags=`echo "$link" | tr "',\n" " "`
|
||||
# remove leading and trailing quotes from each flag.
|
||||
|
||||
@@ -1232,6 +1232,20 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#else
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_WASM128_GENERIC
|
||||
#define FORCE
|
||||
#define ARCHITECTURE "WASM"
|
||||
#define SUBARCHITECTURE "WASM128_GENERIC"
|
||||
#define SUBDIRNAME "wasm"
|
||||
#define ARCHCONFIG "-DWASM128_GENERIC " \
|
||||
"-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
|
||||
"-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
|
||||
"-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
|
||||
#define LIBNAME "wasm128"
|
||||
#define CORENAME "WASM128_GENERIC"
|
||||
#else
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_CORTEXA15
|
||||
#define FORCE
|
||||
#define ARCHITECTURE "ARM"
|
||||
@@ -1949,6 +1963,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define OPENBLAS_SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifdef __wasm__
|
||||
#define OPENBLAS_SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifndef OPENBLAS_SUPPORTED
|
||||
#error "This arch/CPU is not supported by OpenBLAS."
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -530,8 +530,8 @@ ifneq ($(NO_LAPACK), 1)
|
||||
SBLASOBJS += $(SLAPACKOBJS)
|
||||
DBLASOBJS += $(DLAPACKOBJS)
|
||||
#QBLASOBJS += $(QLAPACKOBJS)
|
||||
CBLASOBJS += $(CLAPACKOBJS)
|
||||
ZBLASOBJS += $(ZLAPACKOBJS)
|
||||
CBLASOBJS += $(CLAPACKOBJS) slaed3.$(SUFFIX)
|
||||
ZBLASOBJS += $(ZLAPACKOBJS) dlaed3.$(SUFFIX)
|
||||
#XBLASOBJS += $(XLAPACKOBJS)
|
||||
|
||||
endif
|
||||
|
||||
+2
-2
@@ -562,12 +562,12 @@ if (strcmp(gotoblas_corename(), "armv9sme") == 0
|
||||
)
|
||||
// if (support_sme1())
|
||||
#endif
|
||||
if (order == CblasRowMajor && m==lda && n ==ldb && k==ldc && beta == 0 && alpha == 1.0 && TransA == CblasNoTrans && TransB == CblasNoTrans&& SGEMM_DIRECT_PERFORMANT(m,n,k)) {
|
||||
if (order == CblasRowMajor && k==lda && n==ldb && n==ldc && beta == 0 && alpha == 1.0 && TransA == CblasNoTrans && TransB == CblasNoTrans && SGEMM_DIRECT_PERFORMANT(m,n,k)) {
|
||||
SGEMM_DIRECT(m, n, k, a, lda, b, ldb, c, ldc);
|
||||
return;
|
||||
}
|
||||
else
|
||||
if (order == CblasRowMajor && m==lda && n==ldb && k==ldc && TransA == CblasNoTrans && TransB == CblasNoTrans&& SGEMM_DIRECT_PERFORMANT(m,n,k)) {
|
||||
if (order == CblasRowMajor && k==lda && n==ldb && n==ldc && TransA == CblasNoTrans && TransB == CblasNoTrans && SGEMM_DIRECT_PERFORMANT(m,n,k)) {
|
||||
SGEMM_DIRECT_ALPHA_BETA(m, n, k, alpha, a, lda, b, ldb, beta, c, ldc);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ int NAME(blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, blasint *ipiv,
|
||||
|
||||
*Info = 0;
|
||||
|
||||
if (args.m == 0 || args.n == 0) return 0;
|
||||
if (args.m == 0) return 0;
|
||||
|
||||
IDEBUG_START;
|
||||
|
||||
@@ -117,20 +117,20 @@ int NAME(blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, blasint *ipiv,
|
||||
|
||||
#if defined(_WIN64) && defined(_M_ARM64)
|
||||
#ifdef COMPLEX
|
||||
if (args.m * args.n <= 300)
|
||||
if (args.m * args.m <= 300)
|
||||
#else
|
||||
if (args.m * args.n <= 500)
|
||||
if (args.m * args.m <= 500)
|
||||
#endif
|
||||
args.nthreads = 1;
|
||||
else if (args.m * args.n <= 1000)
|
||||
else if (args.m * args.m <= 1000)
|
||||
args.nthreads = 4;
|
||||
else
|
||||
args.nthreads = num_cpu_avail(4);
|
||||
#else
|
||||
#ifndef DOUBLE
|
||||
if (args.m * args.n < 40000)
|
||||
if (args.m * args.m < 40000)
|
||||
#else
|
||||
if (args.m * args.n < 10000)
|
||||
if (args.m * args.m < 10000)
|
||||
#endif
|
||||
args.nthreads = 1;
|
||||
else
|
||||
@@ -143,7 +143,7 @@ int NAME(blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, blasint *ipiv,
|
||||
args.n = *N;
|
||||
info = GETRF_SINGLE(&args, NULL, NULL, sa, sb, 0);
|
||||
|
||||
if (info == 0){
|
||||
if (info == 0 && *NRHS >0){
|
||||
args.n = *NRHS;
|
||||
GETRS_N_SINGLE(&args, NULL, NULL, sa, sb, 0);
|
||||
}
|
||||
@@ -154,7 +154,7 @@ int NAME(blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, blasint *ipiv,
|
||||
args.n = *N;
|
||||
info = GETRF_PARALLEL(&args, NULL, NULL, sa, sb, 0);
|
||||
|
||||
if (info == 0){
|
||||
if (info == 0 && *NRHS > 0){
|
||||
args.n = *NRHS;
|
||||
GETRS_N_PARALLEL(&args, NULL, NULL, sa, sb, 0);
|
||||
}
|
||||
|
||||
+1
-3
@@ -374,6 +374,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo,
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.m == 0 || args.n == 0) return;
|
||||
#if !defined(COMPLEX) && !defined(DOUBLE) && !defined(BFLOAT16) && !defined(HFLOAT16)
|
||||
#if defined(ARCH_ARM64) && (defined(USE_SSYMM_KERNEL_DIRECT)||defined(DYNAMIC_ARCH))
|
||||
#if defined(DYNAMIC_ARCH)
|
||||
@@ -383,7 +384,6 @@ if (strcmp(gotoblas_corename(), "armv9sme") == 0
|
||||
#endif
|
||||
)
|
||||
#endif
|
||||
if (args.m == 0 || args.n == 0) return;
|
||||
if (order == CblasRowMajor && m == lda && n == ldb && n == ldc)
|
||||
{
|
||||
if (Side == CblasLeft && Uplo == CblasUpper) {
|
||||
@@ -398,8 +398,6 @@ if (strcmp(gotoblas_corename(), "armv9sme") == 0
|
||||
|
||||
#endif
|
||||
|
||||
if (args.m == 0 || args.n == 0) return;
|
||||
|
||||
IDEBUG_START;
|
||||
|
||||
FUNCTION_PROFILE_START();
|
||||
|
||||
+2
-3
@@ -359,6 +359,8 @@ void CNAME(enum CBLAS_ORDER order,
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.m == 0 || args.n == 0) return;
|
||||
|
||||
#if !defined(COMPLEX) && !defined(DOUBLE) && !defined(BFLOAT16) && !defined(HFLOAT16)
|
||||
#if defined(ARCH_ARM64) && (defined(USE_STRMM_KERNEL_DIRECT)||defined(DYNAMIC_ARCH))
|
||||
#if defined(DYNAMIC_ARCH)
|
||||
@@ -368,7 +370,6 @@ if (strcmp(gotoblas_corename(), "armv9sme") == 0
|
||||
#endif
|
||||
)
|
||||
#endif
|
||||
if (args.m == 0 || args.n == 0) return;
|
||||
if (order == CblasRowMajor && Diag == CblasNonUnit && Side == CblasLeft && m == lda && n == ldb) {
|
||||
if (Trans == CblasNoTrans) {
|
||||
(Uplo == CblasUpper ? STRMM_DIRECT_LNUN : STRMM_DIRECT_LNLN)(m, n, alpha, a, lda, b, ldb);
|
||||
@@ -382,8 +383,6 @@ if (strcmp(gotoblas_corename(), "armv9sme") == 0
|
||||
|
||||
#endif
|
||||
|
||||
if ((args.m == 0) || (args.n == 0)) return;
|
||||
|
||||
IDEBUG_START;
|
||||
|
||||
FUNCTION_PROFILE_START();
|
||||
|
||||
@@ -48,7 +48,7 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS)
|
||||
endif ()
|
||||
|
||||
if (${ADD_COMMONOBJS})
|
||||
if (X86)
|
||||
if (X86 AND NOT EMSCRIPTEN)
|
||||
if (NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||
GenerateNamedObjects("${KERNELDIR}/cpuid.S" "" "" false "" "" true)
|
||||
else()
|
||||
@@ -235,7 +235,7 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS)
|
||||
# Makefile.L3
|
||||
set(USE_TRMM false)
|
||||
string(TOUPPER ${TARGET_CORE} UC_TARGET_CORE)
|
||||
if (ARM OR ARM64 OR RISCV64 OR (UC_TARGET_CORE MATCHES LONGSOON3B) OR (UC_TARGET_CORE MATCHES GENERIC) OR (UC_TARGET_CORE MATCHES HASWELL) OR (UC_TARGET_CORE MATCHES ZEN) OR (UC_TARGET_CORE MATCHES SKYLAKEX) OR (UC_TARGET_CORE MATCHES COOPERLAKE) OR (UC_TARGET_CORE MATCHES SAPPHIRERAPIDS))
|
||||
if (ARM OR ARM64 OR RISCV64 OR WASM OR (UC_TARGET_CORE MATCHES LONGSOON3B) OR (UC_TARGET_CORE MATCHES GENERIC) OR (UC_TARGET_CORE MATCHES HASWELL) OR (UC_TARGET_CORE MATCHES ZEN) OR (UC_TARGET_CORE MATCHES SKYLAKEX) OR (UC_TARGET_CORE MATCHES COOPERLAKE) OR (UC_TARGET_CORE MATCHES SAPPHIRERAPIDS))
|
||||
set(USE_TRMM true)
|
||||
endif ()
|
||||
if (ZARCH OR (UC_TARGET_CORE MATCHES POWER8) OR (UC_TARGET_CORE MATCHES POWER9) OR (UC_TARGET_CORE MATCHES POWER10))
|
||||
|
||||
@@ -70,6 +70,10 @@ ifeq ($(ARCH), riscv64)
|
||||
USE_TRMM = 1
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), wasm)
|
||||
USE_TRMM = 1
|
||||
endif
|
||||
|
||||
ifneq ($(DYNAMIC_ARCH), 1)
|
||||
ifeq ($(TARGET), GENERIC)
|
||||
USE_TRMM = 1
|
||||
|
||||
@@ -8,7 +8,7 @@ ZNRM2KERNEL = nrm2_vfpv3.S
|
||||
SGEMVNKERNEL = gemv_n_vfpv3.S
|
||||
DGEMVNKERNEL = gemv_n_vfpv3.S
|
||||
|
||||
SGEMMKERNEL = sgemm_kernel_4x4_vfpv3.S
|
||||
SGEMMKERNEL = sgemm_kernel_4x4_vfpv3_neon.S
|
||||
SGEMMONCOPY = sgemm_ncopy_4_vfp.S
|
||||
SGEMMOTCOPY = sgemm_tcopy_4_vfp.S
|
||||
SGEMMONCOPYOBJ = sgemm_oncopy.o
|
||||
|
||||
+6
-3
@@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
Copyright (c) 2013, The OpenBLAS Project
|
||||
Copyright (c) 2013-2026, The OpenBLAS Project
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
@@ -50,8 +50,11 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
|
||||
|
||||
while(i < n)
|
||||
{
|
||||
|
||||
dot += y[iy] * x[ix] ;
|
||||
#if defined(DSDOT)
|
||||
dot += (double)y[iy] * (double)x[ix] ;
|
||||
#else
|
||||
dot += y[iy] * x[ix];
|
||||
#endif
|
||||
ix += inc_x ;
|
||||
iy += inc_y ;
|
||||
i++ ;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -42,7 +42,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
|
||||
n *= inc_x;
|
||||
if (inc_x == 1)
|
||||
{
|
||||
#if V_SIMD && (!defined(DOUBLE) || (defined(DOUBLE) && V_SIMD_F64 && V_SIMD > 128))
|
||||
#if V_SIMD && (!defined(DOUBLE) || (defined(DOUBLE) && V_SIMD_F64 && (V_SIMD > 128 || defined(ARCH_WASM))))
|
||||
#ifdef DOUBLE
|
||||
const int vstep = v_nlanes_f64;
|
||||
const int unrollx4 = n & (-vstep * 4);
|
||||
|
||||
@@ -191,25 +191,48 @@ ZGEMMOTCOPYOBJ = zgemm_otcopy$(TSUFFIX).$(SUFFIX)
|
||||
ifeq ($(BUILD_BFLOAT16), 1)
|
||||
BGEMM_BETA = bgemm_beta_neon.c
|
||||
BGEMMKERNEL = sbgemm_kernel_$(BGEMM_UNROLL_M)x$(BGEMM_UNROLL_N)_neoversen2.c
|
||||
ifneq ($(BGEMM_UNROLL_M), $(BGEMM_UNROLL_N))
|
||||
BGEMMINCOPY = sbgemm_ncopy_$(BGEMM_UNROLL_M)_neoversen2.c
|
||||
BGEMMITCOPY = sbgemm_tcopy_$(BGEMM_UNROLL_M)_neoversen2.c
|
||||
BGEMMONCOPY = sbgemm_ncopy_$(BGEMM_UNROLL_N)_neoversen2.c
|
||||
BGEMMOTCOPY = sbgemm_tcopy_$(BGEMM_UNROLL_N)_neoversen2.c
|
||||
BGEMMINCOPYOBJ = bgemm_incopy$(TSUFFIX).$(SUFFIX)
|
||||
BGEMMITCOPYOBJ = bgemm_itcopy$(TSUFFIX).$(SUFFIX)
|
||||
endif
|
||||
BGEMMONCOPY = sbgemm_ncopy_$(BGEMM_UNROLL_N)_neoversen2.c
|
||||
BGEMMOTCOPY = sbgemm_tcopy_$(BGEMM_UNROLL_N)_neoversen2.c
|
||||
BGEMMONCOPYOBJ = bgemm_oncopy$(TSUFFIX).$(SUFFIX)
|
||||
BGEMMOTCOPYOBJ = bgemm_otcopy$(TSUFFIX).$(SUFFIX)
|
||||
BGEMVTKERNEL = sbgemv_t_bfdot.c
|
||||
BGEMVNKERNEL = bgemv_n_sve_v3x4.c
|
||||
|
||||
ifeq ($(BUILD_HFLOAT16), 1)
|
||||
SHGEMMKERNEL = shgemm_kernel_$(SHGEMM_UNROLL_M)x$(SHGEMM_UNROLL_N)_neoversen2.c
|
||||
SHGEMMINCOPY = shgemm_ncopy_$(SHGEMM_UNROLL_M)_neoversen2.c
|
||||
SHGEMMITCOPY = shgemm_tcopy_$(SHGEMM_UNROLL_M)_neoversen2.c
|
||||
ifneq ($(SHGEMM_UNROLL_M), $(SHGEMM_UNROLL_N))
|
||||
SHGEMMINCOPY = ../generic/gemm_ncopy_$(SHGEMM_UNROLL_M).c
|
||||
SHGEMMITCOPY = ../generic/gemm_tcopy_$(SHGEMM_UNROLL_M).c
|
||||
endif
|
||||
SHGEMMONCOPY = shgemm_ncopy_$(SHGEMM_UNROLL_N)_neoversen2.c
|
||||
SHGEMMOTCOPY = shgemm_tcopy_$(SHGEMM_UNROLL_N)_neoversen2.c
|
||||
SHGEMMINCOPYOBJ = shgemm_incopy$(TSUFFIX).$(SUFFIX)
|
||||
SHGEMMITCOPYOBJ = shgemm_itcopy$(TSUFFIX).$(SUFFIX)
|
||||
SHGEMMONCOPYOBJ = shgemm_oncopy$(TSUFFIX).$(SUFFIX)
|
||||
SHGEMMOTCOPYOBJ = shgemm_otcopy$(TSUFFIX).$(SUFFIX)
|
||||
ifndef SHGEMM_BETA
|
||||
SHGEMM_BETA = sbgemm_beta_neoversen2.c
|
||||
endif
|
||||
endif
|
||||
|
||||
SBGEMM_BETA = sbgemm_beta_neoversen2.c
|
||||
SBGEMMKERNEL = sbgemm_kernel_$(SBGEMM_UNROLL_M)x$(SBGEMM_UNROLL_N)_neoversen2.c
|
||||
ifneq ($(SBGEMM_UNROLL_M), $(SBGEMM_UNROLL_N))
|
||||
SBGEMMINCOPY = sbgemm_ncopy_$(SBGEMM_UNROLL_M)_neoversen2.c
|
||||
SBGEMMITCOPY = sbgemm_tcopy_$(SBGEMM_UNROLL_M)_neoversen2.c
|
||||
SBGEMMONCOPY = sbgemm_ncopy_$(SBGEMM_UNROLL_N)_neoversen2.c
|
||||
SBGEMMOTCOPY = sbgemm_tcopy_$(SBGEMM_UNROLL_N)_neoversen2.c
|
||||
SBGEMMINCOPYOBJ = sbgemm_incopy$(TSUFFIX).$(SUFFIX)
|
||||
SBGEMMITCOPYOBJ = sbgemm_itcopy$(TSUFFIX).$(SUFFIX)
|
||||
endif
|
||||
SBGEMMONCOPY = sbgemm_ncopy_$(SBGEMM_UNROLL_N)_neoversen2.c
|
||||
SBGEMMOTCOPY = sbgemm_tcopy_$(SBGEMM_UNROLL_N)_neoversen2.c
|
||||
SBGEMMONCOPYOBJ = sbgemm_oncopy$(TSUFFIX).$(SUFFIX)
|
||||
SBGEMMOTCOPYOBJ = sbgemm_otcopy$(TSUFFIX).$(SUFFIX)
|
||||
SBGEMVTKERNEL = sbgemv_t_bfdot.c
|
||||
|
||||
@@ -262,7 +262,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
static RETURN_TYPE dot_kernel_asimd(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
|
||||
{
|
||||
RETURN_TYPE dot = 0.0;
|
||||
#ifndef DOUBLE
|
||||
volatile
|
||||
#endif
|
||||
RETURN_TYPE dot = 0.0;
|
||||
BLASLONG j = 0;
|
||||
|
||||
__asm__ __volatile__ (
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2026 The OpenBLAS Project
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name of the OpenBLAS project nor the names of
|
||||
* its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* *****************************************************************************/
|
||||
|
||||
#include <arm_sve.h>
|
||||
#include <arm_neon.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#define ALPHA_ONE
|
||||
#include "sbgemm_kernel_8x8_neoversen2_impl.c"
|
||||
#undef ALPHA_ONE
|
||||
#undef UPDATE_C
|
||||
#include "sbgemm_kernel_8x8_neoversen2_impl.c"
|
||||
|
||||
int CNAME(BLASLONG m, BLASLONG n, BLASLONG k, FLOAT alpha, IFLOAT *A, IFLOAT *B,
|
||||
FLOAT *C, BLASLONG ldc) {
|
||||
#ifdef BGEMM
|
||||
bfloat16_t alpha_bf16;
|
||||
memcpy(&alpha_bf16, &alpha, sizeof(bfloat16_t));
|
||||
float alpha_f32 = vcvtah_f32_bf16(alpha_bf16);
|
||||
#else
|
||||
float alpha_f32 = alpha;
|
||||
#endif
|
||||
|
||||
if (alpha_f32 == 1.0f)
|
||||
return gemm_kernel_neoversen2_alpha_one(m, n, k, alpha, A, B, C, ldc);
|
||||
else
|
||||
return gemm_kernel_neoversen2_alpha(m, n, k, alpha, A, B, C, ldc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,763 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2022,2026 The OpenBLAS Project
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name of the OpenBLAS project nor the names of
|
||||
* its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* *****************************************************************************/
|
||||
|
||||
#include <arm_sve.h>
|
||||
#include <arm_neon.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#define INIT_C(M, N) mc##M##N = svdup_f32(0);
|
||||
|
||||
#define MATMUL(M, N) mc##M##N = svbfmmla(mc##M##N, ma##M, mb##N);
|
||||
|
||||
#define INIT_C_8x4 \
|
||||
do { \
|
||||
INIT_C(0, 0); \
|
||||
INIT_C(0, 1); \
|
||||
INIT_C(1, 0); \
|
||||
INIT_C(1, 1); \
|
||||
INIT_C(2, 0); \
|
||||
INIT_C(2, 1); \
|
||||
INIT_C(3, 0); \
|
||||
INIT_C(3, 1); \
|
||||
} while (0);
|
||||
|
||||
#define INIT_C_8x8 \
|
||||
do { \
|
||||
INIT_C(0, 0); \
|
||||
INIT_C(0, 1); \
|
||||
INIT_C(0, 2); \
|
||||
INIT_C(0, 3); \
|
||||
INIT_C(1, 0); \
|
||||
INIT_C(1, 1); \
|
||||
INIT_C(1, 2); \
|
||||
INIT_C(1, 3); \
|
||||
INIT_C(2, 0); \
|
||||
INIT_C(2, 1); \
|
||||
INIT_C(2, 2); \
|
||||
INIT_C(2, 3); \
|
||||
INIT_C(3, 0); \
|
||||
INIT_C(3, 1); \
|
||||
INIT_C(3, 2); \
|
||||
INIT_C(3, 3); \
|
||||
} while (0);
|
||||
|
||||
#ifdef BGEMM
|
||||
#ifdef ALPHA_ONE
|
||||
#define UPDATE_C(PG16, PG32, PTR, SRC) \
|
||||
do { \
|
||||
tmp16 = svld1_bf16((PG16), (PTR)); \
|
||||
tmp32 = svreinterpret_f32(svzip1_bf16(zeros, tmp16)); \
|
||||
tmp32 = svadd_z((PG32), SRC, tmp32); \
|
||||
tmp16 = svcvt_bf16_f32_z((PG32), tmp32); \
|
||||
tmp16 = svuzp1_bf16(tmp16, tmp16); \
|
||||
svst1_bf16((PG16), (PTR), tmp16); \
|
||||
} while (0)
|
||||
#else
|
||||
#define UPDATE_C(PG16, PG32, PTR, SRC) \
|
||||
do { \
|
||||
tmp16 = svld1_bf16((PG16), (PTR)); \
|
||||
tmp32 = svreinterpret_f32(svzip1_bf16(zeros, tmp16)); \
|
||||
tmp32 = svmad_z((PG32), svalpha, SRC, tmp32); \
|
||||
tmp16 = svcvt_bf16_f32_z((PG32), tmp32); \
|
||||
tmp16 = svuzp1_bf16(tmp16, tmp16); \
|
||||
svst1_bf16((PG16), (PTR), tmp16); \
|
||||
} while (0)
|
||||
#endif
|
||||
#else
|
||||
#ifdef ALPHA_ONE
|
||||
#define UPDATE_C(PG16, PG32, PTR, SRC) \
|
||||
do { \
|
||||
tmp32 = svld1_f32((PG32), (PTR)); \
|
||||
tmp32 = svadd_z((PG32), SRC, tmp32); \
|
||||
svst1_f32((PG32), (PTR), tmp32); \
|
||||
} while (0);
|
||||
#else
|
||||
#define UPDATE_C(PG16, PG32, PTR, SRC) \
|
||||
do { \
|
||||
tmp32 = svld1_f32((PG32), (PTR)); \
|
||||
tmp32 = svmad_z((PG32), svalpha, SRC, tmp32); \
|
||||
svst1_f32((PG32), (PTR), tmp32); \
|
||||
} while (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BGEMM
|
||||
#define OUTPUT_FLOAT bfloat16_t
|
||||
#else
|
||||
#define OUTPUT_FLOAT float
|
||||
#endif
|
||||
|
||||
#ifdef ALPHA_ONE
|
||||
static int gemm_kernel_neoversen2_alpha_one(BLASLONG m, BLASLONG n, BLASLONG k, FLOAT alpha, IFLOAT * A, IFLOAT * B, FLOAT * C, BLASLONG ldc)
|
||||
#else
|
||||
static int gemm_kernel_neoversen2_alpha(BLASLONG m, BLASLONG n, BLASLONG k, FLOAT alpha, IFLOAT * A, IFLOAT * B, FLOAT * C, BLASLONG ldc)
|
||||
#endif
|
||||
{
|
||||
BLASLONG pad_k = (k + 3) & ~3;
|
||||
|
||||
svbfloat16_t ma0, ma1, ma2, ma3, mb0, mb1, mb2, mb3;
|
||||
svfloat32_t mc00, mc01, mc02, mc03;
|
||||
svfloat32_t mc10, mc11, mc12, mc13;
|
||||
svfloat32_t mc20, mc21, mc22, mc23;
|
||||
svfloat32_t mc30, mc31, mc32, mc33;
|
||||
svfloat32_t vc0, vc1, vc2, vc3, vc4, vc5, vc6, vc7;
|
||||
svfloat32_t vc8, vc9, vc10, vc11, vc12, vc13, vc14, vc15;
|
||||
|
||||
#ifndef ALPHA_ONE
|
||||
#ifdef BGEMM
|
||||
bfloat16_t alpha_bf16;
|
||||
memcpy(&alpha_bf16, &alpha, sizeof(bfloat16_t));
|
||||
svfloat32_t svalpha = svdup_f32(vcvtah_f32_bf16(alpha_bf16));
|
||||
#else
|
||||
svfloat32_t svalpha = svdup_f32(alpha);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
svbool_t pg32_first_4 = svdupq_b32(1, 1, 1, 1);
|
||||
svbool_t pg32_first_2 = svdupq_b32(1, 1, 0, 0);
|
||||
svbool_t pg32_first_1 = svdupq_b32(1, 0, 0, 0);
|
||||
svbool_t pg16_first_8 = svdupq_b16(1, 1, 1, 1, 1, 1, 1, 1);
|
||||
svbool_t pg16_first_4 = svdupq_b16(1, 1, 1, 1, 0, 0, 0, 0);
|
||||
#ifdef BGEMM
|
||||
svbool_t pg16_first_2 = svdupq_b16(1, 1, 0, 0, 0, 0, 0, 0);
|
||||
svbool_t pg16_first_1 = svdupq_b16(1, 0, 0, 0, 0, 0, 0, 0);
|
||||
svbfloat16_t zeros = svdup_n_bf16(vcvth_bf16_f32(0.0));
|
||||
#endif
|
||||
|
||||
bfloat16_t *ptr_a = (bfloat16_t *)A;
|
||||
bfloat16_t *ptr_b = (bfloat16_t *)B;
|
||||
OUTPUT_FLOAT *ptr_c = (OUTPUT_FLOAT*)C;
|
||||
|
||||
bfloat16_t *ptr_a0;
|
||||
bfloat16_t *ptr_b0;
|
||||
OUTPUT_FLOAT *ptr_c0, *ptr_c1, *ptr_c2, *ptr_c3;
|
||||
OUTPUT_FLOAT *ptr_c4, *ptr_c5, *ptr_c6, *ptr_c7;
|
||||
|
||||
svfloat32_t tmp32;
|
||||
#ifdef BGEMM
|
||||
svbfloat16_t tmp16;
|
||||
#endif
|
||||
|
||||
for (BLASLONG j = 0; j < n / 8; j++) {
|
||||
ptr_c0 = ptr_c;
|
||||
ptr_c1 = ptr_c0 + ldc;
|
||||
ptr_c2 = ptr_c1 + ldc;
|
||||
ptr_c3 = ptr_c2 + ldc;
|
||||
ptr_c4 = ptr_c3 + ldc;
|
||||
ptr_c5 = ptr_c4 + ldc;
|
||||
ptr_c6 = ptr_c5 + ldc;
|
||||
ptr_c7 = ptr_c6 + ldc;
|
||||
ptr_c += 8 * ldc;
|
||||
ptr_a = (bfloat16_t *)A;
|
||||
|
||||
for (BLASLONG i = 0; i < m / 8; i++) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_a += 8 * pad_k;
|
||||
|
||||
ptr_b0 = ptr_b;
|
||||
|
||||
INIT_C_8x8;
|
||||
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_8, ptr_a0);
|
||||
ma1 = svld1_bf16(pg16_first_8, ptr_a0 + 8);
|
||||
ma2 = svld1_bf16(pg16_first_8, ptr_a0 + 16);
|
||||
ma3 = svld1_bf16(pg16_first_8, ptr_a0 + 24);
|
||||
|
||||
mb0 = svld1_bf16(pg16_first_8, ptr_b0);
|
||||
mb1 = svld1_bf16(pg16_first_8, ptr_b0 + 8);
|
||||
mb2 = svld1_bf16(pg16_first_8, ptr_b0 + 16);
|
||||
mb3 = svld1_bf16(pg16_first_8, ptr_b0 + 24);
|
||||
|
||||
MATMUL(0, 0); MATMUL(0, 1); MATMUL(0, 2); MATMUL(0, 3);
|
||||
MATMUL(1, 0); MATMUL(1, 1); MATMUL(1, 2); MATMUL(1, 3);
|
||||
MATMUL(2, 0); MATMUL(2, 1); MATMUL(2, 2); MATMUL(2, 3);
|
||||
MATMUL(3, 0); MATMUL(3, 1); MATMUL(3, 2); MATMUL(3, 3);
|
||||
|
||||
ptr_a0 += 32;
|
||||
ptr_b0 += 32;
|
||||
}
|
||||
|
||||
vc0 = svuzp1(mc00, mc10);
|
||||
vc1 = svuzp1(mc20, mc30);
|
||||
vc2 = svuzp2(mc00, mc10);
|
||||
vc3 = svuzp2(mc20, mc30);
|
||||
vc4 = svuzp1(mc01, mc11);
|
||||
vc5 = svuzp1(mc21, mc31);
|
||||
vc6 = svuzp2(mc01, mc11);
|
||||
vc7 = svuzp2(mc21, mc31);
|
||||
vc8 = svuzp1(mc02, mc12);
|
||||
vc9 = svuzp1(mc22, mc32);
|
||||
vc10 = svuzp2(mc02, mc12);
|
||||
vc11 = svuzp2(mc22, mc32);
|
||||
vc12 = svuzp1(mc03, mc13);
|
||||
vc13 = svuzp1(mc23, mc33);
|
||||
vc14 = svuzp2(mc03, mc13);
|
||||
vc15 = svuzp2(mc23, mc33);
|
||||
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c0, vc0);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c0 + 4, vc1);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c1, vc2);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c1 + 4, vc3);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c2, vc4);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c2 + 4, vc5);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c3, vc6);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c3 + 4, vc7);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c4, vc8);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c4 + 4, vc9);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c5, vc10);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c5 + 4, vc11);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c6, vc12);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c6 + 4, vc13);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c7, vc14);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c7 + 4, vc15);
|
||||
|
||||
ptr_c0 += 8;
|
||||
ptr_c1 += 8;
|
||||
ptr_c2 += 8;
|
||||
ptr_c3 += 8;
|
||||
ptr_c4 += 8;
|
||||
ptr_c5 += 8;
|
||||
ptr_c6 += 8;
|
||||
ptr_c7 += 8;
|
||||
}
|
||||
|
||||
if (m & 4) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_a += 4 * pad_k;
|
||||
ptr_b0 = ptr_b;
|
||||
|
||||
INIT_C(0, 0); INIT_C(0, 1); INIT_C(0, 2); INIT_C(0, 3);
|
||||
INIT_C(1, 0); INIT_C(1, 1); INIT_C(1, 2); INIT_C(1, 3);
|
||||
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_8, ptr_a0);
|
||||
ma1 = svld1_bf16(pg16_first_8, ptr_a0 + 8);
|
||||
mb0 = svld1_bf16(pg16_first_8, ptr_b0);
|
||||
mb1 = svld1_bf16(pg16_first_8, ptr_b0 + 8);
|
||||
mb2 = svld1_bf16(pg16_first_8, ptr_b0 + 16);
|
||||
mb3 = svld1_bf16(pg16_first_8, ptr_b0 + 24);
|
||||
|
||||
MATMUL(0, 0); MATMUL(0, 1); MATMUL(0, 2); MATMUL(0, 3);
|
||||
MATMUL(1, 0); MATMUL(1, 1); MATMUL(1, 2); MATMUL(1, 3);
|
||||
|
||||
ptr_a0 += 16;
|
||||
ptr_b0 += 32;
|
||||
}
|
||||
|
||||
vc0 = svuzp1(mc00, mc10);
|
||||
vc1 = svuzp2(mc00, mc10);
|
||||
vc2 = svuzp1(mc01, mc11);
|
||||
vc3 = svuzp2(mc01, mc11);
|
||||
vc4 = svuzp1(mc02, mc12);
|
||||
vc5 = svuzp2(mc02, mc12);
|
||||
vc6 = svuzp1(mc03, mc13);
|
||||
vc7 = svuzp2(mc03, mc13);
|
||||
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c0, vc0);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c1, vc1);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c2, vc2);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c3, vc3);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c4, vc4);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c5, vc5);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c6, vc6);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c7, vc7);
|
||||
|
||||
ptr_c0 += 4;
|
||||
ptr_c1 += 4;
|
||||
ptr_c2 += 4;
|
||||
ptr_c3 += 4;
|
||||
ptr_c4 += 4;
|
||||
ptr_c5 += 4;
|
||||
ptr_c6 += 4;
|
||||
ptr_c7 += 4;
|
||||
}
|
||||
|
||||
if (m & 2) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_a += 2 * pad_k;
|
||||
ptr_b0 = ptr_b;
|
||||
|
||||
INIT_C(0, 0); INIT_C(0, 1); INIT_C(0, 2); INIT_C(0, 3);
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_8, ptr_a0);
|
||||
mb0 = svld1_bf16(pg16_first_8, ptr_b0);
|
||||
mb1 = svld1_bf16(pg16_first_8, ptr_b0 + 8);
|
||||
mb2 = svld1_bf16(pg16_first_8, ptr_b0 + 16);
|
||||
mb3 = svld1_bf16(pg16_first_8, ptr_b0 + 24);
|
||||
|
||||
MATMUL(0, 0); MATMUL(0, 1); MATMUL(0, 2); MATMUL(0, 3);
|
||||
|
||||
ptr_a0 += 8;
|
||||
ptr_b0 += 32;
|
||||
}
|
||||
|
||||
vc0 = svuzp1(mc00, mc00);
|
||||
vc1 = svuzp2(mc00, mc00);
|
||||
vc2 = svuzp1(mc01, mc01);
|
||||
vc3 = svuzp2(mc01, mc01);
|
||||
vc4 = svuzp1(mc02, mc02);
|
||||
vc5 = svuzp2(mc02, mc02);
|
||||
vc6 = svuzp1(mc03, mc03);
|
||||
vc7 = svuzp2(mc03, mc03);
|
||||
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c0, vc0);
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c1, vc1);
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c2, vc2);
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c3, vc3);
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c4, vc4);
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c5, vc5);
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c6, vc6);
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c7, vc7);
|
||||
|
||||
ptr_c0 += 2;
|
||||
ptr_c1 += 2;
|
||||
ptr_c2 += 2;
|
||||
ptr_c3 += 2;
|
||||
ptr_c4 += 2;
|
||||
ptr_c5 += 2;
|
||||
ptr_c6 += 2;
|
||||
ptr_c7 += 2;
|
||||
}
|
||||
|
||||
if (m & 1) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_b0 = ptr_b;
|
||||
|
||||
INIT_C(0, 0); INIT_C(0, 1); INIT_C(0, 2); INIT_C(0, 3);
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_4, ptr_a0);
|
||||
mb0 = svld1_bf16(pg16_first_8, ptr_b0);
|
||||
mb1 = svld1_bf16(pg16_first_8, ptr_b0 + 8);
|
||||
mb2 = svld1_bf16(pg16_first_8, ptr_b0 + 16);
|
||||
mb3 = svld1_bf16(pg16_first_8, ptr_b0 + 24);
|
||||
|
||||
MATMUL(0, 0); MATMUL(0, 1); MATMUL(0, 2); MATMUL(0, 3);
|
||||
|
||||
ptr_a0 += 4;
|
||||
ptr_b0 += 32;
|
||||
}
|
||||
|
||||
vc1 = svuzp2(mc00, mc00);
|
||||
vc3 = svuzp2(mc01, mc01);
|
||||
vc5 = svuzp2(mc02, mc02);
|
||||
vc7 = svuzp2(mc03, mc03);
|
||||
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c0, mc00);
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c1, vc1);
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c2, mc01);
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c3, vc3);
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c4, mc02);
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c5, vc5);
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c6, mc03);
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c7, vc7);
|
||||
}
|
||||
|
||||
ptr_b += 8 * pad_k;
|
||||
}
|
||||
|
||||
if (n & 4) {
|
||||
ptr_c0 = ptr_c;
|
||||
ptr_c1 = ptr_c0 + ldc;
|
||||
ptr_c2 = ptr_c1 + ldc;
|
||||
ptr_c3 = ptr_c2 + ldc;
|
||||
ptr_c += 4 * ldc;
|
||||
ptr_a = (bfloat16_t *)A;
|
||||
|
||||
for (BLASLONG i = 0; i < m / 8; i++) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_a += 8 * pad_k;
|
||||
|
||||
ptr_b0 = ptr_b;
|
||||
|
||||
INIT_C_8x4;
|
||||
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_8, ptr_a0);
|
||||
ma1 = svld1_bf16(pg16_first_8, ptr_a0 + 8);
|
||||
ma2 = svld1_bf16(pg16_first_8, ptr_a0 + 16);
|
||||
ma3 = svld1_bf16(pg16_first_8, ptr_a0 + 24);
|
||||
|
||||
mb0 = svld1_bf16(pg16_first_8, ptr_b0);
|
||||
mb1 = svld1_bf16(pg16_first_8, ptr_b0 + 8);
|
||||
|
||||
MATMUL(0, 0); MATMUL(0, 1);
|
||||
MATMUL(1, 0); MATMUL(1, 1);
|
||||
MATMUL(2, 0); MATMUL(2, 1);
|
||||
MATMUL(3, 0); MATMUL(3, 1);
|
||||
|
||||
ptr_a0 += 32;
|
||||
ptr_b0 += 16;
|
||||
}
|
||||
|
||||
vc0 = svuzp1(mc00, mc10);
|
||||
vc1 = svuzp1(mc20, mc30);
|
||||
vc2 = svuzp2(mc00, mc10);
|
||||
vc3 = svuzp2(mc20, mc30);
|
||||
vc4 = svuzp1(mc01, mc11);
|
||||
vc5 = svuzp1(mc21, mc31);
|
||||
vc6 = svuzp2(mc01, mc11);
|
||||
vc7 = svuzp2(mc21, mc31);
|
||||
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c0, vc0);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c0+4, vc1);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c1, vc2);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c1+4, vc3);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c2, vc4);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c2+4, vc5);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c3, vc6);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c3+4, vc7);
|
||||
|
||||
ptr_c0 += 8;
|
||||
ptr_c1 += 8;
|
||||
ptr_c2 += 8;
|
||||
ptr_c3 += 8;
|
||||
}
|
||||
|
||||
if (m & 4) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_a += 4 * pad_k;
|
||||
ptr_b0 = ptr_b;
|
||||
|
||||
INIT_C(0, 0); INIT_C(0, 1);
|
||||
INIT_C(1, 0); INIT_C(1, 1);
|
||||
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_8, ptr_a0);
|
||||
ma1 = svld1_bf16(pg16_first_8, ptr_a0 + 8);
|
||||
mb0 = svld1_bf16(pg16_first_8, ptr_b0);
|
||||
mb1 = svld1_bf16(pg16_first_8, ptr_b0 + 8);
|
||||
|
||||
MATMUL(0, 0); MATMUL(0, 1);
|
||||
MATMUL(1, 0); MATMUL(1, 1);
|
||||
|
||||
ptr_a0 += 16;
|
||||
ptr_b0 += 16;
|
||||
}
|
||||
|
||||
vc0 = svuzp1(mc00, mc10);
|
||||
vc1 = svuzp2(mc00, mc10);
|
||||
vc2 = svuzp1(mc01, mc11);
|
||||
vc3 = svuzp2(mc01, mc11);
|
||||
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c0, vc0);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c1, vc1);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c2, vc2);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c3, vc3);
|
||||
|
||||
ptr_c0 += 4;
|
||||
ptr_c1 += 4;
|
||||
ptr_c2 += 4;
|
||||
ptr_c3 += 4;
|
||||
}
|
||||
|
||||
if (m & 2) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_a += 2 * pad_k;
|
||||
ptr_b0 = ptr_b;
|
||||
|
||||
INIT_C(0, 0); INIT_C(0, 1);
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_8, ptr_a0);
|
||||
mb0 = svld1_bf16(pg16_first_8, ptr_b0);
|
||||
mb1 = svld1_bf16(pg16_first_8, ptr_b0 + 8);
|
||||
|
||||
MATMUL(0, 0); MATMUL(0, 1);
|
||||
|
||||
ptr_a0 += 8;
|
||||
ptr_b0 += 16;
|
||||
}
|
||||
|
||||
vc0 = svuzp1(mc00, mc00);
|
||||
vc1 = svuzp2(mc00, mc00);
|
||||
vc2 = svuzp1(mc01, mc01);
|
||||
vc3 = svuzp2(mc01, mc01);
|
||||
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c0, vc0);
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c1, vc1);
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c2, vc2);
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c3, vc3);
|
||||
|
||||
ptr_c0 += 2;
|
||||
ptr_c1 += 2;
|
||||
ptr_c2 += 2;
|
||||
ptr_c3 += 2;
|
||||
}
|
||||
|
||||
if (m & 1) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_b0 = ptr_b;
|
||||
|
||||
INIT_C(0, 0); INIT_C(0, 1);
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_4, ptr_a0);
|
||||
mb0 = svld1_bf16(pg16_first_8, ptr_b0);
|
||||
mb1 = svld1_bf16(pg16_first_8, ptr_b0 + 8);
|
||||
|
||||
MATMUL(0, 0); MATMUL(0, 1);
|
||||
|
||||
ptr_a0 += 4;
|
||||
ptr_b0 += 16;
|
||||
}
|
||||
|
||||
vc1 = svuzp2(mc00, mc00);
|
||||
vc3 = svuzp2(mc01, mc01);
|
||||
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c0, mc00);
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c1, vc1);
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c2, mc01);
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c3, vc3);
|
||||
|
||||
}
|
||||
|
||||
ptr_b += 4 * pad_k;
|
||||
}
|
||||
|
||||
if (n & 2) {
|
||||
ptr_c0 = ptr_c;
|
||||
ptr_c1 = ptr_c0 + ldc;
|
||||
ptr_c += 2 * ldc;
|
||||
ptr_a = (bfloat16_t *)A;
|
||||
|
||||
for (BLASLONG i = 0; i < m / 8; i++) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_a += 8 * pad_k;
|
||||
|
||||
ptr_b0 = ptr_b;
|
||||
|
||||
INIT_C(0, 0);
|
||||
INIT_C(1, 0);
|
||||
INIT_C(2, 0);
|
||||
INIT_C(3, 0);
|
||||
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_8, ptr_a0);
|
||||
ma1 = svld1_bf16(pg16_first_8, ptr_a0 + 8);
|
||||
ma2 = svld1_bf16(pg16_first_8, ptr_a0 + 16);
|
||||
ma3 = svld1_bf16(pg16_first_8, ptr_a0 + 24);
|
||||
|
||||
mb0 = svld1_bf16(pg16_first_8, ptr_b0);
|
||||
|
||||
MATMUL(0, 0);
|
||||
MATMUL(1, 0);
|
||||
MATMUL(2, 0);
|
||||
MATMUL(3, 0);
|
||||
|
||||
ptr_a0 += 32;
|
||||
ptr_b0 += 8;
|
||||
}
|
||||
|
||||
vc0 = svuzp1(mc00, mc10);
|
||||
vc1 = svuzp1(mc20, mc30);
|
||||
vc2 = svuzp2(mc00, mc10);
|
||||
vc3 = svuzp2(mc20, mc30);
|
||||
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c0, vc0);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c0 + 4, vc1);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c1, vc2);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c1 + 4, vc3);
|
||||
|
||||
ptr_c0 += 8;
|
||||
ptr_c1 += 8;
|
||||
}
|
||||
|
||||
if (m & 4) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_a += 4 * pad_k;
|
||||
ptr_b0 = ptr_b;
|
||||
|
||||
INIT_C(0, 0);
|
||||
INIT_C(1, 0);
|
||||
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_8, ptr_a0);
|
||||
ma1 = svld1_bf16(pg16_first_8, ptr_a0 + 8);
|
||||
mb0 = svld1_bf16(pg16_first_8, ptr_b0);
|
||||
MATMUL(0, 0);
|
||||
MATMUL(1, 0);
|
||||
ptr_a0 += 16;
|
||||
ptr_b0 += 8;
|
||||
}
|
||||
|
||||
vc0 = svuzp1(mc00, mc10);
|
||||
vc1 = svuzp2(mc00, mc10);
|
||||
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c0, vc0);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c1, vc1);
|
||||
|
||||
ptr_c0 += 4;
|
||||
ptr_c1 += 4;
|
||||
}
|
||||
|
||||
if (m & 2) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_a += 2 * pad_k;
|
||||
ptr_b0 = ptr_b;
|
||||
|
||||
INIT_C(0, 0);
|
||||
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_8, ptr_a0);
|
||||
mb0 = svld1_bf16(pg16_first_8, ptr_b0);
|
||||
|
||||
MATMUL(0, 0);
|
||||
|
||||
ptr_a0 += 8;
|
||||
ptr_b0 += 8;
|
||||
}
|
||||
|
||||
vc0 = svuzp1(mc00, mc00);
|
||||
vc1 = svuzp2(mc00, mc00);
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c0, vc0);
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c1, vc1);
|
||||
|
||||
ptr_c0 += 2;
|
||||
ptr_c1 += 2;
|
||||
|
||||
}
|
||||
|
||||
if (m & 1) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_b0 = ptr_b;
|
||||
INIT_C(0, 0);
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_4, ptr_a0);
|
||||
mb0 = svld1_bf16(pg16_first_8, ptr_b0);
|
||||
MATMUL(0, 0);
|
||||
ptr_a0 += 4;
|
||||
ptr_b0 += 8;
|
||||
}
|
||||
vc1 = svuzp2(mc00, mc00);
|
||||
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c0, mc00);
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c1, vc1);
|
||||
}
|
||||
|
||||
ptr_b += 2 * pad_k;
|
||||
}
|
||||
|
||||
if (n & 1) {
|
||||
ptr_c0 = ptr_c;
|
||||
ptr_a = (bfloat16_t *)A;
|
||||
|
||||
for (BLASLONG i = 0; i < m / 8; i++) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_a += 8 * pad_k;
|
||||
|
||||
ptr_b0 = ptr_b;
|
||||
|
||||
INIT_C(0, 0);
|
||||
INIT_C(1, 0);
|
||||
INIT_C(2, 0);
|
||||
INIT_C(3, 0);
|
||||
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_8, ptr_a0);
|
||||
ma1 = svld1_bf16(pg16_first_8, ptr_a0 + 8);
|
||||
ma2 = svld1_bf16(pg16_first_8, ptr_a0 + 16);
|
||||
ma3 = svld1_bf16(pg16_first_8, ptr_a0 + 24);
|
||||
|
||||
mb0 = svld1_bf16(pg16_first_4, ptr_b0);
|
||||
|
||||
MATMUL(0, 0);
|
||||
MATMUL(1, 0);
|
||||
MATMUL(2, 0);
|
||||
MATMUL(3, 0);
|
||||
|
||||
ptr_a0 += 32;
|
||||
ptr_b0 += 4;
|
||||
}
|
||||
|
||||
vc0 = svuzp1(mc00, mc10);
|
||||
vc1 = svuzp1(mc20, mc30);
|
||||
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c0, vc0);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c0 + 4, vc1);
|
||||
|
||||
ptr_c0 += 8;
|
||||
}
|
||||
|
||||
if (m & 4) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_a += 4 * pad_k;
|
||||
ptr_b0 = ptr_b;
|
||||
INIT_C(0, 0);
|
||||
INIT_C(1, 0);
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_8, ptr_a0);
|
||||
ma1 = svld1_bf16(pg16_first_8, ptr_a0 + 8);
|
||||
mb0 = svld1_bf16(pg16_first_4, ptr_b0);
|
||||
MATMUL(0, 0);
|
||||
MATMUL(1, 0);
|
||||
ptr_a0 += 16;
|
||||
ptr_b0 += 4;
|
||||
}
|
||||
vc0 = svuzp1(mc00, mc10);
|
||||
UPDATE_C(pg16_first_4, pg32_first_4, ptr_c0, vc0);
|
||||
ptr_c0 += 4;
|
||||
}
|
||||
|
||||
if (m & 2) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_a += 2 * pad_k;
|
||||
ptr_b0 = ptr_b;
|
||||
|
||||
INIT_C(0, 0);
|
||||
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_8, ptr_a0);
|
||||
mb0 = svld1_bf16(pg16_first_4, ptr_b0);
|
||||
|
||||
MATMUL(0, 0);
|
||||
|
||||
ptr_a0 += 8;
|
||||
ptr_b0 += 4;
|
||||
}
|
||||
vc0 = svuzp1(mc00, mc00);
|
||||
UPDATE_C(pg16_first_2, pg32_first_2, ptr_c0, vc0);
|
||||
ptr_c0 += 2;
|
||||
}
|
||||
|
||||
if (m & 1) {
|
||||
ptr_a0 = ptr_a;
|
||||
ptr_b0 = ptr_b;
|
||||
INIT_C(0, 0);
|
||||
for (BLASLONG p = 0; p < pad_k; p += 4) {
|
||||
ma0 = svld1_bf16(pg16_first_4, ptr_a0);
|
||||
mb0 = svld1_bf16(pg16_first_4, ptr_b0);
|
||||
MATMUL(0, 0);
|
||||
ptr_a0 += 4;
|
||||
ptr_b0 += 4;
|
||||
}
|
||||
UPDATE_C(pg16_first_1, pg32_first_1, ptr_c0, mc00);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,887 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2026 The OpenBLAS Project
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name of the OpenBLAS project nor the names of
|
||||
* its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* *****************************************************************************/
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
static inline void kernel_8x8(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, BLASLONG ldc, FLOAT alpha) {
|
||||
float32x4_t c0_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c0_high = vdupq_n_f32(0.0f);
|
||||
float32x4_t c1_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c1_high = vdupq_n_f32(0.0f);
|
||||
float32x4_t c2_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c2_high = vdupq_n_f32(0.0f);
|
||||
float32x4_t c3_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c3_high = vdupq_n_f32(0.0f);
|
||||
float32x4_t c4_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c4_high = vdupq_n_f32(0.0f);
|
||||
float32x4_t c5_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c5_high = vdupq_n_f32(0.0f);
|
||||
float32x4_t c6_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c6_high = vdupq_n_f32(0.0f);
|
||||
float32x4_t c7_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c7_high = vdupq_n_f32(0.0f);
|
||||
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
float16x8_t a_f16 = vld1q_f16(A);
|
||||
float32x4_t a_low = vcvt_f32_f16(vget_low_f16(a_f16));
|
||||
float32x4_t a_high = vcvt_f32_f16(vget_high_f16(a_f16));
|
||||
|
||||
float16x8_t b_f16 = vld1q_f16(B);
|
||||
float32x4_t b_low = vcvt_f32_f16(vget_low_f16(b_f16));
|
||||
float32x4_t b_high = vcvt_f32_f16(vget_high_f16(b_f16));
|
||||
|
||||
float32_t b0_lane0 = vgetq_lane_f32(b_low, 0);
|
||||
c0_low = vfmaq_n_f32(c0_low, a_low, b0_lane0);
|
||||
c0_high = vfmaq_n_f32(c0_high, a_high, b0_lane0);
|
||||
|
||||
float32_t b0_lane1 = vgetq_lane_f32(b_low, 1);
|
||||
c1_low = vfmaq_n_f32(c1_low, a_low, b0_lane1);
|
||||
c1_high = vfmaq_n_f32(c1_high, a_high, b0_lane1);
|
||||
|
||||
float32_t b0_lane2 = vgetq_lane_f32(b_low, 2);
|
||||
c2_low = vfmaq_n_f32(c2_low, a_low, b0_lane2);
|
||||
c2_high = vfmaq_n_f32(c2_high, a_high, b0_lane2);
|
||||
|
||||
float32_t b0_lane3 = vgetq_lane_f32(b_low, 3);
|
||||
c3_low = vfmaq_n_f32(c3_low, a_low, b0_lane3);
|
||||
c3_high = vfmaq_n_f32(c3_high, a_high, b0_lane3);
|
||||
|
||||
float32_t b1_lane0 = vgetq_lane_f32(b_high, 0);
|
||||
c4_low = vfmaq_n_f32(c4_low, a_low, b1_lane0);
|
||||
c4_high = vfmaq_n_f32(c4_high, a_high, b1_lane0);
|
||||
|
||||
float32_t b1_lane1 = vgetq_lane_f32(b_high, 1);
|
||||
c5_low = vfmaq_n_f32(c5_low, a_low, b1_lane1);
|
||||
c5_high = vfmaq_n_f32(c5_high, a_high, b1_lane1);
|
||||
|
||||
float32_t b1_lane2 = vgetq_lane_f32(b_high, 2);
|
||||
c6_low = vfmaq_n_f32(c6_low, a_low, b1_lane2);
|
||||
c6_high = vfmaq_n_f32(c6_high, a_high, b1_lane2);
|
||||
|
||||
float32_t b1_lane3 = vgetq_lane_f32(b_high, 3);
|
||||
c7_low = vfmaq_n_f32(c7_low, a_low, b1_lane3);
|
||||
c7_high = vfmaq_n_f32(c7_high, a_high, b1_lane3);
|
||||
|
||||
A += 8;
|
||||
B += 8;
|
||||
}
|
||||
|
||||
FLOAT *col_0 = C + 0 * ldc;
|
||||
FLOAT *col_1 = C + 1 * ldc;
|
||||
FLOAT *col_2 = C + 2 * ldc;
|
||||
FLOAT *col_3 = C + 3 * ldc;
|
||||
FLOAT *col_4 = C + 4 * ldc;
|
||||
FLOAT *col_5 = C + 5 * ldc;
|
||||
FLOAT *col_6 = C + 6 * ldc;
|
||||
FLOAT *col_7 = C + 7 * ldc;
|
||||
|
||||
float32x4_t t0_l = vld1q_f32(col_0);
|
||||
float32x4_t t0_h = vld1q_f32(col_0 + 4);
|
||||
t0_l = vaddq_f32(t0_l, vmulq_n_f32(c0_low, alpha));
|
||||
t0_h = vaddq_f32(t0_h, vmulq_n_f32(c0_high, alpha));
|
||||
vst1q_f32(col_0, t0_l);
|
||||
vst1q_f32(col_0 + 4, t0_h);
|
||||
|
||||
float32x4_t t1_l = vld1q_f32(col_1);
|
||||
float32x4_t t1_h = vld1q_f32(col_1 + 4);
|
||||
t1_l = vaddq_f32(t1_l, vmulq_n_f32(c1_low, alpha));
|
||||
t1_h = vaddq_f32(t1_h, vmulq_n_f32(c1_high, alpha));
|
||||
vst1q_f32(col_1, t1_l);
|
||||
vst1q_f32(col_1 + 4, t1_h);
|
||||
|
||||
float32x4_t t2_l = vld1q_f32(col_2);
|
||||
float32x4_t t2_h = vld1q_f32(col_2 + 4);
|
||||
t2_l = vaddq_f32(t2_l, vmulq_n_f32(c2_low, alpha));
|
||||
t2_h = vaddq_f32(t2_h, vmulq_n_f32(c2_high, alpha));
|
||||
vst1q_f32(col_2, t2_l);
|
||||
vst1q_f32(col_2 + 4, t2_h);
|
||||
|
||||
float32x4_t t3_l = vld1q_f32(col_3);
|
||||
float32x4_t t3_h = vld1q_f32(col_3 + 4);
|
||||
t3_l = vaddq_f32(t3_l, vmulq_n_f32(c3_low, alpha));
|
||||
t3_h = vaddq_f32(t3_h, vmulq_n_f32(c3_high, alpha));
|
||||
vst1q_f32(col_3, t3_l);
|
||||
vst1q_f32(col_3 + 4, t3_h);
|
||||
|
||||
float32x4_t t4_l = vld1q_f32(col_4);
|
||||
float32x4_t t4_h = vld1q_f32(col_4 + 4);
|
||||
t4_l = vaddq_f32(t4_l, vmulq_n_f32(c4_low, alpha));
|
||||
t4_h = vaddq_f32(t4_h, vmulq_n_f32(c4_high, alpha));
|
||||
vst1q_f32(col_4, t4_l);
|
||||
vst1q_f32(col_4 + 4, t4_h);
|
||||
|
||||
float32x4_t t5_l = vld1q_f32(col_5);
|
||||
float32x4_t t5_h = vld1q_f32(col_5 + 4);
|
||||
t5_l = vaddq_f32(t5_l, vmulq_n_f32(c5_low, alpha));
|
||||
t5_h = vaddq_f32(t5_h, vmulq_n_f32(c5_high, alpha));
|
||||
vst1q_f32(col_5, t5_l);
|
||||
vst1q_f32(col_5 + 4, t5_h);
|
||||
|
||||
float32x4_t t6_l = vld1q_f32(col_6);
|
||||
float32x4_t t6_h = vld1q_f32(col_6 + 4);
|
||||
t6_l = vaddq_f32(t6_l, vmulq_n_f32(c6_low, alpha));
|
||||
t6_h = vaddq_f32(t6_h, vmulq_n_f32(c6_high, alpha));
|
||||
vst1q_f32(col_6, t6_l);
|
||||
vst1q_f32(col_6 + 4, t6_h);
|
||||
|
||||
float32x4_t t7_l = vld1q_f32(col_7);
|
||||
float32x4_t t7_h = vld1q_f32(col_7 + 4);
|
||||
t7_l = vaddq_f32(t7_l, vmulq_n_f32(c7_low, alpha));
|
||||
t7_h = vaddq_f32(t7_h, vmulq_n_f32(c7_high, alpha));
|
||||
vst1q_f32(col_7, t7_l);
|
||||
vst1q_f32(col_7 + 4, t7_h);
|
||||
}
|
||||
|
||||
static inline void kernel_4x8(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, BLASLONG ldc, FLOAT alpha) {
|
||||
float32x4_t c0 = vdupq_n_f32(0.0f);
|
||||
float32x4_t c1 = vdupq_n_f32(0.0f);
|
||||
float32x4_t c2 = vdupq_n_f32(0.0f);
|
||||
float32x4_t c3 = vdupq_n_f32(0.0f);
|
||||
float32x4_t c4 = vdupq_n_f32(0.0f);
|
||||
float32x4_t c5 = vdupq_n_f32(0.0f);
|
||||
float32x4_t c6 = vdupq_n_f32(0.0f);
|
||||
float32x4_t c7 = vdupq_n_f32(0.0f);
|
||||
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
float32x4_t a_f16 = vcvt_f32_f16(vld1_f16(A));
|
||||
|
||||
float16x8_t b_f16 = vld1q_f16(B);
|
||||
float32x4_t b_low = vcvt_f32_f16(vget_low_f16(b_f16));
|
||||
float32x4_t b_high = vcvt_f32_f16(vget_high_f16(b_f16));
|
||||
|
||||
float32_t b0_lane0 = vgetq_lane_f32(b_low, 0);
|
||||
c0 = vfmaq_n_f32(c0, a_f16, b0_lane0);
|
||||
|
||||
float32_t b0_lane1 = vgetq_lane_f32(b_low, 1);
|
||||
c1 = vfmaq_n_f32(c1, a_f16, b0_lane1);
|
||||
|
||||
float32_t b0_lane2 = vgetq_lane_f32(b_low, 2);
|
||||
c2 = vfmaq_n_f32(c2, a_f16, b0_lane2);
|
||||
|
||||
float32_t b0_lane3 = vgetq_lane_f32(b_low, 3);
|
||||
c3 = vfmaq_n_f32(c3, a_f16, b0_lane3);
|
||||
|
||||
float32_t b1_lane0 = vgetq_lane_f32(b_high, 0);
|
||||
c4 = vfmaq_n_f32(c4, a_f16, b1_lane0);
|
||||
|
||||
float32_t b1_lane1 = vgetq_lane_f32(b_high, 1);
|
||||
c5 = vfmaq_n_f32(c5, a_f16, b1_lane1);
|
||||
|
||||
float32_t b1_lane2 = vgetq_lane_f32(b_high, 2);
|
||||
c6 = vfmaq_n_f32(c6, a_f16, b1_lane2);
|
||||
|
||||
float32_t b1_lane3 = vgetq_lane_f32(b_high, 3);
|
||||
c7 = vfmaq_n_f32(c7, a_f16, b1_lane3);
|
||||
|
||||
A += 4;
|
||||
B += 8;
|
||||
}
|
||||
|
||||
FLOAT *col_0 = C + 0 * ldc;
|
||||
FLOAT *col_1 = C + 1 * ldc;
|
||||
FLOAT *col_2 = C + 2 * ldc;
|
||||
FLOAT *col_3 = C + 3 * ldc;
|
||||
FLOAT *col_4 = C + 4 * ldc;
|
||||
FLOAT *col_5 = C + 5 * ldc;
|
||||
FLOAT *col_6 = C + 6 * ldc;
|
||||
FLOAT *col_7 = C + 7 * ldc;
|
||||
|
||||
float32x4_t t0 = vld1q_f32(col_0);
|
||||
t0 = vaddq_f32(t0, vmulq_n_f32(c0, alpha));
|
||||
vst1q_f32(col_0, t0);
|
||||
|
||||
float32x4_t t1 = vld1q_f32(col_1);
|
||||
t1 = vaddq_f32(t1, vmulq_n_f32(c1, alpha));
|
||||
vst1q_f32(col_1, t1);
|
||||
|
||||
float32x4_t t2 = vld1q_f32(col_2);
|
||||
t2 = vaddq_f32(t2, vmulq_n_f32(c2, alpha));
|
||||
vst1q_f32(col_2, t2);
|
||||
|
||||
float32x4_t t3 = vld1q_f32(col_3);
|
||||
t3 = vaddq_f32(t3, vmulq_n_f32(c3, alpha));
|
||||
vst1q_f32(col_3, t3);
|
||||
|
||||
float32x4_t t4 = vld1q_f32(col_4);
|
||||
t4 = vaddq_f32(t4, vmulq_n_f32(c4, alpha));
|
||||
vst1q_f32(col_4, t4);
|
||||
|
||||
float32x4_t t5 = vld1q_f32(col_5);
|
||||
t5 = vaddq_f32(t5, vmulq_n_f32(c5, alpha));
|
||||
vst1q_f32(col_5, t5);
|
||||
|
||||
float32x4_t t6 = vld1q_f32(col_6);
|
||||
t6 = vaddq_f32(t6, vmulq_n_f32(c6, alpha));
|
||||
vst1q_f32(col_6, t6);
|
||||
|
||||
float32x4_t t7 = vld1q_f32(col_7);
|
||||
t7 = vaddq_f32(t7, vmulq_n_f32(c7, alpha));
|
||||
vst1q_f32(col_7, t7);
|
||||
}
|
||||
|
||||
static inline void kernel_2x8(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, BLASLONG ldc, FLOAT alpha) {
|
||||
float32x2_t c0 = vdup_n_f32(0.0f);
|
||||
float32x2_t c1 = vdup_n_f32(0.0f);
|
||||
float32x2_t c2 = vdup_n_f32(0.0f);
|
||||
float32x2_t c3 = vdup_n_f32(0.0f);
|
||||
float32x2_t c4 = vdup_n_f32(0.0f);
|
||||
float32x2_t c5 = vdup_n_f32(0.0f);
|
||||
float32x2_t c6 = vdup_n_f32(0.0f);
|
||||
float32x2_t c7 = vdup_n_f32(0.0f);
|
||||
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
float32x4_t a_f32 = vcvt_f32_f16(vld1_f16(A));
|
||||
float32x2_t a_low = vget_low_f32(a_f32);
|
||||
|
||||
float16x8_t b_f16 = vld1q_f16(B);
|
||||
float32x4_t b_low = vcvt_f32_f16(vget_low_f16(b_f16));
|
||||
float32x4_t b_high = vcvt_f32_f16(vget_high_f16(b_f16));
|
||||
|
||||
float32_t b0_lane0 = vgetq_lane_f32(b_low, 0);
|
||||
c0 = vfma_n_f32(c0, a_low, b0_lane0);
|
||||
|
||||
float32_t b0_lane1 = vgetq_lane_f32(b_low, 1);
|
||||
c1 = vfma_n_f32(c1, a_low, b0_lane1);
|
||||
|
||||
float32_t b0_lane2 = vgetq_lane_f32(b_low, 2);
|
||||
c2 = vfma_n_f32(c2, a_low, b0_lane2);
|
||||
|
||||
float32_t b0_lane3 = vgetq_lane_f32(b_low, 3);
|
||||
c3 = vfma_n_f32(c3, a_low, b0_lane3);
|
||||
|
||||
float32_t b1_lane0 = vgetq_lane_f32(b_high, 0);
|
||||
c4 = vfma_n_f32(c4, a_low, b1_lane0);
|
||||
|
||||
float32_t b1_lane1 = vgetq_lane_f32(b_high, 1);
|
||||
c5 = vfma_n_f32(c5, a_low, b1_lane1);
|
||||
|
||||
float32_t b1_lane2 = vgetq_lane_f32(b_high, 2);
|
||||
c6 = vfma_n_f32(c6, a_low, b1_lane2);
|
||||
|
||||
float32_t b1_lane3 = vgetq_lane_f32(b_high, 3);
|
||||
c7 = vfma_n_f32(c7, a_low, b1_lane3);
|
||||
|
||||
A += 2;
|
||||
B += 8;
|
||||
}
|
||||
|
||||
FLOAT *col_0 = C + 0 * ldc;
|
||||
FLOAT *col_1 = C + 1 * ldc;
|
||||
FLOAT *col_2 = C + 2 * ldc;
|
||||
FLOAT *col_3 = C + 3 * ldc;
|
||||
FLOAT *col_4 = C + 4 * ldc;
|
||||
FLOAT *col_5 = C + 5 * ldc;
|
||||
FLOAT *col_6 = C + 6 * ldc;
|
||||
FLOAT *col_7 = C + 7 * ldc;
|
||||
|
||||
float32x2_t t0 = vld1_f32(col_0);
|
||||
t0 = vadd_f32(t0, vmul_n_f32(c0, alpha));
|
||||
vst1_f32(col_0, t0);
|
||||
|
||||
float32x2_t t1 = vld1_f32(col_1);
|
||||
t1 = vadd_f32(t1, vmul_n_f32(c1, alpha));
|
||||
vst1_f32(col_1, t1);
|
||||
|
||||
float32x2_t t2 = vld1_f32(col_2);
|
||||
t2 = vadd_f32(t2, vmul_n_f32(c2, alpha));
|
||||
vst1_f32(col_2, t2);
|
||||
|
||||
float32x2_t t3 = vld1_f32(col_3);
|
||||
t3 = vadd_f32(t3, vmul_n_f32(c3, alpha));
|
||||
vst1_f32(col_3, t3);
|
||||
|
||||
float32x2_t t4 = vld1_f32(col_4);
|
||||
t4 = vadd_f32(t4, vmul_n_f32(c4, alpha));
|
||||
vst1_f32(col_4, t4);
|
||||
|
||||
float32x2_t t5 = vld1_f32(col_5);
|
||||
t5 = vadd_f32(t5, vmul_n_f32(c5, alpha));
|
||||
vst1_f32(col_5, t5);
|
||||
|
||||
float32x2_t t6 = vld1_f32(col_6);
|
||||
t6 = vadd_f32(t6, vmul_n_f32(c6, alpha));
|
||||
vst1_f32(col_6, t6);
|
||||
|
||||
float32x2_t t7 = vld1_f32(col_7);
|
||||
t7 = vadd_f32(t7, vmul_n_f32(c7, alpha));
|
||||
vst1_f32(col_7, t7);
|
||||
}
|
||||
|
||||
static inline void kernel_1x8(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, BLASLONG ldc, FLOAT alpha) {
|
||||
FLOAT c0 = 0, c1 = 0, c2 = 0, c3 = 0, c4 = 0, c5 = 0, c6 = 0, c7 = 0;
|
||||
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
FLOAT a = A[0];
|
||||
c0 += a * B[0];
|
||||
c1 += a * B[1];
|
||||
c2 += a * B[2];
|
||||
c3 += a * B[3];
|
||||
c4 += a * B[4];
|
||||
c5 += a * B[5];
|
||||
c6 += a * B[6];
|
||||
c7 += a * B[7];
|
||||
|
||||
A += 1;
|
||||
B += 8;
|
||||
}
|
||||
|
||||
C[0 * ldc] += alpha * c0;
|
||||
C[1 * ldc] += alpha * c1;
|
||||
C[2 * ldc] += alpha * c2;
|
||||
C[3 * ldc] += alpha * c3;
|
||||
C[4 * ldc] += alpha * c4;
|
||||
C[5 * ldc] += alpha * c5;
|
||||
C[6 * ldc] += alpha * c6;
|
||||
C[7 * ldc] += alpha * c7;
|
||||
}
|
||||
|
||||
static inline void kernel_8x4(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, BLASLONG ldc, FLOAT alpha) {
|
||||
float32x4_t c0_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c0_high = vdupq_n_f32(0.0f);
|
||||
float32x4_t c1_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c1_high = vdupq_n_f32(0.0f);
|
||||
float32x4_t c2_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c2_high = vdupq_n_f32(0.0f);
|
||||
float32x4_t c3_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c3_high = vdupq_n_f32(0.0f);
|
||||
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
float16x8_t a_f16 = vld1q_f16(A);
|
||||
float32x4_t a_low = vcvt_f32_f16(vget_low_f16(a_f16));
|
||||
float32x4_t a_high = vcvt_f32_f16(vget_high_f16(a_f16));
|
||||
|
||||
float32x4_t b_f32 = vcvt_f32_f16(vld1_f16(B));
|
||||
|
||||
float32_t b0_lane0 = vgetq_lane_f32(b_f32, 0);
|
||||
c0_low = vfmaq_n_f32(c0_low, a_low, b0_lane0);
|
||||
c0_high = vfmaq_n_f32(c0_high, a_high, b0_lane0);
|
||||
|
||||
float32_t b0_lane1 = vgetq_lane_f32(b_f32, 1);
|
||||
c1_low = vfmaq_n_f32(c1_low, a_low, b0_lane1);
|
||||
c1_high = vfmaq_n_f32(c1_high, a_high, b0_lane1);
|
||||
|
||||
float32_t b0_lane2 = vgetq_lane_f32(b_f32, 2);
|
||||
c2_low = vfmaq_n_f32(c2_low, a_low, b0_lane2);
|
||||
c2_high = vfmaq_n_f32(c2_high, a_high, b0_lane2);
|
||||
|
||||
float32_t b0_lane3 = vgetq_lane_f32(b_f32, 3);
|
||||
c3_low = vfmaq_n_f32(c3_low, a_low, b0_lane3);
|
||||
c3_high = vfmaq_n_f32(c3_high, a_high, b0_lane3);
|
||||
|
||||
A += 8;
|
||||
B += 4;
|
||||
}
|
||||
|
||||
FLOAT *col_0 = C + 0 * ldc;
|
||||
FLOAT *col_1 = C + 1 * ldc;
|
||||
FLOAT *col_2 = C + 2 * ldc;
|
||||
FLOAT *col_3 = C + 3 * ldc;
|
||||
|
||||
float32x4_t t0_l = vld1q_f32(col_0);
|
||||
float32x4_t t0_h = vld1q_f32(col_0 + 4);
|
||||
t0_l = vaddq_f32(t0_l, vmulq_n_f32(c0_low, alpha));
|
||||
t0_h = vaddq_f32(t0_h, vmulq_n_f32(c0_high, alpha));
|
||||
vst1q_f32(col_0, t0_l);
|
||||
vst1q_f32(col_0 + 4, t0_h);
|
||||
|
||||
float32x4_t t1_l = vld1q_f32(col_1);
|
||||
float32x4_t t1_h = vld1q_f32(col_1 + 4);
|
||||
t1_l = vaddq_f32(t1_l, vmulq_n_f32(c1_low, alpha));
|
||||
t1_h = vaddq_f32(t1_h, vmulq_n_f32(c1_high, alpha));
|
||||
vst1q_f32(col_1, t1_l);
|
||||
vst1q_f32(col_1 + 4, t1_h);
|
||||
|
||||
float32x4_t t2_l = vld1q_f32(col_2);
|
||||
float32x4_t t2_h = vld1q_f32(col_2 + 4);
|
||||
t2_l = vaddq_f32(t2_l, vmulq_n_f32(c2_low, alpha));
|
||||
t2_h = vaddq_f32(t2_h, vmulq_n_f32(c2_high, alpha));
|
||||
vst1q_f32(col_2, t2_l);
|
||||
vst1q_f32(col_2 + 4, t2_h);
|
||||
|
||||
float32x4_t t3_l = vld1q_f32(col_3);
|
||||
float32x4_t t3_h = vld1q_f32(col_3 + 4);
|
||||
t3_l = vaddq_f32(t3_l, vmulq_n_f32(c3_low, alpha));
|
||||
t3_h = vaddq_f32(t3_h, vmulq_n_f32(c3_high, alpha));
|
||||
vst1q_f32(col_3, t3_l);
|
||||
vst1q_f32(col_3 + 4, t3_h);
|
||||
}
|
||||
|
||||
static inline void kernel_4x4(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, BLASLONG ldc, FLOAT alpha) {
|
||||
float32x4_t c0 = vdupq_n_f32(0.0f);
|
||||
float32x4_t c1 = vdupq_n_f32(0.0f);
|
||||
float32x4_t c2 = vdupq_n_f32(0.0f);
|
||||
float32x4_t c3 = vdupq_n_f32(0.0f);
|
||||
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
float32x4_t a_f32 = vcvt_f32_f16(vld1_f16(A));
|
||||
float32x4_t b_f32 = vcvt_f32_f16(vld1_f16(B));
|
||||
|
||||
float32_t b0_lane0 = vgetq_lane_f32(b_f32, 0);
|
||||
c0 = vfmaq_n_f32(c0, a_f32, b0_lane0);
|
||||
|
||||
float32_t b0_lane1 = vgetq_lane_f32(b_f32, 1);
|
||||
c1 = vfmaq_n_f32(c1, a_f32, b0_lane1);
|
||||
|
||||
float32_t b0_lane2 = vgetq_lane_f32(b_f32, 2);
|
||||
c2 = vfmaq_n_f32(c2, a_f32, b0_lane2);
|
||||
|
||||
float32_t b0_lane3 = vgetq_lane_f32(b_f32, 3);
|
||||
c3 = vfmaq_n_f32(c3, a_f32, b0_lane3);
|
||||
|
||||
A += 4;
|
||||
B += 4;
|
||||
}
|
||||
|
||||
FLOAT *col_0 = C + 0 * ldc;
|
||||
FLOAT *col_1 = C + 1 * ldc;
|
||||
FLOAT *col_2 = C + 2 * ldc;
|
||||
FLOAT *col_3 = C + 3 * ldc;
|
||||
|
||||
float32x4_t t0 = vld1q_f32(col_0);
|
||||
t0 = vaddq_f32(t0, vmulq_n_f32(c0, alpha));
|
||||
vst1q_f32(col_0, t0);
|
||||
|
||||
float32x4_t t1 = vld1q_f32(col_1);
|
||||
t1 = vaddq_f32(t1, vmulq_n_f32(c1, alpha));
|
||||
vst1q_f32(col_1, t1);
|
||||
|
||||
float32x4_t t2 = vld1q_f32(col_2);
|
||||
t2 = vaddq_f32(t2, vmulq_n_f32(c2, alpha));
|
||||
vst1q_f32(col_2, t2);
|
||||
|
||||
float32x4_t t3 = vld1q_f32(col_3);
|
||||
t3 = vaddq_f32(t3, vmulq_n_f32(c3, alpha));
|
||||
vst1q_f32(col_3, t3);
|
||||
}
|
||||
|
||||
static inline void kernel_2x4(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, BLASLONG ldc, FLOAT alpha) {
|
||||
float32x2_t c0 = vdup_n_f32(0.0f);
|
||||
float32x2_t c1 = vdup_n_f32(0.0f);
|
||||
float32x2_t c2 = vdup_n_f32(0.0f);
|
||||
float32x2_t c3 = vdup_n_f32(0.0f);
|
||||
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
float32x4_t a_f32 = vcvt_f32_f16(vld1_f16(A));
|
||||
float32x2_t a_low = vget_low_f32(a_f32);
|
||||
|
||||
float32x4_t b_f32 = vcvt_f32_f16(vld1_f16(B));
|
||||
|
||||
float32_t b0_lane0 = vgetq_lane_f32(b_f32, 0);
|
||||
c0 = vfma_n_f32(c0, a_low, b0_lane0);
|
||||
|
||||
float32_t b0_lane1 = vgetq_lane_f32(b_f32, 1);
|
||||
c1 = vfma_n_f32(c1, a_low, b0_lane1);
|
||||
|
||||
float32_t b0_lane2 = vgetq_lane_f32(b_f32, 2);
|
||||
c2 = vfma_n_f32(c2, a_low, b0_lane2);
|
||||
|
||||
float32_t b0_lane3 = vgetq_lane_f32(b_f32, 3);
|
||||
c3 = vfma_n_f32(c3, a_low, b0_lane3);
|
||||
A += 2;
|
||||
B += 4;
|
||||
}
|
||||
|
||||
FLOAT *col_0 = C + 0 * ldc;
|
||||
FLOAT *col_1 = C + 1 * ldc;
|
||||
FLOAT *col_2 = C + 2 * ldc;
|
||||
FLOAT *col_3 = C + 3 * ldc;
|
||||
|
||||
float32x2_t t0 = vld1_f32(col_0);
|
||||
t0 = vadd_f32(t0, vmul_n_f32(c0, alpha));
|
||||
vst1_f32(col_0, t0);
|
||||
|
||||
float32x2_t t1 = vld1_f32(col_1);
|
||||
t1 = vadd_f32(t1, vmul_n_f32(c1, alpha));
|
||||
vst1_f32(col_1, t1);
|
||||
|
||||
float32x2_t t2 = vld1_f32(col_2);
|
||||
t2 = vadd_f32(t2, vmul_n_f32(c2, alpha));
|
||||
vst1_f32(col_2, t2);
|
||||
|
||||
float32x2_t t3 = vld1_f32(col_3);
|
||||
t3 = vadd_f32(t3, vmul_n_f32(c3, alpha));
|
||||
vst1_f32(col_3, t3);
|
||||
}
|
||||
|
||||
static inline void kernel_1x4(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, BLASLONG ldc, FLOAT alpha) {
|
||||
FLOAT c0 = 0, c1 = 0, c2 = 0, c3 = 0;
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
FLOAT a = A[0];
|
||||
c0 += a * B[0];
|
||||
c1 += a * B[1];
|
||||
c2 += a * B[2];
|
||||
c3 += a * B[3];
|
||||
|
||||
A += 1;
|
||||
B += 4;
|
||||
}
|
||||
|
||||
C[0 * ldc] += alpha * c0;
|
||||
C[1 * ldc] += alpha * c1;
|
||||
C[2 * ldc] += alpha * c2;
|
||||
C[3 * ldc] += alpha * c3;
|
||||
}
|
||||
|
||||
static inline void kernel_8x2(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, BLASLONG ldc, FLOAT alpha) {
|
||||
float32x4_t c0_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c0_high = vdupq_n_f32(0.0f);
|
||||
float32x4_t c1_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c1_high = vdupq_n_f32(0.0f);
|
||||
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
float16x8_t a_f16 = vld1q_f16(A);
|
||||
float32x4_t a_low = vcvt_f32_f16(vget_low_f16(a_f16));
|
||||
float32x4_t a_high = vcvt_f32_f16(vget_high_f16(a_f16));
|
||||
|
||||
float32x4_t b_f32 = vcvt_f32_f16(vld1_f16(B));
|
||||
|
||||
float32_t b0_lane0 = vgetq_lane_f32(b_f32, 0);
|
||||
c0_low = vfmaq_n_f32(c0_low, a_low, b0_lane0);
|
||||
c0_high = vfmaq_n_f32(c0_high, a_high, b0_lane0);
|
||||
|
||||
float32_t b0_lane1 = vgetq_lane_f32(b_f32, 1);
|
||||
c1_low = vfmaq_n_f32(c1_low, a_low, b0_lane1);
|
||||
c1_high = vfmaq_n_f32(c1_high, a_high, b0_lane1);
|
||||
|
||||
A += 8;
|
||||
B += 2;
|
||||
}
|
||||
|
||||
FLOAT *col_0 = C + 0 * ldc;
|
||||
FLOAT *col_1 = C + 1 * ldc;
|
||||
|
||||
float32x4_t t0_l = vld1q_f32(col_0);
|
||||
float32x4_t t0_h = vld1q_f32(col_0 + 4);
|
||||
t0_l = vaddq_f32(t0_l, vmulq_n_f32(c0_low, alpha));
|
||||
t0_h = vaddq_f32(t0_h, vmulq_n_f32(c0_high, alpha));
|
||||
vst1q_f32(col_0, t0_l);
|
||||
vst1q_f32(col_0 + 4, t0_h);
|
||||
|
||||
float32x4_t t1_l = vld1q_f32(col_1);
|
||||
float32x4_t t1_h = vld1q_f32(col_1 + 4);
|
||||
t1_l = vaddq_f32(t1_l, vmulq_n_f32(c1_low, alpha));
|
||||
t1_h = vaddq_f32(t1_h, vmulq_n_f32(c1_high, alpha));
|
||||
vst1q_f32(col_1, t1_l);
|
||||
vst1q_f32(col_1 + 4, t1_h);
|
||||
}
|
||||
|
||||
static inline void kernel_4x2(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, BLASLONG ldc, FLOAT alpha) {
|
||||
float32x4_t c0 = vdupq_n_f32(0.0f);
|
||||
float32x4_t c1 = vdupq_n_f32(0.0f);
|
||||
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
float32x4_t a_f32 = vcvt_f32_f16(vld1_f16(A));
|
||||
float32x4_t b_f32 = vcvt_f32_f16(vld1_f16(B));
|
||||
|
||||
float32_t b0_lane0 = vgetq_lane_f32(b_f32, 0);
|
||||
c0 = vfmaq_n_f32(c0, a_f32, b0_lane0);
|
||||
|
||||
float32_t b0_lane1 = vgetq_lane_f32(b_f32, 1);
|
||||
c1 = vfmaq_n_f32(c1, a_f32, b0_lane1);
|
||||
|
||||
A += 4;
|
||||
B += 2;
|
||||
}
|
||||
|
||||
FLOAT *col_0 = C + 0 * ldc;
|
||||
FLOAT *col_1 = C + 1 * ldc;
|
||||
|
||||
float32x4_t t0 = vld1q_f32(col_0);
|
||||
t0 = vaddq_f32(t0, vmulq_n_f32(c0, alpha));
|
||||
vst1q_f32(col_0, t0);
|
||||
|
||||
float32x4_t t1 = vld1q_f32(col_1);
|
||||
t1 = vaddq_f32(t1, vmulq_n_f32(c1, alpha));
|
||||
vst1q_f32(col_1, t1);
|
||||
}
|
||||
|
||||
static inline void kernel_2x2(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, BLASLONG ldc, FLOAT alpha) {
|
||||
float32x2_t c0 = vdup_n_f32(0.0f);
|
||||
float32x2_t c1 = vdup_n_f32(0.0f);
|
||||
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
float32x4_t a_f32 = vcvt_f32_f16(vld1_f16(A));
|
||||
float32x2_t a_low = vget_low_f32(a_f32);
|
||||
|
||||
float32x4_t b_f32 = vcvt_f32_f16(vld1_f16(B));
|
||||
|
||||
float32_t b0_lane0 = vgetq_lane_f32(b_f32, 0);
|
||||
c0 = vfma_n_f32(c0, a_low, b0_lane0);
|
||||
|
||||
float32_t b0_lane1 = vgetq_lane_f32(b_f32, 1);
|
||||
c1 = vfma_n_f32(c1, a_low, b0_lane1);
|
||||
;
|
||||
|
||||
A += 2;
|
||||
B += 2;
|
||||
}
|
||||
|
||||
FLOAT *col_0 = C + 0 * ldc;
|
||||
FLOAT *col_1 = C + 1 * ldc;
|
||||
|
||||
float32x2_t t0 = vld1_f32(col_0);
|
||||
t0 = vadd_f32(t0, vmul_n_f32(c0, alpha));
|
||||
vst1_f32(col_0, t0);
|
||||
|
||||
float32x2_t t1 = vld1_f32(col_1);
|
||||
t1 = vadd_f32(t1, vmul_n_f32(c1, alpha));
|
||||
vst1_f32(col_1, t1);
|
||||
}
|
||||
|
||||
static inline void kernel_1x2(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, BLASLONG ldc, FLOAT alpha) {
|
||||
FLOAT c0 = 0, c1 = 0;
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
FLOAT a = A[0];
|
||||
c0 += a * B[0];
|
||||
c1 += a * B[1];
|
||||
|
||||
A += 1;
|
||||
B += 2;
|
||||
}
|
||||
|
||||
C[0 * ldc] += alpha * c0;
|
||||
C[1 * ldc] += alpha * c1;
|
||||
}
|
||||
|
||||
static inline void kernel_8x1(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, FLOAT alpha) {
|
||||
float32x4_t c0_low = vdupq_n_f32(0.0f);
|
||||
float32x4_t c0_high = vdupq_n_f32(0.0f);
|
||||
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
float16x8_t a_f16 = vld1q_f16(A);
|
||||
float32x4_t a_low = vcvt_f32_f16(vget_low_f16(a_f16));
|
||||
float32x4_t a_high = vcvt_f32_f16(vget_high_f16(a_f16));
|
||||
|
||||
float b_scalar = (float)B[0];
|
||||
|
||||
c0_low = vfmaq_n_f32(c0_low, a_low, b_scalar);
|
||||
c0_high = vfmaq_n_f32(c0_high, a_high, b_scalar);
|
||||
|
||||
A += 8;
|
||||
B += 1;
|
||||
}
|
||||
|
||||
FLOAT *col_0 = C;
|
||||
|
||||
float32x4_t t0_l = vld1q_f32(col_0);
|
||||
float32x4_t t0_h = vld1q_f32(col_0 + 4);
|
||||
t0_l = vaddq_f32(t0_l, vmulq_n_f32(c0_low, alpha));
|
||||
t0_h = vaddq_f32(t0_h, vmulq_n_f32(c0_high, alpha));
|
||||
vst1q_f32(col_0, t0_l);
|
||||
vst1q_f32(col_0 + 4, t0_h);
|
||||
}
|
||||
|
||||
static inline void kernel_4x1(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, FLOAT alpha) {
|
||||
float32x4_t c0 = vdupq_n_f32(0.0f);
|
||||
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
float32x4_t a_f32 = vcvt_f32_f16(vld1_f16(A));
|
||||
float b_scalar = (float)B[0];
|
||||
c0 = vfmaq_n_f32(c0, a_f32, b_scalar);
|
||||
|
||||
A += 4;
|
||||
B += 1;
|
||||
}
|
||||
|
||||
FLOAT *col_0 = C;
|
||||
float32x4_t t0 = vld1q_f32(col_0);
|
||||
t0 = vaddq_f32(t0, vmulq_n_f32(c0, alpha));
|
||||
vst1q_f32(col_0, t0);
|
||||
}
|
||||
|
||||
static inline void kernel_2x1(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, FLOAT alpha) {
|
||||
float32x2_t c0 = vdup_n_f32(0.0f);
|
||||
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
float32x4_t a_f32 = vcvt_f32_f16(vld1_f16(A));
|
||||
float32x2_t a_low = vget_low_f32(a_f32);
|
||||
|
||||
float b_scalar = (float)B[0];
|
||||
c0 = vfma_n_f32(c0, a_low, b_scalar);
|
||||
|
||||
A += 2;
|
||||
B += 1;
|
||||
}
|
||||
|
||||
FLOAT *col_0 = C;
|
||||
float32x2_t t0 = vld1_f32(col_0);
|
||||
t0 = vadd_f32(t0, vmul_n_f32(c0, alpha));
|
||||
vst1_f32(col_0, t0);
|
||||
}
|
||||
|
||||
static inline void kernel_1x1(BLASLONG K, const float16_t *A, const float16_t *B, FLOAT *C, FLOAT alpha) {
|
||||
FLOAT sum = 0.0f;
|
||||
for (BLASLONG k = 0; k < K; ++k) {
|
||||
sum += A[0] * B[0];
|
||||
A += 1;
|
||||
B += 1;
|
||||
}
|
||||
|
||||
C[0] += alpha * sum;
|
||||
}
|
||||
|
||||
int CNAME(BLASLONG M, BLASLONG N, BLASLONG K, FLOAT alpha, IFLOAT *A, IFLOAT *B, FLOAT *C, BLASLONG ldc) {
|
||||
float16_t *A_base = (float16_t *)A;
|
||||
float16_t *B_base = (float16_t *)B;
|
||||
|
||||
FLOAT *Ccol = C;
|
||||
BLASLONG m_rem1, m_rem2, m_rem3, m_rem4;
|
||||
|
||||
while (N >= 8) {
|
||||
const float16_t *Aptr = A_base;
|
||||
const float16_t *Bptr = B_base;
|
||||
FLOAT *Crow = Ccol;
|
||||
|
||||
m_rem1 = M;
|
||||
|
||||
while (m_rem1 >= 8) {
|
||||
kernel_8x8(K, Aptr, Bptr, Crow, ldc, alpha);
|
||||
Aptr += K * 8;
|
||||
Crow += 8;
|
||||
m_rem1 -= 8;
|
||||
}
|
||||
if (m_rem1 >= 4) {
|
||||
kernel_4x8(K, Aptr, Bptr, Crow, ldc, alpha);
|
||||
Aptr += K * 4;
|
||||
Crow += 4;
|
||||
m_rem1 -= 4;
|
||||
}
|
||||
if (m_rem1 >= 2) {
|
||||
kernel_2x8(K, Aptr, Bptr, Crow, ldc, alpha);
|
||||
Aptr += K * 2;
|
||||
Crow += 2;
|
||||
m_rem1 -= 2;
|
||||
}
|
||||
if (m_rem1 >= 1) {
|
||||
kernel_1x8(K, Aptr, Bptr, Crow, ldc, alpha);
|
||||
}
|
||||
|
||||
B_base += K * 8;
|
||||
Ccol += ldc * 8;
|
||||
N -= 8;
|
||||
}
|
||||
|
||||
if (N >= 4) {
|
||||
const float16_t *Aptr = A_base;
|
||||
const float16_t *Bptr = B_base;
|
||||
FLOAT *Crow = Ccol;
|
||||
|
||||
m_rem2 = M;
|
||||
while (m_rem2 >= 8) {
|
||||
kernel_8x4(K, Aptr, Bptr, Crow, ldc, alpha);
|
||||
Aptr += K * 8;
|
||||
Crow += 8;
|
||||
m_rem2 -= 8;
|
||||
}
|
||||
if (m_rem2 >= 4) {
|
||||
kernel_4x4(K, Aptr, Bptr, Crow, ldc, alpha);
|
||||
Aptr += K * 4;
|
||||
Crow += 4;
|
||||
m_rem2 -= 4;
|
||||
}
|
||||
if (m_rem2 >= 2) {
|
||||
kernel_2x4(K, Aptr, Bptr, Crow, ldc, alpha);
|
||||
Aptr += K * 2;
|
||||
Crow += 2;
|
||||
m_rem2 -= 2;
|
||||
}
|
||||
if (m_rem2 >= 1) {
|
||||
kernel_1x4(K, Aptr, Bptr, Crow, ldc, alpha);
|
||||
}
|
||||
|
||||
B_base += K * 4;
|
||||
Ccol += ldc * 4;
|
||||
N -= 4;
|
||||
}
|
||||
|
||||
if (N >= 2) {
|
||||
const float16_t *Aptr = A_base;
|
||||
const float16_t *Bptr = B_base;
|
||||
FLOAT *Crow = Ccol;
|
||||
|
||||
m_rem3 = M;
|
||||
while (m_rem3 >= 8) {
|
||||
kernel_8x2(K, Aptr, Bptr, Crow, ldc, alpha);
|
||||
Aptr += K * 8;
|
||||
Crow += 8;
|
||||
m_rem3 -= 8;
|
||||
}
|
||||
if (m_rem3 >= 4) {
|
||||
kernel_4x2(K, Aptr, Bptr, Crow, ldc, alpha);
|
||||
Aptr += K * 4;
|
||||
Crow += 4;
|
||||
m_rem3 -= 4;
|
||||
}
|
||||
if (m_rem3 >= 2) {
|
||||
kernel_2x2(K, Aptr, Bptr, Crow, ldc, alpha);
|
||||
Aptr += K * 2;
|
||||
Crow += 2;
|
||||
m_rem3 -= 2;
|
||||
}
|
||||
if (m_rem3 >= 1) {
|
||||
kernel_1x2(K, Aptr, Bptr, Crow, ldc, alpha);
|
||||
}
|
||||
|
||||
B_base += K * 2;
|
||||
Ccol += ldc * 2;
|
||||
N -= 2;
|
||||
}
|
||||
|
||||
if (N >= 1) {
|
||||
const float16_t *Aptr = A_base;
|
||||
const float16_t *Bptr = B_base;
|
||||
FLOAT *Crow = Ccol;
|
||||
|
||||
m_rem4 = M;
|
||||
while (m_rem4 >= 8) {
|
||||
kernel_8x1(K, Aptr, Bptr, Crow, alpha);
|
||||
Aptr += K * 8;
|
||||
Crow += 8;
|
||||
m_rem4 -= 8;
|
||||
}
|
||||
if (m_rem4 >= 4) {
|
||||
kernel_4x1(K, Aptr, Bptr, Crow, alpha);
|
||||
Aptr += K * 4;
|
||||
Crow += 4;
|
||||
m_rem4 -= 4;
|
||||
}
|
||||
if (m_rem4 >= 2) {
|
||||
kernel_2x1(K, Aptr, Bptr, Crow, alpha);
|
||||
Aptr += K * 2;
|
||||
Crow += 2;
|
||||
m_rem4 -= 2;
|
||||
}
|
||||
if (m_rem4 >= 1) {
|
||||
kernel_1x1(K, Aptr, Bptr, Crow, alpha);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,258 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2026, The OpenBLAS Project
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name of the OpenBLAS project nor the names of
|
||||
* its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* *****************************************************************************/
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
static inline void transpose8x8(float16x8_t *rows, float16x8_t *cols) {
|
||||
float64x2_t b0 = vtrn1q_f64(vreinterpretq_f64_f16(rows[0]), vreinterpretq_f64_f16(rows[4]));
|
||||
float64x2_t b1 = vtrn1q_f64(vreinterpretq_f64_f16(rows[1]), vreinterpretq_f64_f16(rows[5]));
|
||||
float64x2_t b2 = vtrn1q_f64(vreinterpretq_f64_f16(rows[2]), vreinterpretq_f64_f16(rows[6]));
|
||||
float64x2_t b3 = vtrn1q_f64(vreinterpretq_f64_f16(rows[3]), vreinterpretq_f64_f16(rows[7]));
|
||||
float64x2_t b4 = vtrn2q_f64(vreinterpretq_f64_f16(rows[0]), vreinterpretq_f64_f16(rows[4]));
|
||||
float64x2_t b5 = vtrn2q_f64(vreinterpretq_f64_f16(rows[1]), vreinterpretq_f64_f16(rows[5]));
|
||||
float64x2_t b6 = vtrn2q_f64(vreinterpretq_f64_f16(rows[2]), vreinterpretq_f64_f16(rows[6]));
|
||||
float64x2_t b7 = vtrn2q_f64(vreinterpretq_f64_f16(rows[3]), vreinterpretq_f64_f16(rows[7]));
|
||||
|
||||
float32x4_t c0 = vtrn1q_f32(vreinterpretq_f32_f64(b0), vreinterpretq_f32_f64(b2));
|
||||
float32x4_t c1 = vtrn1q_f32(vreinterpretq_f32_f64(b1), vreinterpretq_f32_f64(b3));
|
||||
float32x4_t c2 = vtrn2q_f32(vreinterpretq_f32_f64(b0), vreinterpretq_f32_f64(b2));
|
||||
float32x4_t c3 = vtrn2q_f32(vreinterpretq_f32_f64(b1), vreinterpretq_f32_f64(b3));
|
||||
float32x4_t c4 = vtrn1q_f32(vreinterpretq_f32_f64(b4), vreinterpretq_f32_f64(b6));
|
||||
float32x4_t c5 = vtrn1q_f32(vreinterpretq_f32_f64(b5), vreinterpretq_f32_f64(b7));
|
||||
float32x4_t c6 = vtrn2q_f32(vreinterpretq_f32_f64(b4), vreinterpretq_f32_f64(b6));
|
||||
float32x4_t c7 = vtrn2q_f32(vreinterpretq_f32_f64(b5), vreinterpretq_f32_f64(b7));
|
||||
|
||||
float16x8_t d0 = vtrn1q_f16(vreinterpretq_f16_f32(c0), vreinterpretq_f16_f32(c1));
|
||||
float16x8_t d1 = vtrn2q_f16(vreinterpretq_f16_f32(c0), vreinterpretq_f16_f32(c1));
|
||||
float16x8_t d2 = vtrn1q_f16(vreinterpretq_f16_f32(c2), vreinterpretq_f16_f32(c3));
|
||||
float16x8_t d3 = vtrn2q_f16(vreinterpretq_f16_f32(c2), vreinterpretq_f16_f32(c3));
|
||||
float16x8_t d4 = vtrn1q_f16(vreinterpretq_f16_f32(c4), vreinterpretq_f16_f32(c5));
|
||||
float16x8_t d5 = vtrn2q_f16(vreinterpretq_f16_f32(c4), vreinterpretq_f16_f32(c5));
|
||||
float16x8_t d6 = vtrn1q_f16(vreinterpretq_f16_f32(c6), vreinterpretq_f16_f32(c7));
|
||||
float16x8_t d7 = vtrn2q_f16(vreinterpretq_f16_f32(c6), vreinterpretq_f16_f32(c7));
|
||||
|
||||
cols[0] = d0;
|
||||
cols[1] = d1;
|
||||
cols[2] = d2;
|
||||
cols[3] = d3;
|
||||
cols[4] = d4;
|
||||
cols[5] = d5;
|
||||
cols[6] = d6;
|
||||
cols[7] = d7;
|
||||
}
|
||||
|
||||
static inline void transpose_4x4(float16x4_t *rows, float16x4_t *cols) {
|
||||
float16x8_t t0 = vcombine_f16(rows[0], vdup_n_f16(0.0f));
|
||||
float16x8_t t1 = vcombine_f16(rows[1], vdup_n_f16(0.0f));
|
||||
float16x8_t t2 = vcombine_f16(rows[2], vdup_n_f16(0.0f));
|
||||
float16x8_t t3 = vcombine_f16(rows[3], vdup_n_f16(0.0f));
|
||||
|
||||
float16x8_t t02 = vzip1q_f16(t0, t2);
|
||||
float16x8_t t13 = vzip1q_f16(t1, t3);
|
||||
|
||||
float16x8x2_t t0123 = vzipq_f16(t02, t13);
|
||||
|
||||
cols[0] = vget_low_f16(t0123.val[0]);
|
||||
cols[1] = vget_high_f16(t0123.val[0]);
|
||||
cols[2] = vget_low_f16(t0123.val[1]);
|
||||
cols[3] = vget_high_f16(t0123.val[1]);
|
||||
}
|
||||
|
||||
int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) {
|
||||
BLASLONG i, j;
|
||||
IFLOAT *a_offset = a;
|
||||
IFLOAT *b_offset = b;
|
||||
|
||||
float16x8_t v0, v1, v2, v3, v4, v5, v6, v7;
|
||||
float16x4_t v8, v9, v10, v11;
|
||||
|
||||
BLASLONG n8 = n >> 3;
|
||||
|
||||
for (j = 0; j < n8; j++) {
|
||||
IFLOAT *a0 = a_offset;
|
||||
IFLOAT *a1 = a0 + lda;
|
||||
IFLOAT *a2 = a1 + lda;
|
||||
IFLOAT *a3 = a2 + lda;
|
||||
IFLOAT *a4 = a3 + lda;
|
||||
IFLOAT *a5 = a4 + lda;
|
||||
IFLOAT *a6 = a5 + lda;
|
||||
IFLOAT *a7 = a6 + lda;
|
||||
a_offset += 8 * lda;
|
||||
|
||||
BLASLONG m8 = m >> 3;
|
||||
for (i = 0; i < m8; i++) {
|
||||
v0 = vld1q_f16((float16_t *)a0);
|
||||
v1 = vld1q_f16((float16_t *)a1);
|
||||
v2 = vld1q_f16((float16_t *)a2);
|
||||
v3 = vld1q_f16((float16_t *)a3);
|
||||
v4 = vld1q_f16((float16_t *)a4);
|
||||
v5 = vld1q_f16((float16_t *)a5);
|
||||
v6 = vld1q_f16((float16_t *)a6);
|
||||
v7 = vld1q_f16((float16_t *)a7);
|
||||
|
||||
float16x8_t rows[8] = {v0, v1, v2, v3, v4, v5, v6, v7};
|
||||
float16x8_t cols[8];
|
||||
transpose8x8(rows, cols);
|
||||
|
||||
vst1q_f16((float16_t *)b_offset, cols[0]);
|
||||
vst1q_f16((float16_t *)b_offset + 8, cols[1]);
|
||||
vst1q_f16((float16_t *)b_offset + 16, cols[2]);
|
||||
vst1q_f16((float16_t *)b_offset + 24, cols[3]);
|
||||
vst1q_f16((float16_t *)b_offset + 32, cols[4]);
|
||||
vst1q_f16((float16_t *)b_offset + 40, cols[5]);
|
||||
vst1q_f16((float16_t *)b_offset + 48, cols[6]);
|
||||
vst1q_f16((float16_t *)b_offset + 56, cols[7]);
|
||||
|
||||
a0 += 8;
|
||||
a1 += 8;
|
||||
a2 += 8;
|
||||
a3 += 8;
|
||||
a4 += 8;
|
||||
a5 += 8;
|
||||
a6 += 8;
|
||||
a7 += 8;
|
||||
b_offset += 64;
|
||||
}
|
||||
|
||||
BLASLONG i = (m & 7);
|
||||
if (i > 0) {
|
||||
for (BLASLONG k = 0; k < i; k++) {
|
||||
*(b_offset + 0) = *a0;
|
||||
*(b_offset + 1) = *a1;
|
||||
*(b_offset + 2) = *a2;
|
||||
*(b_offset + 3) = *a3;
|
||||
*(b_offset + 4) = *a4;
|
||||
*(b_offset + 5) = *a5;
|
||||
*(b_offset + 6) = *a6;
|
||||
*(b_offset + 7) = *a7;
|
||||
|
||||
a0++;
|
||||
a1++;
|
||||
a2++;
|
||||
a3++;
|
||||
a4++;
|
||||
a5++;
|
||||
a6++;
|
||||
a7++;
|
||||
|
||||
b_offset += 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (n & 4) {
|
||||
IFLOAT *a0 = a_offset;
|
||||
IFLOAT *a1 = a0 + lda;
|
||||
IFLOAT *a2 = a1 + lda;
|
||||
IFLOAT *a3 = a2 + lda;
|
||||
a_offset += 4 * lda;
|
||||
|
||||
BLASLONG m4 = m >> 2;
|
||||
for (i = 0; i < m4; i++) {
|
||||
v8 = vld1_f16((float16_t *)a0);
|
||||
v9 = vld1_f16((float16_t *)a1);
|
||||
v10 = vld1_f16((float16_t *)a2);
|
||||
v11 = vld1_f16((float16_t *)a3);
|
||||
|
||||
float16x4_t rows[4] = {v8, v9, v10, v11};
|
||||
float16x4_t cols[4];
|
||||
transpose_4x4(rows, cols);
|
||||
|
||||
vst1_f16((float16_t *)b_offset, cols[0]);
|
||||
vst1_f16((float16_t *)b_offset + 4, cols[1]);
|
||||
vst1_f16((float16_t *)b_offset + 8, cols[2]);
|
||||
vst1_f16((float16_t *)b_offset + 12, cols[3]);
|
||||
|
||||
a0 += 4;
|
||||
a1 += 4;
|
||||
a2 += 4;
|
||||
a3 += 4;
|
||||
b_offset += 16;
|
||||
}
|
||||
|
||||
BLASLONG i = (m & 3);
|
||||
if (i > 0) {
|
||||
for (BLASLONG k = 0; k < i; k++) {
|
||||
*(b_offset + 0) = *a0;
|
||||
*(b_offset + 1) = *a1;
|
||||
*(b_offset + 2) = *a2;
|
||||
*(b_offset + 3) = *a3;
|
||||
|
||||
a0++;
|
||||
a1++;
|
||||
a2++;
|
||||
a3++;
|
||||
|
||||
b_offset += 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (n & 2) {
|
||||
IFLOAT *a0 = a_offset;
|
||||
IFLOAT *a1 = a0 + lda;
|
||||
a_offset += 2 * lda;
|
||||
|
||||
BLASLONG m2 = m >> 1;
|
||||
for (i = 0; i < m2; i++) {
|
||||
|
||||
v8 = vld1_f16((float16_t *)a0);
|
||||
v9 = vld1_f16((float16_t *)a1);
|
||||
|
||||
float16_t col0[2] = {vget_lane_f16(v8, 0), vget_lane_f16(v9, 0)};
|
||||
float16_t col1[2] = {vget_lane_f16(v8, 1), vget_lane_f16(v9, 1)};
|
||||
|
||||
b_offset[0] = col0[0];
|
||||
b_offset[1] = col0[1];
|
||||
b_offset[2] = col1[0];
|
||||
b_offset[3] = col1[1];
|
||||
|
||||
a0 += 2;
|
||||
a1 += 2;
|
||||
b_offset += 4;
|
||||
}
|
||||
|
||||
if (m & 1) {
|
||||
b_offset[0] = *a0;
|
||||
b_offset[1] = *a1;
|
||||
b_offset += 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (n & 1) {
|
||||
IFLOAT *a0 = a_offset;
|
||||
for (i = 0; i < m; i++) {
|
||||
*b_offset++ = *a0;
|
||||
a0++;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2026, The OpenBLAS Project
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name of the OpenBLAS project nor the names of
|
||||
* its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* *****************************************************************************/
|
||||
|
||||
#include <arm_sve.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) {
|
||||
BLASLONG i, j;
|
||||
IFLOAT *aoffset, *aoffset1;
|
||||
IFLOAT *boffset, *boffset1;
|
||||
IFLOAT *boffset2, *boffset3, *boffset4;
|
||||
|
||||
aoffset = a;
|
||||
boffset = b;
|
||||
|
||||
boffset2 = b + m * (n & ~7);
|
||||
boffset3 = b + m * (n & ~3);
|
||||
boffset4 = b + m * (n & ~1);
|
||||
|
||||
svbool_t pg8 = svwhilelt_b16(0, 8);
|
||||
svbool_t pg4 = svwhilelt_b16(0, 4);
|
||||
|
||||
for (j = 0; j < m; j++) {
|
||||
aoffset1 = aoffset;
|
||||
boffset1 = boffset;
|
||||
|
||||
aoffset += lda;
|
||||
boffset += 8;
|
||||
|
||||
for (i = 0; i < (n >> 3); i++) {
|
||||
svfloat16_t v0 = svld1_f16(pg8, (float16_t *)aoffset1);
|
||||
svst1_f16(pg8, (float16_t *)boffset1, v0);
|
||||
|
||||
aoffset1 += 8;
|
||||
boffset1 += 8 * m;
|
||||
}
|
||||
|
||||
if (n & 4) {
|
||||
svfloat16_t v0 = svld1_f16(pg4, (float16_t *)aoffset1);
|
||||
svst1_f16(pg4, (float16_t *)boffset2, v0);
|
||||
|
||||
aoffset1 += 4;
|
||||
boffset2 += 4;
|
||||
}
|
||||
|
||||
if (n & 2) {
|
||||
boffset3[0] = aoffset1[0];
|
||||
boffset3[1] = aoffset1[1];
|
||||
aoffset1 += 2;
|
||||
boffset3 += 2;
|
||||
}
|
||||
|
||||
if (n & 1) {
|
||||
boffset4[0] = aoffset1[0];
|
||||
aoffset1 += 1;
|
||||
boffset4 += 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
+88
-11
@@ -47,11 +47,46 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
|
||||
|
||||
if ( (inc_x == 1) && (inc_y == 1) )
|
||||
{
|
||||
#if V_SIMD && !defined(DSDOT)
|
||||
const int vstep = v_nlanes_f32;
|
||||
const int unrollx4 = n & (-vstep * 4);
|
||||
const int unrollx = n & -vstep;
|
||||
v_f32 vsum0 = v_zero_f32();
|
||||
#if defined(DOUBLE) && V_SIMD && V_SIMD_F64 && !defined(DSDOT)
|
||||
const int vstep = v_nlanes_f64;
|
||||
const int unrollx4 = n & (-vstep * 4);
|
||||
const int unrollx = n & -vstep;
|
||||
v_f64 vsum0 = v_zero_f64();
|
||||
v_f64 vsum1 = v_zero_f64();
|
||||
v_f64 vsum2 = v_zero_f64();
|
||||
v_f64 vsum3 = v_zero_f64();
|
||||
while(i < unrollx4)
|
||||
{
|
||||
vsum0 = v_muladd_f64(
|
||||
v_loadu_f64(x + i), v_loadu_f64(y + i), vsum0
|
||||
);
|
||||
vsum1 = v_muladd_f64(
|
||||
v_loadu_f64(x + i + vstep), v_loadu_f64(y + i + vstep), vsum1
|
||||
);
|
||||
vsum2 = v_muladd_f64(
|
||||
v_loadu_f64(x + i + vstep*2), v_loadu_f64(y + i + vstep*2), vsum2
|
||||
);
|
||||
vsum3 = v_muladd_f64(
|
||||
v_loadu_f64(x + i + vstep*3), v_loadu_f64(y + i + vstep*3), vsum3
|
||||
);
|
||||
i += vstep*4;
|
||||
}
|
||||
vsum0 = v_add_f64(
|
||||
v_add_f64(vsum0, vsum1), v_add_f64(vsum2 , vsum3)
|
||||
);
|
||||
while(i < unrollx)
|
||||
{
|
||||
vsum0 = v_muladd_f64(
|
||||
v_loadu_f64(x + i), v_loadu_f64(y + i), vsum0
|
||||
);
|
||||
i += vstep;
|
||||
}
|
||||
dot = v_sum_f64(vsum0);
|
||||
#elif V_SIMD && !defined(DSDOT)
|
||||
const int vstep = v_nlanes_f32;
|
||||
const int unrollx4 = n & (-vstep * 4);
|
||||
const int unrollx = n & -vstep;
|
||||
v_f32 vsum0 = v_zero_f32();
|
||||
v_f32 vsum1 = v_zero_f32();
|
||||
v_f32 vsum2 = v_zero_f32();
|
||||
v_f32 vsum3 = v_zero_f32();
|
||||
@@ -82,10 +117,54 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
|
||||
i += vstep;
|
||||
}
|
||||
dot = v_sum_f32(vsum0);
|
||||
#elif defined(DSDOT)
|
||||
int n1 = n & -4;
|
||||
for (; i < n1; i += 4)
|
||||
{
|
||||
#elif defined(DSDOT) && defined(ARCH_WASM) && V_SIMD && V_SIMD_F64
|
||||
const int vstep = v_nlanes_f32;
|
||||
const int unrollx4 = n & (-vstep * 4);
|
||||
const int unrollx = n & -vstep;
|
||||
v_f64 vsum0_lo = v_zero_f64();
|
||||
v_f64 vsum0_hi = v_zero_f64();
|
||||
v_f64 vsum1_lo = v_zero_f64();
|
||||
v_f64 vsum1_hi = v_zero_f64();
|
||||
v_f64 vsum2_lo = v_zero_f64();
|
||||
v_f64 vsum2_hi = v_zero_f64();
|
||||
v_f64 vsum3_lo = v_zero_f64();
|
||||
v_f64 vsum3_hi = v_zero_f64();
|
||||
while(i < unrollx4)
|
||||
{
|
||||
v_f32 vx0 = v_loadu_f32(x + i);
|
||||
v_f32 vy0 = v_loadu_f32(y + i);
|
||||
v_f32 vx1 = v_loadu_f32(x + i + vstep);
|
||||
v_f32 vy1 = v_loadu_f32(y + i + vstep);
|
||||
v_f32 vx2 = v_loadu_f32(x + i + vstep*2);
|
||||
v_f32 vy2 = v_loadu_f32(y + i + vstep*2);
|
||||
v_f32 vx3 = v_loadu_f32(x + i + vstep*3);
|
||||
v_f32 vy3 = v_loadu_f32(y + i + vstep*3);
|
||||
|
||||
vsum0_lo = v_muladd_f64(v_cvt_f32_f64_lo(vx0), v_cvt_f32_f64_lo(vy0), vsum0_lo);
|
||||
vsum0_hi = v_muladd_f64(v_cvt_f32_f64_hi(vx0), v_cvt_f32_f64_hi(vy0), vsum0_hi);
|
||||
vsum1_lo = v_muladd_f64(v_cvt_f32_f64_lo(vx1), v_cvt_f32_f64_lo(vy1), vsum1_lo);
|
||||
vsum1_hi = v_muladd_f64(v_cvt_f32_f64_hi(vx1), v_cvt_f32_f64_hi(vy1), vsum1_hi);
|
||||
vsum2_lo = v_muladd_f64(v_cvt_f32_f64_lo(vx2), v_cvt_f32_f64_lo(vy2), vsum2_lo);
|
||||
vsum2_hi = v_muladd_f64(v_cvt_f32_f64_hi(vx2), v_cvt_f32_f64_hi(vy2), vsum2_hi);
|
||||
vsum3_lo = v_muladd_f64(v_cvt_f32_f64_lo(vx3), v_cvt_f32_f64_lo(vy3), vsum3_lo);
|
||||
vsum3_hi = v_muladd_f64(v_cvt_f32_f64_hi(vx3), v_cvt_f32_f64_hi(vy3), vsum3_hi);
|
||||
i += vstep*4;
|
||||
}
|
||||
vsum0_lo = v_add_f64(v_add_f64(vsum0_lo, vsum1_lo), v_add_f64(vsum2_lo, vsum3_lo));
|
||||
vsum0_hi = v_add_f64(v_add_f64(vsum0_hi, vsum1_hi), v_add_f64(vsum2_hi, vsum3_hi));
|
||||
while(i < unrollx)
|
||||
{
|
||||
v_f32 vx = v_loadu_f32(x + i);
|
||||
v_f32 vy = v_loadu_f32(y + i);
|
||||
vsum0_lo = v_muladd_f64(v_cvt_f32_f64_lo(vx), v_cvt_f32_f64_lo(vy), vsum0_lo);
|
||||
vsum0_hi = v_muladd_f64(v_cvt_f32_f64_hi(vx), v_cvt_f32_f64_hi(vy), vsum0_hi);
|
||||
i += vstep;
|
||||
}
|
||||
dot = v_sum_f64(vsum0_lo) + v_sum_f64(vsum0_hi);
|
||||
#elif defined(DSDOT)
|
||||
int n1 = n & -4;
|
||||
for (; i < n1; i += 4)
|
||||
{
|
||||
dot += (double) y[i] * (double) x[i]
|
||||
+ (double) y[i+1] * (double) x[i+1]
|
||||
+ (double) y[i+2] * (double) x[i+2]
|
||||
@@ -133,5 +212,3 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
|
||||
return(dot);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,6 +30,12 @@
|
||||
|
||||
#include "conversion_macros.h"
|
||||
|
||||
#ifdef BGEMM
|
||||
#define C_TO_F32 TO_F32
|
||||
#else
|
||||
#define C_TO_F32
|
||||
#endif
|
||||
|
||||
int CNAME(BLASLONG bm,BLASLONG bn,BLASLONG bk,FLOAT alpha,IFLOAT* ba,IFLOAT* bb,FLOAT* C,BLASLONG ldc
|
||||
#ifdef TRMMKERNEL
|
||||
,BLASLONG offset
|
||||
@@ -108,13 +114,13 @@ int CNAME(BLASLONG bm,BLASLONG bn,BLASLONG bk,FLOAT alpha,IFLOAT* ba,IFLOAT* bb,
|
||||
ptrbb = ptrbb+2;
|
||||
}
|
||||
res0 = res0*ALPHA;
|
||||
C0[0] = TO_OUTPUT(TO_F32(C0[0])+res0);
|
||||
C0[0] = TO_OUTPUT(C_TO_F32(C0[0])+res0);
|
||||
res1 = res1*ALPHA;
|
||||
C0[1] = TO_OUTPUT(TO_F32(C0[1])+res1);
|
||||
C0[1] = TO_OUTPUT(C_TO_F32(C0[1])+res1);
|
||||
res2 = res2*ALPHA;
|
||||
C1[0] = TO_OUTPUT(TO_F32(C1[0])+res2);
|
||||
C1[0] = TO_OUTPUT(C_TO_F32(C1[0])+res2);
|
||||
res3 = res3*ALPHA;
|
||||
C1[1] = TO_OUTPUT(TO_F32(C1[1])+res3);
|
||||
C1[1] = TO_OUTPUT(C_TO_F32(C1[1])+res3);
|
||||
C0 = C0+2;
|
||||
C1 = C1+2;
|
||||
}
|
||||
@@ -134,9 +140,9 @@ int CNAME(BLASLONG bm,BLASLONG bn,BLASLONG bk,FLOAT alpha,IFLOAT* ba,IFLOAT* bb,
|
||||
ptrbb = ptrbb+2;
|
||||
}
|
||||
res0 = res0*ALPHA;
|
||||
C0[0] = TO_OUTPUT(TO_F32(C0[0])+res0);
|
||||
C0[0] = TO_OUTPUT(C_TO_F32(C0[0])+res0);
|
||||
res1 = res1*ALPHA;
|
||||
C1[0] = TO_OUTPUT(TO_F32(C1[0])+res1);
|
||||
C1[0] = TO_OUTPUT(C_TO_F32(C1[0])+res1);
|
||||
C0 = C0+1;
|
||||
C1 = C1+1;
|
||||
}
|
||||
@@ -165,9 +171,9 @@ int CNAME(BLASLONG bm,BLASLONG bn,BLASLONG bk,FLOAT alpha,IFLOAT* ba,IFLOAT* bb,
|
||||
ptrbb = ptrbb+1;
|
||||
}
|
||||
res0 = res0*ALPHA;
|
||||
C0[0] = TO_OUTPUT(TO_F32(C0[0])+res0);
|
||||
C0[0] = TO_OUTPUT(C_TO_F32(C0[0])+res0);
|
||||
res1 = res1*ALPHA;
|
||||
C0[1] = TO_OUTPUT(TO_F32(C0[1])+res1);
|
||||
C0[1] = TO_OUTPUT(C_TO_F32(C0[1])+res1);
|
||||
C0 = C0+2;
|
||||
}
|
||||
for (i=0; i<(bm&1); i+=1)
|
||||
@@ -183,7 +189,7 @@ int CNAME(BLASLONG bm,BLASLONG bn,BLASLONG bk,FLOAT alpha,IFLOAT* ba,IFLOAT* bb,
|
||||
ptrbb = ptrbb+1;
|
||||
}
|
||||
res0 = res0*ALPHA;
|
||||
C0[0] = TO_OUTPUT(TO_F32(C0[0])+res0);
|
||||
C0[0] = TO_OUTPUT(C_TO_F32(C0[0])+res0);
|
||||
C0 = C0+1;
|
||||
}
|
||||
k = (bk<<0);
|
||||
|
||||
+4
-4
@@ -1,17 +1,17 @@
|
||||
ifndef SNRM2KERNEL
|
||||
SNRM2KERNEL = nrm2.c
|
||||
SNRM2KERNEL = ../arm/nrm2.c
|
||||
endif
|
||||
|
||||
ifndef DNRM2KERNEL
|
||||
DNRM2KERNEL = nrm2.c
|
||||
DNRM2KERNEL = ../arm/nrm2.c
|
||||
endif
|
||||
|
||||
ifndef CNRM2KERNEL
|
||||
CNRM2KERNEL = znrm2.c
|
||||
CNRM2KERNEL = ../arm/znrm2.c
|
||||
endif
|
||||
|
||||
ifndef ZNRM2KERNEL
|
||||
ZNRM2KERNEL = znrm2.c
|
||||
ZNRM2KERNEL = ../arm/znrm2.c
|
||||
endif
|
||||
|
||||
ifndef SCABS_KERNEL
|
||||
|
||||
+88
-91
@@ -1,50 +1,13 @@
|
||||
SAMAXKERNEL = ../mips/amax.c
|
||||
DAMAXKERNEL = ../mips/amax.c
|
||||
CAMAXKERNEL = ../mips/zamax.c
|
||||
ZAMAXKERNEL = ../mips/zamax.c
|
||||
|
||||
SAMINKERNEL = ../mips/amin.c
|
||||
DAMINKERNEL = ../mips/amin.c
|
||||
CAMINKERNEL = ../mips/zamin.c
|
||||
ZAMINKERNEL = ../mips/zamin.c
|
||||
|
||||
SMAXKERNEL = ../mips/max.c
|
||||
DMAXKERNEL = ../mips/max.c
|
||||
|
||||
SMINKERNEL = ../mips/min.c
|
||||
DMINKERNEL = ../mips/min.c
|
||||
|
||||
ISAMAXKERNEL = ../mips/iamax.c
|
||||
IDAMAXKERNEL = ../mips/iamax.c
|
||||
ICAMAXKERNEL = ../mips/izamax.c
|
||||
IZAMAXKERNEL = ../mips/izamax.c
|
||||
|
||||
ISAMINKERNEL = ../mips/iamin.c
|
||||
IDAMINKERNEL = ../mips/iamin.c
|
||||
ICAMINKERNEL = ../mips/izamin.c
|
||||
IZAMINKERNEL = ../mips/izamin.c
|
||||
|
||||
ISMAXKERNEL = ../mips/imax.c
|
||||
IDMAXKERNEL = ../mips/imax.c
|
||||
|
||||
ISMINKERNEL = ../mips/imin.c
|
||||
IDMINKERNEL = ../mips/imin.c
|
||||
|
||||
SSUMKERNEL = ../mips/sum.c
|
||||
DSUMKERNEL = ../mips/sum.c
|
||||
CSUMKERNEL = ../mips/zsum.c
|
||||
ZSUMKERNEL = ../mips/zsum.c
|
||||
|
||||
ifndef NO_MSA
|
||||
SASUMKERNEL = ../mips/sasum_msa.c
|
||||
DASUMKERNEL = ../mips/dasum_msa.c
|
||||
CASUMKERNEL = ../mips/casum_msa.c
|
||||
ZASUMKERNEL = ../mips/zasum_msa.c
|
||||
else
|
||||
SASUMKERNEL = ../mips/asum.c
|
||||
DASUMKERNEL = ../mips/asum.c
|
||||
CASUMKERNEL = ../mips/zasum.c
|
||||
ZASUMKERNEL = ../mips/zasum.c
|
||||
SASUMKERNEL = ../arm/asum.c
|
||||
DASUMKERNEL = ../arm/asum.c
|
||||
CASUMKERNEL = ../arm/zasum.c
|
||||
ZASUMKERNEL = ../arm/zasum.c
|
||||
endif
|
||||
|
||||
ifndef NO_MSA
|
||||
@@ -53,10 +16,10 @@ DAXPYKERNEL = ../mips/daxpy_msa.c
|
||||
CAXPYKERNEL = ../mips/caxpy_msa.c
|
||||
ZAXPYKERNEL = ../mips/zaxpy_msa.c
|
||||
else
|
||||
SAXPYKERNEL = ../mips/axpy.c
|
||||
DAXPYKERNEL = ../mips/axpy.c
|
||||
CAXPYKERNEL = ../mips/zaxpy.c
|
||||
ZAXPYKERNEL = ../mips/zaxpy.c
|
||||
SAXPYKERNEL = ../arm/axpy.c
|
||||
DAXPYKERNEL = ../arm/axpy.c
|
||||
CAXPYKERNEL = ../arm/zaxpy.c
|
||||
ZAXPYKERNEL = ../arm/zaxpy.c
|
||||
endif
|
||||
|
||||
ifndef NO_MSA
|
||||
@@ -65,10 +28,10 @@ DCOPYKERNEL = ../mips/dcopy_msa.c
|
||||
CCOPYKERNEL = ../mips/ccopy_msa.c
|
||||
ZCOPYKERNEL = ../mips/zcopy_msa.c
|
||||
else
|
||||
SCOPYKERNEL = ../mips/copy.c
|
||||
DCOPYKERNEL = ../mips/copy.c
|
||||
CCOPYKERNEL = ../mips/zcopy.c
|
||||
ZCOPYKERNEL = ../mips/zcopy.c
|
||||
SCOPYKERNEL = ../arm/copy.c
|
||||
DCOPYKERNEL = ../arm/copy.c
|
||||
CCOPYKERNEL = ../arm/zcopy.c
|
||||
ZCOPYKERNEL = ../arm/zcopy.c
|
||||
endif
|
||||
|
||||
ifndef NO_MSA
|
||||
@@ -77,16 +40,16 @@ DDOTKERNEL = ../mips/ddot_msa.c
|
||||
CDOTKERNEL = ../mips/cdot_msa.c
|
||||
ZDOTKERNEL = ../mips/zdot_msa.c
|
||||
else
|
||||
SDOTKERNEL = ../mips/dot.c
|
||||
DDOTKERNEL = ../mips/dot.c
|
||||
CDOTKERNEL = ../mips/zdot.c
|
||||
ZDOTKERNEL = ../mips/zdot.c
|
||||
SDOTKERNEL = ../arm/dot.c
|
||||
DDOTKERNEL = ../arm/dot.c
|
||||
CDOTKERNEL = ../arm/zdot.c
|
||||
ZDOTKERNEL = ../arm/zdot.c
|
||||
endif
|
||||
|
||||
SNRM2KERNEL = ../mips/nrm2.c
|
||||
DNRM2KERNEL = ../mips/nrm2.c
|
||||
CNRM2KERNEL = ../mips/znrm2.c
|
||||
ZNRM2KERNEL = ../mips/znrm2.c
|
||||
SNRM2KERNEL = ../arm/nrm2.c
|
||||
DNRM2KERNEL = ../arm/nrm2.c
|
||||
CNRM2KERNEL = ../arm/znrm2.c
|
||||
ZNRM2KERNEL = ../arm/znrm2.c
|
||||
|
||||
ifndef NO_MSA
|
||||
SROTKERNEL = ../mips/srot_msa.c
|
||||
@@ -94,10 +57,10 @@ DROTKERNEL = ../mips/drot_msa.c
|
||||
CROTKERNEL = ../mips/crot_msa.c
|
||||
ZROTKERNEL = ../mips/zrot_msa.c
|
||||
else
|
||||
SROTKERNEL = ../mips/rot.c
|
||||
DROTKERNEL = ../mips/rot.c
|
||||
CROTKERNEL = ../mips/zrot.c
|
||||
ZROTKERNEL = ../mips/zrot.c
|
||||
SROTKERNEL = ../arm/rot.c
|
||||
DROTKERNEL = ../arm/rot.c
|
||||
CROTKERNEL = ../arm/zrot.c
|
||||
ZROTKERNEL = ../arm/zrot.c
|
||||
endif
|
||||
|
||||
ifndef NO_MSA
|
||||
@@ -105,13 +68,13 @@ SSCALKERNEL = ../mips/sscal_msa.c
|
||||
DSCALKERNEL = ../mips/dscal_msa.c
|
||||
#CSCALKERNEL = ../mips/cscal_msa.c
|
||||
#ZSCALKERNEL = ../mips/zscal_msa.c
|
||||
CSCALKERNEL = ../mips/zscal.c
|
||||
ZSCALKERNEL = ../mips/zscal.c
|
||||
CSCALKERNEL = ../arm/zscal.c
|
||||
ZSCALKERNEL = ../arm/zscal.c
|
||||
else
|
||||
SSCALKERNEL = ../mips/scal.c
|
||||
DSCALKERNEL = ../mips/scal.c
|
||||
CSCALKERNEL = ../mips/zscal.c
|
||||
ZSCALKERNEL = ../mips/zscal.c
|
||||
SSCALKERNEL = ../arm/scal.c
|
||||
DSCALKERNEL = ../arm/scal.c
|
||||
CSCALKERNEL = ../arm/zscal.c
|
||||
ZSCALKERNEL = ../arm/zscal.c
|
||||
endif
|
||||
|
||||
ifndef NO_MSA
|
||||
@@ -120,10 +83,10 @@ DSWAPKERNEL = ../mips/dswap_msa.c
|
||||
CSWAPKERNEL = ../mips/cswap_msa.c
|
||||
ZSWAPKERNEL = ../mips/zswap_msa.c
|
||||
else
|
||||
SSWAPKERNEL = ../mips/swap.c
|
||||
DSWAPKERNEL = ../mips/swap.c
|
||||
CSWAPKERNEL = ../mips/zswap.c
|
||||
ZSWAPKERNEL = ../mips/zswap.c
|
||||
SSWAPKERNEL = ../arm/swap.c
|
||||
DSWAPKERNEL = ../arm/swap.c
|
||||
CSWAPKERNEL = ../arm/zswap.c
|
||||
ZSWAPKERNEL = ../arm/zswap.c
|
||||
endif
|
||||
|
||||
ifndef NO_MSA
|
||||
@@ -132,10 +95,10 @@ DGEMVNKERNEL = ../mips/dgemv_n_msa.c
|
||||
CGEMVNKERNEL = ../mips/cgemv_n_msa.c
|
||||
ZGEMVNKERNEL = ../mips/zgemv_n_msa.c
|
||||
else
|
||||
SGEMVNKERNEL = ../mips/gemv_n.c
|
||||
DGEMVNKERNEL = ../mips/gemv_n.c
|
||||
CGEMVNKERNEL = ../mips/zgemv_n.c
|
||||
ZGEMVNKERNEL = ../mips/zgemv_n.c
|
||||
SGEMVNKERNEL = ../arm/gemv_n.c
|
||||
DGEMVNKERNEL = ../arm/gemv_n.c
|
||||
CGEMVNKERNEL = ../arm/zgemv_n.c
|
||||
ZGEMVNKERNEL = ../arm/zgemv_n.c
|
||||
endif
|
||||
|
||||
ifndef NO_MSA
|
||||
@@ -144,25 +107,24 @@ DGEMVTKERNEL = ../mips/dgemv_t_msa.c
|
||||
CGEMVTKERNEL = ../mips/cgemv_t_msa.c
|
||||
ZGEMVTKERNEL = ../mips/zgemv_t_msa.c
|
||||
else
|
||||
SGEMVTKERNEL = ../mips/gemv_t.c
|
||||
DGEMVTKERNEL = ../mips/gemv_t.c
|
||||
CGEMVTKERNEL = ../mips/zgemv_t.c
|
||||
ZGEMVTKERNEL = ../mips/zgemv_t.c
|
||||
SGEMVTKERNEL = ../arm/gemv_t.c
|
||||
DGEMVTKERNEL = ../arm/gemv_t.c
|
||||
CGEMVTKERNEL = ../arm/zgemv_t.c
|
||||
ZGEMVTKERNEL = ../arm/zgemv_t.c
|
||||
endif
|
||||
|
||||
ifndef NO_MSA
|
||||
SGEMMKERNEL = ../mips/sgemm_kernel_8x8_msa.c
|
||||
SGEMMONCOPY = ../mips/sgemm_ncopy_8_msa.c
|
||||
SGEMMOTCOPY = ../mips/sgemm_tcopy_8_msa.c
|
||||
SGEMMONCOPYOBJ = sgemm_oncopy.o
|
||||
SGEMMOTCOPYOBJ = sgemm_otcopy.o
|
||||
else
|
||||
SGEMMKERNEL = ../generic/gemmkernel_2x2.c
|
||||
SGEMMONCOPY = ../generic/gemm_ncopy_2.c
|
||||
SGEMMOTCOPY = ../generic/gemm_tcopy_2.c
|
||||
endif
|
||||
|
||||
SGEMMONCOPYOBJ = sgemm_oncopy.o
|
||||
SGEMMOTCOPYOBJ = sgemm_otcopy.o
|
||||
endif
|
||||
|
||||
ifndef NO_MSA
|
||||
DGEMMKERNEL = ../mips/dgemm_kernel_8x4_msa.c
|
||||
@@ -172,15 +134,14 @@ DGEMMONCOPY = ../mips/dgemm_ncopy_4_msa.c
|
||||
DGEMMOTCOPY = ../mips/dgemm_tcopy_4_msa.c
|
||||
DGEMMINCOPYOBJ = dgemm_incopy.o
|
||||
DGEMMITCOPYOBJ = dgemm_itcopy.o
|
||||
DGEMMONCOPYOBJ = dgemm_oncopy.o
|
||||
DGEMMOTCOPYOBJ = dgemm_otcopy.o
|
||||
else
|
||||
DGEMMKERNEL = ../generic/gemmkernel_2x2.c
|
||||
DGEMMONCOPY = ../generic/gemm_ncopy_2.c
|
||||
DGEMMOTCOPY = ../generic/gemm_tcopy_2.c
|
||||
endif
|
||||
|
||||
DGEMMONCOPYOBJ = dgemm_oncopy.o
|
||||
DGEMMOTCOPYOBJ = dgemm_otcopy.o
|
||||
endif
|
||||
|
||||
ifndef NO_MSA
|
||||
CGEMMKERNEL = ../mips/cgemm_kernel_8x4_msa.c
|
||||
@@ -190,29 +151,27 @@ CGEMMONCOPY = ../mips/cgemm_ncopy_4_msa.c
|
||||
CGEMMOTCOPY = ../mips/cgemm_tcopy_4_msa.c
|
||||
CGEMMINCOPYOBJ = cgemm_incopy.o
|
||||
CGEMMITCOPYOBJ = cgemm_itcopy.o
|
||||
CGEMMONCOPYOBJ = cgemm_oncopy.o
|
||||
CGEMMOTCOPYOBJ = cgemm_otcopy.o
|
||||
else
|
||||
CGEMMKERNEL = ../generic/zgemmkernel_2x2.c
|
||||
CGEMMONCOPY = ../generic/zgemm_ncopy_2.c
|
||||
CGEMMOTCOPY = ../generic/zgemm_tcopy_2.c
|
||||
endif
|
||||
|
||||
CGEMMONCOPYOBJ = cgemm_oncopy.o
|
||||
CGEMMOTCOPYOBJ = cgemm_otcopy.o
|
||||
endif
|
||||
|
||||
ifndef NO_MSA
|
||||
ZGEMMKERNEL = ../mips/zgemm_kernel_4x4_msa.c
|
||||
ZGEMMONCOPY = ../mips/zgemm_ncopy_4_msa.c
|
||||
ZGEMMOTCOPY = ../mips/zgemm_tcopy_4_msa.c
|
||||
ZGEMMONCOPYOBJ = zgemm_oncopy.o
|
||||
ZGEMMOTCOPYOBJ = zgemm_otcopy.o
|
||||
else
|
||||
ZGEMMKERNEL = ../generic/zgemmkernel_2x2.c
|
||||
ZGEMMONCOPY = ../generic/zgemm_ncopy_2.c
|
||||
ZGEMMOTCOPY = ../generic/zgemm_tcopy_2.c
|
||||
endif
|
||||
|
||||
ZGEMMONCOPYOBJ = zgemm_oncopy.o
|
||||
ZGEMMOTCOPYOBJ = zgemm_otcopy.o
|
||||
endif
|
||||
|
||||
ifndef NO_MSA
|
||||
STRSMKERNEL_LN = ../mips/strsm_kernel_LN_8x8_msa.c
|
||||
@@ -261,3 +220,41 @@ ZTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
|
||||
ZTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
|
||||
ZTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
|
||||
endif
|
||||
|
||||
#Pure C for other kernels
|
||||
SAMAXKERNEL = ../arm/amax.c
|
||||
DAMAXKERNEL = ../arm/amax.c
|
||||
CAMAXKERNEL = ../arm/zamax.c
|
||||
ZAMAXKERNEL = ../arm/zamax.c
|
||||
|
||||
SAMINKERNEL = ../arm/amin.c
|
||||
DAMINKERNEL = ../arm/amin.c
|
||||
CAMINKERNEL = ../arm/zamin.c
|
||||
ZAMINKERNEL = ../arm/zamin.c
|
||||
|
||||
SMAXKERNEL = ../arm/max.c
|
||||
DMAXKERNEL = ../arm/max.c
|
||||
|
||||
SMINKERNEL = ../arm/min.c
|
||||
DMINKERNEL = ../arm/min.c
|
||||
|
||||
ISAMAXKERNEL = ../arm/iamax.c
|
||||
IDAMAXKERNEL = ../arm/iamax.c
|
||||
ICAMAXKERNEL = ../arm/izamax.c
|
||||
IZAMAXKERNEL = ../arm/izamax.c
|
||||
|
||||
ISAMINKERNEL = ../arm/iamin.c
|
||||
IDAMINKERNEL = ../arm/iamin.c
|
||||
ICAMINKERNEL = ../arm/izamin.c
|
||||
IZAMINKERNEL = ../arm/izamin.c
|
||||
|
||||
ISMAXKERNEL = ../arm/imax.c
|
||||
IDMAXKERNEL = ../arm/imax.c
|
||||
|
||||
ISMINKERNEL = ../arm/imin.c
|
||||
IDMINKERNEL = ../arm/imin.c
|
||||
|
||||
SSUMKERNEL = ../arm/sum.c
|
||||
DSUMKERNEL = ../arm/sum.c
|
||||
CSUMKERNEL = ../arm/zsum.c
|
||||
ZSUMKERNEL = ../arm/zsum.c
|
||||
|
||||
+68
-68
@@ -53,92 +53,92 @@ ZTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
|
||||
ZTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
|
||||
|
||||
#Pure C for other kernels
|
||||
SAMAXKERNEL = ../mips/amax.c
|
||||
DAMAXKERNEL = ../mips/amax.c
|
||||
CAMAXKERNEL = ../mips/zamax.c
|
||||
ZAMAXKERNEL = ../mips/zamax.c
|
||||
SAMAXKERNEL = ../arm/amax.c
|
||||
DAMAXKERNEL = ../arm/amax.c
|
||||
CAMAXKERNEL = ../arm/zamax.c
|
||||
ZAMAXKERNEL = ../arm/zamax.c
|
||||
|
||||
SAMINKERNEL = ../mips/amin.c
|
||||
DAMINKERNEL = ../mips/amin.c
|
||||
CAMINKERNEL = ../mips/zamin.c
|
||||
ZAMINKERNEL = ../mips/zamin.c
|
||||
SAMINKERNEL = ../arm/amin.c
|
||||
DAMINKERNEL = ../arm/amin.c
|
||||
CAMINKERNEL = ../arm/zamin.c
|
||||
ZAMINKERNEL = ../arm/zamin.c
|
||||
|
||||
SMAXKERNEL = ../mips/max.c
|
||||
DMAXKERNEL = ../mips/max.c
|
||||
SMAXKERNEL = ../arm/max.c
|
||||
DMAXKERNEL = ../arm/max.c
|
||||
|
||||
SMINKERNEL = ../mips/min.c
|
||||
DMINKERNEL = ../mips/min.c
|
||||
SMINKERNEL = ../arm/min.c
|
||||
DMINKERNEL = ../arm/min.c
|
||||
|
||||
ISAMAXKERNEL = ../mips/iamax.c
|
||||
IDAMAXKERNEL = ../mips/iamax.c
|
||||
ICAMAXKERNEL = ../mips/izamax.c
|
||||
IZAMAXKERNEL = ../mips/izamax.c
|
||||
ISAMAXKERNEL = ../arm/iamax.c
|
||||
IDAMAXKERNEL = ../arm/iamax.c
|
||||
ICAMAXKERNEL = ../arm/izamax.c
|
||||
IZAMAXKERNEL = ../arm/izamax.c
|
||||
|
||||
ISAMINKERNEL = ../mips/iamin.c
|
||||
IDAMINKERNEL = ../mips/iamin.c
|
||||
ICAMINKERNEL = ../mips/izamin.c
|
||||
IZAMINKERNEL = ../mips/izamin.c
|
||||
ISAMINKERNEL = ../arm/iamin.c
|
||||
IDAMINKERNEL = ../arm/iamin.c
|
||||
ICAMINKERNEL = ../arm/izamin.c
|
||||
IZAMINKERNEL = ../arm/izamin.c
|
||||
|
||||
ISMAXKERNEL = ../mips/imax.c
|
||||
IDMAXKERNEL = ../mips/imax.c
|
||||
ISMAXKERNEL = ../arm/imax.c
|
||||
IDMAXKERNEL = ../arm/imax.c
|
||||
|
||||
ISMINKERNEL = ../mips/imin.c
|
||||
IDMINKERNEL = ../mips/imin.c
|
||||
ISMINKERNEL = ../arm/imin.c
|
||||
IDMINKERNEL = ../arm/imin.c
|
||||
|
||||
SASUMKERNEL = ../mips/asum.c
|
||||
DASUMKERNEL = ../mips/asum.c
|
||||
CASUMKERNEL = ../mips/zasum.c
|
||||
ZASUMKERNEL = ../mips/zasum.c
|
||||
SASUMKERNEL = ../arm/asum.c
|
||||
DASUMKERNEL = ../arm/asum.c
|
||||
CASUMKERNEL = ../arm/zasum.c
|
||||
ZASUMKERNEL = ../arm/zasum.c
|
||||
|
||||
SSUMKERNEL = ../mips/sum.c
|
||||
DSUMKERNEL = ../mips/sum.c
|
||||
CSUMKERNEL = ../mips/zsum.c
|
||||
ZSUMKERNEL = ../mips/zsum.c
|
||||
SSUMKERNEL = ../arm/sum.c
|
||||
DSUMKERNEL = ../arm/sum.c
|
||||
CSUMKERNEL = ../arm/zsum.c
|
||||
ZSUMKERNEL = ../arm/zsum.c
|
||||
|
||||
SAXPYKERNEL = ../mips/axpy.c
|
||||
DAXPYKERNEL = ../mips/axpy.c
|
||||
CAXPYKERNEL = ../mips/zaxpy.c
|
||||
ZAXPYKERNEL = ../mips/zaxpy.c
|
||||
SAXPYKERNEL = ../arm/axpy.c
|
||||
DAXPYKERNEL = ../arm/axpy.c
|
||||
CAXPYKERNEL = ../arm/zaxpy.c
|
||||
ZAXPYKERNEL = ../arm/zaxpy.c
|
||||
|
||||
SCOPYKERNEL = ../mips/copy.c
|
||||
DCOPYKERNEL = ../mips/copy.c
|
||||
CCOPYKERNEL = ../mips/zcopy.c
|
||||
ZCOPYKERNEL = ../mips/zcopy.c
|
||||
SCOPYKERNEL = ../arm/copy.c
|
||||
DCOPYKERNEL = ../arm/copy.c
|
||||
CCOPYKERNEL = ../arm/zcopy.c
|
||||
ZCOPYKERNEL = ../arm/zcopy.c
|
||||
|
||||
SDOTKERNEL = ../mips/dot.c
|
||||
DDOTKERNEL = ../mips/dot.c
|
||||
CDOTKERNEL = ../mips/zdot.c
|
||||
ZDOTKERNEL = ../mips/zdot.c
|
||||
SDOTKERNEL = ../arm/dot.c
|
||||
DDOTKERNEL = ../arm/dot.c
|
||||
CDOTKERNEL = ../arm/zdot.c
|
||||
ZDOTKERNEL = ../arm/zdot.c
|
||||
|
||||
SNRM2KERNEL = ../mips/nrm2.c
|
||||
DNRM2KERNEL = ../mips/nrm2.c
|
||||
CNRM2KERNEL = ../mips/znrm2.c
|
||||
ZNRM2KERNEL = ../mips/znrm2.c
|
||||
SNRM2KERNEL = ../arm/nrm2.c
|
||||
DNRM2KERNEL = ../arm/nrm2.c
|
||||
CNRM2KERNEL = ../arm/znrm2.c
|
||||
ZNRM2KERNEL = ../arm/znrm2.c
|
||||
|
||||
SROTKERNEL = ../mips/rot.c
|
||||
DROTKERNEL = ../mips/rot.c
|
||||
CROTKERNEL = ../mips/zrot.c
|
||||
ZROTKERNEL = ../mips/zrot.c
|
||||
SROTKERNEL = ../arm/rot.c
|
||||
DROTKERNEL = ../arm/rot.c
|
||||
CROTKERNEL = ../arm/zrot.c
|
||||
ZROTKERNEL = ../arm/zrot.c
|
||||
|
||||
SSCALKERNEL = ../mips/scal.c
|
||||
DSCALKERNEL = ../mips/scal.c
|
||||
CSCALKERNEL = ../mips/zscal.c
|
||||
ZSCALKERNEL = ../mips/zscal.c
|
||||
SSCALKERNEL = ../arm/scal.c
|
||||
DSCALKERNEL = ../arm/scal.c
|
||||
CSCALKERNEL = ../arm/zscal.c
|
||||
ZSCALKERNEL = ../arm/zscal.c
|
||||
|
||||
SSWAPKERNEL = ../mips/swap.c
|
||||
DSWAPKERNEL = ../mips/swap.c
|
||||
CSWAPKERNEL = ../mips/zswap.c
|
||||
ZSWAPKERNEL = ../mips/zswap.c
|
||||
SSWAPKERNEL = ../arm/swap.c
|
||||
DSWAPKERNEL = ../arm/swap.c
|
||||
CSWAPKERNEL = ../arm/zswap.c
|
||||
ZSWAPKERNEL = ../arm/zswap.c
|
||||
|
||||
SGEMVNKERNEL = ../mips/gemv_n.c
|
||||
DGEMVNKERNEL = ../mips/gemv_n.c
|
||||
CGEMVNKERNEL = ../mips/zgemv_n.c
|
||||
ZGEMVNKERNEL = ../mips/zgemv_n.c
|
||||
SGEMVNKERNEL = ../arm/gemv_n.c
|
||||
DGEMVNKERNEL = ../arm/gemv_n.c
|
||||
CGEMVNKERNEL = ../arm/zgemv_n.c
|
||||
ZGEMVNKERNEL = ../arm/zgemv_n.c
|
||||
|
||||
SGEMVTKERNEL = ../mips/gemv_t.c
|
||||
DGEMVTKERNEL = ../mips/gemv_t.c
|
||||
CGEMVTKERNEL = ../mips/zgemv_t.c
|
||||
ZGEMVTKERNEL = ../mips/zgemv_t.c
|
||||
SGEMVTKERNEL = ../arm/gemv_t.c
|
||||
DGEMVTKERNEL = ../arm/gemv_t.c
|
||||
CGEMVTKERNEL = ../arm/zgemv_t.c
|
||||
ZGEMVTKERNEL = ../arm/zgemv_t.c
|
||||
|
||||
SSYMV_U_KERNEL = ../generic/symv_k.c
|
||||
SSYMV_L_KERNEL = ../generic/symv_k.c
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
/***************************************************************************
|
||||
Copyright (c) 2016, The OpenBLAS Project
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Neither the name of the OpenBLAS project nor the names of
|
||||
its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include "common.h"
|
||||
#include <math.h>
|
||||
|
||||
#if defined(DOUBLE)
|
||||
|
||||
#define ABS fabs
|
||||
|
||||
#else
|
||||
|
||||
#define ABS fabsf
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
|
||||
{
|
||||
BLASLONG i=0;
|
||||
BLASLONG ix=0;
|
||||
FLOAT maxf=0.0;
|
||||
|
||||
if (n <= 0 || inc_x <= 0) return(maxf);
|
||||
|
||||
maxf=ABS(x[0]);
|
||||
ix += inc_x;
|
||||
i++;
|
||||
|
||||
while(i < n)
|
||||
{
|
||||
if( ABS(x[ix]) > maxf )
|
||||
{
|
||||
maxf = ABS(x[ix]);
|
||||
}
|
||||
ix += inc_x;
|
||||
i++;
|
||||
}
|
||||
return(maxf);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
/***************************************************************************
|
||||
Copyright (c) 2016, The OpenBLAS Project
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Neither the name of the OpenBLAS project nor the names of
|
||||
its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include "common.h"
|
||||
#include <math.h>
|
||||
|
||||
#if defined(DOUBLE)
|
||||
|
||||
#define ABS fabs
|
||||
|
||||
#else
|
||||
|
||||
#define ABS fabsf
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
|
||||
{
|
||||
BLASLONG i=0;
|
||||
BLASLONG ix=0;
|
||||
FLOAT minf=0.0;
|
||||
|
||||
if (n <= 0 || inc_x <= 0) return(minf);
|
||||
|
||||
minf=ABS(x[0]);
|
||||
ix += inc_x;
|
||||
i++;
|
||||
|
||||
while(i < n)
|
||||
{
|
||||
if( ABS(x[ix]) < minf )
|
||||
{
|
||||
minf = ABS(x[ix]);
|
||||
}
|
||||
ix += inc_x;
|
||||
i++;
|
||||
}
|
||||
return(minf);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
/***************************************************************************
|
||||
Copyright (c) 2016, The OpenBLAS Project
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Neither the name of the OpenBLAS project nor the names of
|
||||
its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include "common.h"
|
||||
#include <math.h>
|
||||
|
||||
#if defined(DOUBLE)
|
||||
|
||||
#define ABS fabs
|
||||
|
||||
#else
|
||||
|
||||
#define ABS fabsf
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
|
||||
{
|
||||
BLASLONG i=0;
|
||||
FLOAT sumf = 0.0;
|
||||
if (n <= 0 || inc_x <= 0) return(sumf);
|
||||
|
||||
n *= inc_x;
|
||||
while(i < n)
|
||||
{
|
||||
sumf += ABS(x[i]);
|
||||
i += inc_x;
|
||||
}
|
||||
return(sumf);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user