diff --git a/.cirrus.yml b/.cirrus.yml
index 7a13d123fc..e8a0b85c02 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -156,7 +156,7 @@ FreeBSD_task:
image_family: freebsd-13-2
install_script:
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
- - ln -s /usr/local/lib/gcc12/libgfortran.so.5.0.0 /usr/lib/libgfortran.so
+ - ln -s /usr/local/lib/gcc13/libgfortran.so.5.0.0 /usr/lib/libgfortran.so
compile_script:
- gmake CC=clang FC=gfortran USE_OPENMP=1 CPP_THREAD_SAFETY_TEST=1
diff --git a/.github/workflows/c910v.yml b/.github/workflows/c910v.yml
index 68ba2ddd72..a47ca1dce6 100644
--- a/.github/workflows/c910v.yml
+++ b/.github/workflows/c910v.yml
@@ -84,6 +84,7 @@ jobs:
run: |
export PATH=$GITHUB_WORKSPACE/qemu-install/bin/:$PATH
qemu-riscv64 ./utest/openblas_utest
+ qemu-riscv64 ./utest/openblas_utest_ext
OPENBLAS_NUM_THREADS=2 qemu-riscv64 ./ctest/xscblat1
OPENBLAS_NUM_THREADS=2 qemu-riscv64 ./ctest/xdcblat1
OPENBLAS_NUM_THREADS=2 qemu-riscv64 ./ctest/xccblat1
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 0000000000..359281d4e8
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,24 @@
+name: Publish docs via GitHub Pages
+on:
+ push:
+ branches:
+ - develop
+jobs:
+ build:
+ name: Deploy docs
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-python@v2
+ with:
+ python-version: "3.10"
+ - run: pip install mkdocs mkdocs-material
+ # mkdocs gh-deploy command only builds to the top-level, hence building then deploying ourselves
+ - run: mkdocs build
+ - name: Deploy docs
+ uses: peaceiris/actions-gh-pages@v3
+ if: ${{ github.ref == 'refs/heads/develop' }}
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./site
+ destination_dir: docs/
diff --git a/.github/workflows/loongarch64.yml b/.github/workflows/loongarch64.yml
index f1bf8064c6..b23c81f965 100644
--- a/.github/workflows/loongarch64.yml
+++ b/.github/workflows/loongarch64.yml
@@ -77,6 +77,7 @@ jobs:
- name: Test
run: |
qemu-loongarch64-static ./utest/openblas_utest
+ qemu-loongarch64-static ./utest/openblas_utest_ext
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xscblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xdcblat1
OPENBLAS_NUM_THREADS=2 qemu-loongarch64-static ./ctest/xccblat1
diff --git a/.github/workflows/mips64.yml b/.github/workflows/mips64.yml
index 4686ba713a..1491aff78b 100644
--- a/.github/workflows/mips64.yml
+++ b/.github/workflows/mips64.yml
@@ -80,6 +80,7 @@ jobs:
run: |
export PATH=$GITHUB_WORKSPACE/qemu-install/bin/:$PATH
qemu-mips64el ./utest/openblas_utest
+ qemu-mips64el ./utest/openblas_utest_ext
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xscblat1
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xdcblat1
OPENBLAS_NUM_THREADS=2 qemu-mips64el ./ctest/xccblat1
diff --git a/.gitignore b/.gitignore
index 9fa6a2c998..dc6804f1ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,43 +51,55 @@ utest/openblas_utest_ext
ctest/xccblat1
ctest/xccblat2
ctest/xccblat3
+ctest/xccblat3_3m
ctest/xdcblat1
ctest/xdcblat2
ctest/xdcblat3
+ctest/xdcblat3_3m
ctest/xscblat1
ctest/xscblat2
ctest/xscblat3
+ctest/xscblat3_3m
ctest/xzcblat1
ctest/xzcblat2
ctest/xzcblat3
+ctest/xzcblat3_3m
exports/linktest.c
exports/linux.def
kernel/setparam_*.c
kernel/kernel_*.h
test/CBLAT2.SUMM
test/CBLAT3.SUMM
+test/CBLAT3_3M.SUMM
test/DBLAT2.SUMM
test/DBLAT3.SUMM
+test/DBLAT3_3M.SUMM
test/SBLAT2.SUMM
test/SBLAT3.SUMM
+test/SBLAT3_3M.SUMM
test/ZBLAT2.SUMM
test/ZBLAT3.SUMM
+test/ZBLAT3_3M.SUMM
test/SHBLAT3.SUMM
test/SBBLAT3.SUMM
test/cblat1
test/cblat2
test/cblat3
+test/cblat3_3m
test/dblat1
test/dblat2
test/dblat3
+test/dblat3_3m
test/sblat1
test/sblat2
test/sblat3
+test/sblat3_3m
test/test_shgemm
test/test_sbgemm
test/zblat1
test/zblat2
test/zblat3
+test/zblat3_3m
build
build.*
*.swp
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9fbe878e6c..07a3457cc2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@ project(OpenBLAS C ASM)
set(OpenBLAS_MAJOR_VERSION 0)
set(OpenBLAS_MINOR_VERSION 3)
-set(OpenBLAS_PATCH_VERSION 26.dev)
+set(OpenBLAS_PATCH_VERSION 27.dev)
set(OpenBLAS_VERSION "${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.${OpenBLAS_PATCH_VERSION}")
diff --git a/Changelog.txt b/Changelog.txt
index b6139d6b70..03c3cfbd97 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,4 +1,104 @@
OpenBLAS ChangeLog
+====================================================================
+Version 0.3.27
+ 4-Apr-2024
+
+general:
+- added initial (generic) support for the CSKY architecture
+- capped the maximum number of threads used in GEMM, GETRF and POTRF to avoid creating
+ underutilized or idle threads
+- sped up multithreaded POTRF on all platforms
+- added extension openblas_set_num_threads_local() that returns the previous thread count
+- re-evaluated the SGEMV and DGEMV load thresholds to avoid activating multithreading
+ for too small workloads
+- improved the fallback code used when the precompiled number of threads is exceeded,
+ and made it callable multiple times during the lifetime of an instance
+- added CBLAS interfaces for the BLAS extensions ?AMIN,?AMAX, CAXPYC and ZAXPYC
+- fixed a potential buffer overflow in the interface to the GEMMT kernels
+- fixed use of incompatible pointer types in GEMMT and C/ZAXPBY as flagged by GCC-14
+- fixed unwanted case sensitivity of the character parameters in ?TRTRS
+- sped up the OpenMP thread management code
+- fixed sizing of logical variables in INTERFACE64 builds of the C version of LAPACK
+- fixed inclusion of new LAPACK and LAPACKE functions from LAPACK 3.11 in the shared library
+- added a testsuite for the BLAS extensions
+- modified the error thresholds for SGS/DGS functions in the LAPACK testsuite to suppress
+ spurious errors
+- added support for building the benchmark collection with CMAKE
+- added rewriting of linker options to avoid linking both libgomp and libomp in CMAKE builds
+ with OpenMP enabled that use clang with gfortran
+- fixed building on systems with ucLibc
+- added support for calling ?NRM2 with a negative increment value on all architectures
+- added support for the LLVM18 version of the flang-new compiler
+- fixed handling of the OPENBLAS_LOOPS variable in several benchmarks
+- Integrated fixes from the Reference-LAPACK project:
+ - Increased accuracy in C/ZLARFGP (Reference-LAPACK PR 981)
+
+x86:
+- fixed handling of NaN and Inf arguments in ZSCAL
+- fixed GEMM3M functions failing in CMAKE builds
+
+x86-64:
+- removed all instances of sched_yield() on Linux and BSD
+- fixed a potential deadlock in the thread server on MSWindows (introduced in 0.3.26)
+- fixed GEMM3M functions failing in CMAKE builds
+- fixed handling of NaN and Inf arguments in ZSCAL
+- added compiler checks for AVX512BF16 compatibility
+- fixed LLVM compiler options for Sapphire Rapids
+- fixed cpu handling fallbacks for Sapphire Rapids with
+ disabled AVX2 in DYNAMIC_ARCH mode
+- fixed extensions SCSUM and DZSUM
+- improved GEMM performance for ZEN targets
+
+arm:
+- fixed handling of NaN and Inf arguments in ZSCAL
+
+arm64:
+- added initial support for the Cortex-A76 cpu
+- fixed handling of NaN and Inf arguments in ZSCAL
+- fixed default compiler options for gcc (-march and -mtune)
+- added support for ArmCompilerForLinux
+- added support for the NeoverseV2 cpu in DYNAMIC_ARCH builds
+- fixed mishandling of the INTERFACE64 option in CMAKE builds
+- corrected SCSUM kernels (erroneously duplicating SCASUM behaviour)
+- added SVE-enabled kernels for CSUM/ZSUM
+- worked around an inaccuracy in the NRM2 kernels for NeoverseN1 and Apple M
+
+power:
+- improved performance of SGEMM on POWER8/9/10
+- improved performance of DGEMM on POWER10
+- added support for OpenMP builds with xlc/xlf on AIX
+- improved cpu autodetection for DYNAMIC_ARCH builds on older AIX
+- fixed cpu core counting on AIX
+- added support for building a shared library on AIX
+
+riscv64:
+- added support for the X280 cpu
+- added support for semi-generic RISCV models with vector length 128 or 256
+- added support for compiling with either RVV 0.7.1 or RVV 1.0 standard compilers
+- fixed handling of NaN and Inf arguments in ZSCAL
+- improved cpu model autodetection
+- fixed corner cases in ?AXPBY for C910V
+- fixed handling of zero increments in ?AXPY kernels for C910V
+
+loongarch64:
+- added optimized kernels for ?AMIN and ?AMAX
+- fixed handling of NaN and Inf arguments in ZSCAL
+- fixed handling of corner cases in ?AXPBY
+- fixed computation of SAMIN and DAMIN in LSX mode
+- fixed computation of ?ROT
+- added optimized SSYMV and DSYMV kernels for LSX and LASX mode
+- added optimized CGEMM and ZGEMM kernels for LSX and LASX mode
+- added optimized CGEMV and ZGEMV kernels
+
+mips:
+- fixed utilizing MSA on P5600 and related cpus (broken in 0.3.22)
+- fixed handling of NaN and Inf arguments in ZSCAL
+- fixed mishandling of the INTERFACE64 option in CMAKE builds
+
+zarch:
+- fixed handling of NaN and Inf arguments in ZSCAL
+- fixed calculation of ?SUM on Z13
+
====================================================================
Version 0.3.26
2-Jan-2024
diff --git a/Makefile.arm64 b/Makefile.arm64
index a85ee7dfd3..4feb545239 100644
--- a/Makefile.arm64
+++ b/Makefile.arm64
@@ -58,6 +58,13 @@ FCOMMON_OPT += -march=armv8-a -mtune=cortex-a73
endif
endif
+ifeq ($(CORE), CORTEXA76)
+CCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a76
+ifneq ($(F_COMPILER), NAG)
+FCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a76
+endif
+endif
+
ifeq ($(CORE), FT2000)
CCOMMON_OPT += -march=armv8-a -mtune=cortex-a72
ifneq ($(F_COMPILER), NAG)
@@ -138,13 +145,13 @@ ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG)))
ifneq ($(OSNAME), Darwin)
CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2
else
-CCOMMON_OPT += -march=armv8.2-a+sve -mtune=cortex-a72
+CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72
endif
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2
endif
else
-CCOMMON_OPT += -march=armv8.5-a+sve
+CCOMMON_OPT += -march=armv8.5-a+sve+bf16
ifneq ($(CROSS), 1)
CCOMMON_OPT += -mtune=native
endif
@@ -156,13 +163,13 @@ endif
endif
endif
else
-CCOMMON_OPT += -march=armv8.2-a+sve -mtune=cortex-a72
+CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a72
endif
endif
else
-CCOMMON_OPT += -march=armv8-a+sve -mtune=cortex-a72
+CCOMMON_OPT += -march=armv8-a+sve+bf16 -mtune=cortex-a72
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8-a -mtune=cortex-a72
endif
diff --git a/Makefile.rule b/Makefile.rule
index 02ec739fd1..bb239be2a4 100644
--- a/Makefile.rule
+++ b/Makefile.rule
@@ -3,7 +3,7 @@
#
# This library's version
-VERSION = 0.3.26.dev
+VERSION = 0.3.27.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
@@ -173,6 +173,10 @@ NO_AFFINITY = 1
# If you are compiling for Linux and you have more than 16 numa nodes or more than 256 cpus
# BIGNUMA = 1
+# If you are compiling for an embedded system ("bare metal") like Cortex M series
+# Note that you will have to provide implementations of malloc() and free() in this case
+# EMBEDDED = 1
+
# Don't use AVX kernel on Sandy Bridge. It is compatible with old compilers
# and OS. However, the performance is low.
# NO_AVX = 1
diff --git a/Makefile.system b/Makefile.system
index f89cc8bdfa..1f1cfd16c2 100644
--- a/Makefile.system
+++ b/Makefile.system
@@ -811,8 +811,12 @@ ifeq ($(ARCH), arm)
NO_BINARY_MODE = 1
BINARY_DEFINED = 1
+ifneq ($(EMBEDDED), 1)
CCOMMON_OPT += -marm
FCOMMON_OPT += -marm
+else
+CCOMMON_OPT += -DOS_EMBEDDED -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16
+endif
# If softfp abi is mentioned on the command line, force it.
ifeq ($(ARM_SOFTFP_ABI), 1)
@@ -1195,9 +1199,6 @@ endif
else
FCOMMON_OPT += -q32
endif
-ifeq ($(USE_OPENMP), 1)
-FCOMMON_OPT += -openmp
-endif
endif
ifeq ($(F_COMPILER), PGI)
diff --git a/README.md b/README.md
index aade7b917a..b52e485647 100644
--- a/README.md
+++ b/README.md
@@ -167,6 +167,7 @@ Please read `GotoBLAS_01Readme.txt` for older CPU models already supported by th
- **Cortex A57**: Optimized Level-3 and Level-2 functions
- **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)
- **ThunderX**: Optimized some Level-1 functions
- **ThunderX2T99**: Optimized Level-3 BLAS and parts of Levels 1 and 2
@@ -187,7 +188,7 @@ Please read `GotoBLAS_01Readme.txt` for older CPU models already supported by th
- **AIX**: Dynamic architecture with OpenXL and OpenMP.
```sh
- make CC=ibm-clang_r FC=xlf TARGET=POWER7 BINARY=64 USE_OPENMP=1 INTERFACE64=1 DYNAMIC_ARCH=1 USE_THREAD=1
+ make CC=ibm-clang_r FC=xlf_r TARGET=POWER7 BINARY=64 USE_OPENMP=1 INTERFACE64=1 DYNAMIC_ARCH=1 USE_THREAD=1
```
#### IBM zEnterprise System
@@ -211,7 +212,7 @@ Please read `GotoBLAS_01Readme.txt` for older CPU models already supported by th
- **ZVL???B**: Level-3 BLAS and Level-1,2 including vectorised kernels targeting generic RISCV cores with vector support with registers of at least the corresponding width; ZVL128B and ZVL256B are available.
e.g.:
```sh
-make TARGET=RISCV64_ZVL256B CFLAGS="-DTARGET=RISCV64_ZVL256B" \
+ make TARGET=RISCV64_ZVL256B CFLAGS="-DTARGET=RISCV64_ZVL256B" \
BINARY=64 ARCH=riscv64 CC='clang -target riscv64-unknown-linux-gnu' \
AR=riscv64-unknown-linux-gnu-ar AS=riscv64-unknown-linux-gnu-gcc \
LD=riscv64-unknown-linux-gnu-gcc FC=riscv64-unknown-linux-gnu-gfortran \
diff --git a/TargetList.txt b/TargetList.txt
index 115030c1bd..1531fd0d2f 100644
--- a/TargetList.txt
+++ b/TargetList.txt
@@ -93,6 +93,7 @@ CORTEXA53
CORTEXA57
CORTEXA72
CORTEXA73
+CORTEXA76
CORTEXA510
CORTEXA710
CORTEXX1
diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake
index a33acbbd47..47e9584197 100644
--- a/cmake/prebuild.cmake
+++ b/cmake/prebuild.cmake
@@ -932,7 +932,7 @@ endif ()
set(ZGEMM_UNROLL_M 4)
set(ZGEMM_UNROLL_N 4)
set(SYMV_P 16)
- elseif ("${TCORE}" STREQUAL "CORTEXA72" OR "${TCORE}" STREQUAL "CORTEXA73")
+ elseif ("${TCORE}" STREQUAL "CORTEXA72" OR "${TCORE}" STREQUAL "CORTEXA73" OR "${TCORE}" STREQUAL "CORTEXA76")
file(APPEND ${TARGET_CONF_TEMP}
"#define L1_CODE_SIZE\t49152\n"
"#define L1_CODE_LINESIZE\t64\n"
diff --git a/cmake/system.cmake b/cmake/system.cmake
index c26b415c6d..7166cc07f5 100644
--- a/cmake/system.cmake
+++ b/cmake/system.cmake
@@ -172,9 +172,9 @@ if (DEFINED TARGET)
endif()
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_C_COMPILER_ID} STREQUAL "AppleClang")
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER 8.99)
- set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=cooperlake -exhaustive-register-search")
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=cooperlake -mllvm -exhaustive-register-search")
else()
- set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512 -exhaustive-register-search")
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512 -mllvm -exhaustive-register-search")
endif()
endif()
endif()
@@ -188,16 +188,16 @@ if (DEFINED TARGET)
endif()
elseif (${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_C_COMPILER_ID} STREQUAL "AppleClang")
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER 12.0)
- set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=sapphirerapids -exhaustive-register-search")
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=sapphirerapids -mllvm -exhaustive-register-search")
else()
- set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512 -exhaustive-register-search")
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512 -mllvm -exhaustive-register-search")
endif()
endif()
endif()
if (${TARGET} STREQUAL SKYLAKEX AND NOT NO_AVX512)
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512")
if (${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_C_COMPILER_ID} STREQUAL "AppleClang")
- set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -exhaustive-register-search")
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mllvm -exhaustive-register-search")
endif()
endif()
@@ -215,7 +215,7 @@ if (DEFINED TARGET)
else()
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512")
endif()
- set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -exhaustive-register-search")
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mllvm -exhaustive-register-search")
endif()
endif()
diff --git a/common_arm64.h b/common_arm64.h
index 6ae6a35a30..d80b9e4345 100644
--- a/common_arm64.h
+++ b/common_arm64.h
@@ -55,6 +55,19 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSEMBLER
+static __inline int WhereAmI(void){
+ uint64_t ret;
+ __asm__ volatile (
+ " mrs x0, mpidr_el1 \n"
+ " and x0, x0, 0xff \n"
+ :"=r" (ret)
+ :: "memory"
+ );
+ ret +=1;
+ if ((int)ret <0) ret = 0;
+ return (int)ret;
+}
+
static __inline void blas_lock(volatile BLASULONG *address){
BLASULONG ret;
diff --git a/common_loongarch64.h b/common_loongarch64.h
index b1426da792..367e5df18b 100644
--- a/common_loongarch64.h
+++ b/common_loongarch64.h
@@ -96,6 +96,32 @@ static inline int WhereAmI(void){
}
#endif
+static inline int get_cpu_model(char *model_name) {
+ FILE *cpuinfo_file = fopen("/proc/cpuinfo", "r");
+ if (!cpuinfo_file) {
+ return 0;
+ }
+ char line[1024];
+ while (fgets(line, sizeof(line), cpuinfo_file)) {
+ if (strstr(line, "model name")) {
+ char *token = strtok(line, ":");
+ token = strtok(NULL, ":");
+ while (*token == ' ')
+ token++;
+ char *end = token + strlen(token) - 1;
+ while (end > token && (*end == '\n' || *end == '\r')) {
+ *end = '\0';
+ end--;
+ }
+ strcpy(model_name, token);
+ fclose(cpuinfo_file);
+ return 1;
+ }
+ }
+ fclose(cpuinfo_file);
+ return 0;
+}
+
#ifdef DOUBLE
#define GET_IMAGE(res) __asm__ __volatile__("fmov.d %0, $f2" : "=f"(res) : : "memory")
#else
diff --git a/cpuid_arm64.c b/cpuid_arm64.c
index 8c5d04c141..b23edc4e7d 100644
--- a/cpuid_arm64.c
+++ b/cpuid_arm64.c
@@ -42,6 +42,7 @@ size_t length64=sizeof(value64);
#define CPU_CORTEXA57 3
#define CPU_CORTEXA72 4
#define CPU_CORTEXA73 5
+#define CPU_CORTEXA76 23
#define CPU_NEOVERSEN1 11
#define CPU_NEOVERSEV1 16
#define CPU_NEOVERSEN2 17
@@ -89,7 +90,8 @@ static char *cpuname[] = {
"CORTEXX2",
"CORTEXA510",
"CORTEXA710",
- "FT2000"
+ "FT2000",
+ "CORTEXA76"
};
static char *cpuname_lower[] = {
@@ -115,7 +117,8 @@ static char *cpuname_lower[] = {
"cortexx2",
"cortexa510",
"cortexa710",
- "ft2000"
+ "ft2000",
+ "cortexa76"
};
int get_feature(char *search)
@@ -210,6 +213,8 @@ int detect(void)
return CPU_CORTEXX2;
else if (strstr(cpu_part, "0xd4e")) //X3
return CPU_CORTEXX2;
+ else if (strstr(cpu_part, "0xd0b"))
+ return CPU_CORTEXA76;
}
// Qualcomm
else if (strstr(cpu_implementer, "0x51") && strstr(cpu_part, "0xc00"))
@@ -391,6 +396,7 @@ void get_cpuconfig(void)
break;
case CPU_NEOVERSEV1:
+ case CPU_CORTEXA76:
printf("#define %s\n", cpuname[d]);
printf("#define L1_CODE_SIZE 65536\n");
printf("#define L1_CODE_LINESIZE 64\n");
diff --git a/ctest/Makefile b/ctest/Makefile
index bbaf96f8ed..6c7cc1ed56 100644
--- a/ctest/Makefile
+++ b/ctest/Makefile
@@ -203,7 +203,6 @@ ifeq ($(BUILD_COMPLEX16),1)
OPENBLAS_NUM_THREADS=2 ./xzcblat3 < zin3
endif
endif
-endif
ifeq ($(SUPPORT_GEMM3M),1)
ifeq ($(USE_OPENMP), 1)
@@ -222,7 +221,7 @@ ifeq ($(BUILD_COMPLEX16),1)
endif
endif
endif
-
+endif
diff --git a/docs/about.md b/docs/about.md
new file mode 100644
index 0000000000..95acdccc8c
--- /dev/null
+++ b/docs/about.md
@@ -0,0 +1,33 @@
+## Mailing list
+
+We have a [GitHub discussions](https://github.com/OpenMathLib/OpenBLAS/discussions/) forum to discuss usage and development of OpenBLAS. We also have a [Google group for *users*](https://groups.google.com/forum/#!forum/openblas-users) and a [Google group for *development of*](https://groups.google.com/forum/#!forum/openblas-dev) OpenBLAS.
+
+## Donations
+
+You can read OpenBLAS statement of receipts and disbursement and cash balance on [google doc](https://docs.google.com/spreadsheet/ccc?key=0AghkTjXe2lDndE1UZml0dGpaUzJmZGhvenBZd1F2R1E&usp=sharing). A backer list is available [on GitHub](https://github.com/OpenMathLib/OpenBLAS/blob/develop/BACKERS.md).
+
+We welcome the hardware donation, including the latest CPU and boards.
+
+## Acknowledgements
+
+This work is partially supported by
+* Research and Development of Compiler System and Toolchain for Domestic CPU, National S&T Major Projects: Core Electronic Devices, High-end General Chips and Fundamental Software (No.2009ZX01036-001-002)
+* National High-tech R&D Program of China (Grant No.2012AA010903)
+
+## Users of OpenBLAS
+
+* Julia - a high-level, high-performance dynamic programming language for technical computing
+* Ceemple v1.0.3 (C++ technical computing environment), including OpenBLAS, Qt, Boost, OpenCV and others. The only solution with immediate-recompilation of C++ code. Available from Ceemple C++ Technical Computing.
+* [netlib-java](https://github.com/fommil/netlib-java) and various upstream libraries, allowing OpenBLAS to be used from languages on the Java Virtual Machine.
+
+
+
+## Publications
+
+### 2013
+
+* Wang Qian, Zhang Xianyi, Zhang Yunquan, Qing Yi, **AUGEM: Automatically Generate High Performance Dense Linear Algebra Kernels on x86 CPUs**, In the International Conference for High Performance Computing, Networking, Storage and Analysis (SC'13), Denver CO, November 2013. [[pdf](http://xianyi.github.io/paper/augem_SC13.pdf)]
+
+### 2012
+
+* Zhang Xianyi, Wang Qian, Zhang Yunquan, **Model-driven Level 3 BLAS Performance Optimization on Loongson 3A Processor**, 2012 IEEE 18th International Conference on Parallel and Distributed Systems (ICPADS), 17-19 Dec. 2012.
diff --git a/docs/build_system.md b/docs/build_system.md
new file mode 100644
index 0000000000..98808fdfab
--- /dev/null
+++ b/docs/build_system.md
@@ -0,0 +1,104 @@
+!!! warning
+ This page is made by someone who is not the developer and should not be considered as an official documentation of the build system. For getting the full picture, it is best to read the Makefiles and understand them yourself.
+
+## Makefile dep graph
+
+```
+Makefile
+|
+|----- Makefile.system # !!! this is included by many of the Makefiles in the subdirectories !!!
+| |
+| |===== Makefile.prebuild # This is triggered (not included) once by Makefile.system
+| | | # and runs before any of the actual library code is built.
+| | | # (builds and runs the "getarch" tool for cpu identification,
+| | | # runs the compiler detection scripts c_check and f_check)
+| | |
+| | ----- (Makefile.conf) [ either this or Makefile_kernel.conf is generated ]
+| | | { Makefile.system#L243 }
+| | ----- (Makefile_kernel.conf) [ temporary Makefile.conf during DYNAMIC_ARCH builds ]
+| |
+| |----- Makefile.rule # defaults for build options that can be given on the make command line
+| |
+| |----- Makefile.$(ARCH) # architecture-specific compiler options and OpenBLAS buffer size values
+|
+|~~~~~ exports/
+|
+|~~~~~ test/
+|
+|~~~~~ utest/
+|
+|~~~~~ ctest/
+|
+|~~~~~ cpp_thread_test/
+|
+|~~~~~ kernel/
+|
+|~~~~~ ${SUBDIRS}
+|
+|~~~~~ ${BLASDIRS}
+|
+|~~~~~ ${NETLIB_LAPACK_DIR}{,/timing,/testing/{EIG,LIN}}
+|
+|~~~~~ relapack/
+```
+
+## Important Variables
+
+Most of the tunable variables are found in [Makefile.rule](https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.rule), along with their detailed descriptions.
+Most of the variables are detected automatically in [Makefile.prebuild](https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.prebuild), if they are not set in the environment.
+
+### CPU related
+```
+ARCH - Target architecture (eg. x86_64)
+TARGET - Target CPU architecture, in case of DYNAMIC_ARCH=1 means library will not be usable on less capable CPUs
+TARGET_CORE - TARGET_CORE will override TARGET internally during each cpu-specific cycle of the build for DYNAMIC_ARCH
+DYNAMIC_ARCH - For building library for multiple TARGETs (does not lose any optimizations, but increases library size)
+DYNAMIC_LIST - optional user-provided subset of the DYNAMIC_CORE list in Makefile.system
+```
+
+### Toolchain related
+```
+CC - TARGET C compiler used for compilation (can be cross-toolchains)
+FC - TARGET Fortran compiler used for compilation (can be cross-toolchains, set NOFORTRAN=1 if used cross-toolchain has no fortran compiler)
+AR, AS, LD, RANLIB - TARGET toolchain helpers used for compilation (can be cross-toolchains)
+
+HOSTCC - compiler of build machine, needed to create proper config files for target architecture
+HOST_CFLAGS - flags for build machine compiler
+```
+
+### Library related
+```
+BINARY - 32/64 bit library
+
+BUILD_SHARED - Create shared library
+BUILD_STATIC - Create static library
+
+QUAD_PRECISION - enable support for IEEE quad precision [ largely unimplemented leftover from GotoBLAS, do not use ]
+EXPRECISION - Obsolete option to use float80 of SSE on BSD-like systems
+INTERFACE64 - Build with 64bit integer representations to support large array index values [ incompatible with standard API ]
+
+BUILD_SINGLE - build the single-precision real functions of BLAS [and optionally LAPACK]
+BUILD_DOUBLE - build the double-precision real functions
+BUILD_COMPLEX - build the single-precision complex functions
+BUILD_COMPLEX16 - build the double-precision complex functions
+(all four types are included in the build by default when none was specifically selected)
+
+BUILD_BFLOAT16 - build the "half precision brainfloat" real functions
+
+USE_THREAD - Use a multithreading backend (default to pthread)
+USE_LOCKING - implement locking for thread safety even when USE_THREAD is not set (so that the singlethreaded library can
+ safely be called from multithreaded programs)
+USE_OPENMP - Use OpenMP as multithreading backend
+NUM_THREADS - define this to the maximum number of parallel threads you expect to need (defaults to the number of cores in the build cpu)
+NUM_PARALLEL - define this to the number of OpenMP instances that your code may use for parallel calls into OpenBLAS (default 1,see below)
+
+```
+
+
+OpenBLAS uses a fixed set of memory buffers internally, used for communicating and compiling partial results from individual threads.
+For efficiency, the management array structure for these buffers is sized at build time - this makes it necessary to know in advance how
+many threads need to be supported on the target system(s).
+With OpenMP, there is an additional level of complexity as there may be calls originating from a parallel region in the calling program. If OpenBLAS gets called from a single parallel region, it runs single-threaded automatically to avoid overloading the system by fanning out its own set of threads.
+In the case that an OpenMP program makes multiple calls from independent regions or instances in parallel, this default serialization is not
+sufficient as the additional caller(s) would compete for the original set of buffers already in use by the first call.
+So if multiple OpenMP runtimes call into OpenBLAS at the same time, then only one of them will be able to make progress while all the rest of them spin-wait for the one available buffer. Setting NUM_PARALLEL to the upper bound on the number of OpenMP runtimes that you can have in a process ensures that there are a sufficient number of buffer sets available
\ No newline at end of file
diff --git a/docs/ci.md b/docs/ci.md
new file mode 100644
index 0000000000..6d6112cb26
--- /dev/null
+++ b/docs/ci.md
@@ -0,0 +1,56 @@
+# CI jobs
+
+| Arch|Target CPU|OS|Build system|XComp to|C Compiler|Fortran Compiler|threading|DYN_ARCH|INT64|Libraries| CI Provider| CPU count|
+| ------------|---|---|-----------|-------------|----------|----------------|------|------------|----------|-----------|----------|-------|
+| x86_64 |Intel 32bit|Windows|CMAKE/VS2015| -|mingw6.3| - | pthreads | - | - | static | Appveyor| |
+| x86_64 |Intel |Windows|CMAKE/VS2015| -|mingw5.3| - | pthreads | - | - | static | Appveyor| |
+| x86_64 |Intel |Centos5|gmake | -|gcc 4.8 |gfortran| pthreads | + | - | both | Azure | |
+| x86_64 |SDE (SkylakeX)|Ubuntu| CMAKE| - | gcc | gfortran | pthreads | - | - | both | Azure | |
+| x86_64 |Haswell/ SkylakeX|Windows|CMAKE/VS2017| - | VS2017| - | | - | - | static | Azure | |
+| x86_64 | " | Windows|mingw32-make| - |gcc | gfortran | | list | - | both | Azure | |
+| x86_64 | " |Windows|CMAKE/Ninja| - |LLVM | - | | - | - | static | Azure | |
+| x86_64 | " |Windows|CMAKE/Ninja| - |LLVM | flang | | - | - | static | Azure | |
+| x86_64 | " |Windows|CMAKE/Ninja| - |VS2022| flang* | | - | - | static | Azure | |
+| x86_64 | " |macOS11|gmake | - | gcc-10|gfortran| OpenMP | + | - | both | Azure | |
+| x86_64 | " |macOS11|gmake | - | gcc-10|gfortran| none | - | - | both | Azure | |
+| x86_64 | " |macOS12|gmake | - | gcc-12|gfortran|pthreads| - | - | both | Azure | |
+| x86_64 | " |macOS11|gmake | - | llvm | - | OpenMP | + | - | both | Azure | |
+| x86_64 | " |macOS11|CMAKE | - | llvm | - | OpenMP | no_avx512 | - | static | Azure | |
+| x86_64 | " |macOS11|CMAKE | - | gcc-10| gfortran| pthreads | list | - | shared | Azure | |
+| x86_64 | " |macOS11|gmake | - | llvm | ifort | pthreads | - | - | both | Azure | |
+| x86_64 | " |macOS11|gmake |arm| AndroidNDK-llvm | - | | - | - | both | Azure | |
+| x86_64 | " |macOS11|gmake |arm64| XCode 12.4 | - | | + | - | both | Azure | |
+| x86_64 | " |macOS11|gmake |arm | XCode 12.4 | - | | + | - | both | Azure | |
+| x86_64 | " |Alpine Linux(musl)|gmake| - | gcc | gfortran | pthreads | + | - | both | Azure | |
+| arm64 |Apple M1 |OSX |CMAKE/XCode| - | LLVM | - | OpenMP | - | - | static | Cirrus | |
+| arm64 |Apple M1 |OSX |CMAKE/Xcode| - | LLVM | - | OpenMP | - | + | static | Cirrus | |
+| arm64 |Apple M1 |OSX |CMAKE/XCode|x86_64| LLVM| - | - | + | - | static | Cirrus | |
+| arm64 |Neoverse N1|Linux |gmake | - |gcc10.2| -| pthreads| - | - | both | Cirrus | |
+| arm64 |Neoverse N1|Linux |gmake | - |gcc10.2| -| pthreads| - | + | both | Cirrus | |
+| arm64 |Neoverse N1|Linux |gmake |- |gcc10.2| -| OpenMP | - | - | both |Cirrus | 8 |
+| x86_64 | Ryzen| FreeBSD |gmake | - | gcc12.2|gfortran| pthreads| - | - | both | Cirrus | |
+| x86_64 | Ryzen| FreeBSD |gmake | | gcc12.2|gfortran| pthreads| - | + | both | Cirrus | |
+| x86_64 |GENERIC |QEMU |gmake| mips64 | gcc | gfortran | pthreads | - | - | static | Github | |
+| x86_64 |SICORTEX |QEMU |gmake| mips64 | gcc | gfortran | pthreads | - | - | static | Github | |
+| x86_64 |I6400 |QEMU |gmake| mips64 | gcc | gfortran | pthreads | - | - | static | Github | |
+| x86_64 |P6600 |QEMU |gmake| mips64 | gcc | gfortran | pthreads | - | - | static | Github | |
+| x86_64 |I6500 |QEMU |gmake| mips64 | gcc | gfortran | pthreads | - | - | static | Github | |
+| x86_64 |Intel |Ubuntu |CMAKE| - | gcc-11.3 | gfortran | pthreads | + | - | static | Github | |
+| x86_64 |Intel |Ubuntu |gmake| - | gcc-11.3 | gfortran | pthreads | + | - | both | Github | |
+| x86_64 |Intel |Ubuntu |CMAKE| - | gcc-11.3 | flang-classic | pthreads | + | - | static | Github | |
+| x86_64 |Intel |Ubuntu |gmake| - | gcc-11.3 | flang-classic | pthreads | + | - | both | Github | |
+| x86_64 |Intel |macOS12 | CMAKE| - | AppleClang 14 | gfortran | pthreads | + | - | static | Github | |
+| x86_64 |Intel |macOS12 | gmake| - | AppleClang 14 | gfortran | pthreads | + | - | both | Github | |
+| x86_64 |Intel |Windows2022 | CMAKE/Ninja| - | mingw gcc 13 | gfortran | | + | - | static | Github | |
+| x86_64 |Intel |Windows2022 | CMAKE/Ninja| - | mingw gcc 13 | gfortran | | + | + | static | Github | |
+| x86_64 |Intel 32bit|Windows2022 | CMAKE/Ninja| - | mingw gcc 13 | gfortran | | + | - | static | Github | |
+| x86_64 |Intel |Windows2022 | CMAKE/Ninja| - | LLVM 16 | - | | + | - | static | Github | |
+| x86_64 |Intel | Windows2022 |CMAKE/Ninja| - | LLVM 16 | - | | + | + | static | Github | |
+| x86_64 |Intel | Windows2022 |CMAKE/Ninja| - | gcc 13| - | | + | - | static | Github | |
+| x86_64 |Intel| Ubuntu |gmake |mips64|gcc|gfortran|pthreads|+|-|both|Github| |
+| x86_64 |generic|Ubuntu |gmake |riscv64|gcc|gfortran|pthreads|-|-|both|Github| |
+| x86_64 |Intel|Ubuntu |gmake |mips32|gcc|gfortran|pthreads|-|-|both|Github | |
+| x86_64 |Intel|Ubuntu |gmake |ia64|gcc|gfortran|pthreads|-|-|both|Github| |
+| x86_64 |C910V|QEmu |gmake |riscv64|gcc|gfortran|pthreads|-|-|both|Github| |
+|power |pwr9| Ubuntu |gmake | - |gcc|gfortran|OpenMP|-|-|both|OSUOSL| |
+|zarch |z14 | Ubuntu |gmake | - |gcc|gfortran|OpenMP|-|-|both|OSUOSL| |
diff --git a/docs/developers.md b/docs/developers.md
new file mode 100644
index 0000000000..08443b7e47
--- /dev/null
+++ b/docs/developers.md
@@ -0,0 +1,143 @@
+# Developer manual
+
+## Source codes Layout
+
+```
+OpenBLAS/
+├── benchmark Benchmark codes for BLAS
+├── cmake CMakefiles
+├── ctest Test codes for CBLAS interfaces
+├── driver Implemented in C
+│ ├── level2
+│ ├── level3
+│ ├── mapper
+│ └── others Memory management, threading, etc
+├── exports Generate shared library
+├── interface Implement BLAS and CBLAS interfaces (calling driver or kernel)
+│ ├── lapack
+│ └── netlib
+├── kernel Optimized assembly kernels for CPU architectures
+│ ├── alpha Original GotoBLAS kernels for DEC Alpha
+│ ├── arm ARMV5,V6,V7 kernels (including generic C codes used by other architectures)
+│ ├── arm64 ARMV8
+│ ├── generic General kernel codes written in plain C, parts used by many architectures.
+│ ├── ia64 Original GotoBLAS kernels for Intel Itanium
+│ ├── mips
+│ ├── mips64
+│ ├── power
+| ├── riscv64
+| ├── simd Common code for Universal Intrinsics, used by some x86_64 and arm64 kernels
+│ ├── sparc
+│ ├── x86
+│ ├── x86_64
+│ └── zarch
+├── lapack Optimized LAPACK codes (replacing those in regular LAPACK)
+│ ├── getf2
+│ ├── getrf
+│ ├── getrs
+│ ├── laswp
+│ ├── lauu2
+│ ├── lauum
+│ ├── potf2
+│ ├── potrf
+│ ├── trti2
+│ ├── trtri
+│ └── trtrs
+├── lapack-netlib LAPACK codes from netlib reference implementation
+├── reference BLAS Fortran reference implementation (unused)
+├── relapack Elmar Peise's recursive LAPACK (implemented on top of regular LAPACK)
+├── test Test codes for BLAS
+└── utest Regression test
+
+```
+
+A call tree for `dgemm` is as following.
+
+```
+interface/gemm.c
+ │
+driver/level3/level3.c
+ │
+gemm assembly kernels at kernel/
+```
+
+To find the kernel currently used for a particular supported cpu, please check the corresponding `kernel/$(ARCH)/KERNEL.$(CPU)` file.
+
+Here is an example for `kernel/x86_64/KERNEL.HASWELL`
+
+```
+...
+DTRMMKERNEL = dtrmm_kernel_4x8_haswell.c
+DGEMMKERNEL = dgemm_kernel_4x8_haswell.S
+...
+```
+According to the above `KERNEL.HASWELL`, OpenBLAS Haswell dgemm kernel file is `dgemm_kernel_4x8_haswell.S`.
+
+## Optimizing GEMM for a given hardware
+
+Read the Goto paper to understand the algorithm.
+
+Goto, Kazushige; van de Geijn, Robert A. (2008). ["Anatomy of High-Performance Matrix Multiplication"](http://delivery.acm.org/10.1145/1360000/1356053/a12-goto.pdf?ip=155.68.162.54&id=1356053&acc=ACTIVE%20SERVICE&key=A79D83B43E50B5B8%2EF070BBE7E45C3F17%2E4D4702B0C3E38B35%2E4D4702B0C3E38B35&__acm__=1517932837_edfe766f1e295d9a7830812371e1d173). ACM Transactions on Mathematical Software 34 (3): Article 12
+(The above link is available only to ACM members, but this and many related papers is also available on the pages
+of van de Geijn's FLAME project, http://www.cs.utexas.edu/~flame/web/FLAMEPublications.html )
+
+The `driver/level3/level3.c` is the implementation of Goto's algorithm. Meanwhile, you can look at `kernel/generic/gemmkernel_2x2.c`, which is a naive `2x2` register blocking gemm kernel in C.
+
+Then,
+* Write optimized assembly kernels. consider instruction pipeline, available registers, memory/cache accessing
+* Tuning cache block size, `Mc`, `Kc`, and `Nc`
+
+Note that not all of the cpu-specific parameters in param.h are actively used in algorithms. DNUMOPT only appears as a scale factor in profiling output of the level3 syrk interface code, while its counterpart SNUMOPT (aliased as NUMOPT in common.h) is not used anywhere at all.
+SYMV_P is only used in the generic kernels for the symv and chemv/zhemv functions - at least some of those are usually overridden by cpu-specific implementations, so if you start by cloning the existing implementation for a related cpu you need to check its KERNEL file to see if tuning SYMV_P would have any effect at all.
+GEMV_UNROLL is only used by some older x86_64 kernels, so not all sections in param.h define it.
+Similarly, not all of the cpu parameters like L2 or L3 cache sizes are necessarily used in current kernels for a given model - by all indications the cpu identification code was imported from some other project originally.
+
+## Run OpenBLAS Test
+
+We use netlib blas test, cblas test, and LAPACK test. Meanwhile, we use [BLAS-Tester](https://github.com/xianyi/BLAS-Tester), a modified test tool from ATLAS.
+
+* Run `test` and `ctest` at OpenBLAS. e.g. `make test` or `make ctest`.
+* Run regression test `utest` at OpenBLAS.
+* Run LAPACK test. e.g. `make lapack-test`.
+* Clone [BLAS-Tester](https://github.com/xianyi/BLAS-Tester), which can compare the OpenBLAS result with netlib reference BLAS.
+
+The project makes use of several Continuous Integration (CI) services conveniently interfaced with github to automatically check compilability on a number of platforms.
+Lastly, the testsuites included with "numerically heavy" projects like Julia, NumPy, Octave or QuantumEspresso can be used for regression testing.
+
+## Benchmarking
+
+Several simple C benchmarks for performance testing individual BLAS functions are available in the `benchmark` folder, and its `scripts` subdirectory contains corresponding versions for Python, Octave and R.
+Other options include
+
+* https://github.com/RoyiAvital/MatlabJuliaMatrixOperationsBenchmark (various matrix operations in Julia and Matlab)
+* https://github.com/mmperf/mmperf/ (single-core matrix multiplication)
+
+## Adding autodetection support for a new revision or variant of a supported cpu
+
+Especially relevant for x86_64, a new cpu model may be a "refresh" (die shrink and/or different number of cores) within an existing
+model family without significant changes to its instruction set. (e.g. Intel Skylake, Kaby Lake etc. still are fundamentally Haswell,
+low end Goldmont etc. are Nehalem). In this case, compilation with the appropriate older TARGET will already lead to a satisfactory build.
+
+To achieve autodetection of the new model, its CPUID (or an equivalent identifier) needs to be added in the `cpuid_.c`
+relevant for its general architecture, with the returned name for the new type set appropriately. For x86 which has the most complex
+cpuid file, there are two functions that need to be edited - get_cpuname() to return e.g. CPUTYPE_HASWELL and get_corename() for the (broader)
+core family returning e.g. CORE_HASWELL. (This information ends up in the Makefile.conf and config.h files generated by `getarch`. Failure to
+set either will typically lead to a missing definition of the GEMM_UNROLL parameters later in the build, as `getarch_2nd` will be unable to
+find a matching parameter section in param.h.)
+
+For architectures where "DYNAMIC_ARCH" builds are supported, a similar but simpler code section for the corresponding runtime detection of the cpu exists in `driver/others/dynamic.c` (for x86) and `driver/others/dynamic_.c` for other architectures.
+Note that for x86 the CPUID is compared after splitting it into its family, extended family, model and extended model parts, so the single decimal
+number returned by Linux in /proc/cpuinfo for the model has to be converted back to hexadecimal before splitting into its constituent
+digits, e.g. 142 = 8E , translates to extended model 8, model 14.
+
+## Adding dedicated support for a new cpu model
+
+Usually it will be possible to start from an existing model, clone its KERNEL configuration file to the new name to use for this TARGET and eventually replace individual kernels with versions better suited for peculiarities of the new cpu model. In addition, it is necessary to add
+(or clone at first) the corresponding section of GEMM_UNROLL parameters in the toplevel param.h, and possibly to add definitions such as USE_TRMM
+(governing whether TRMM functions use the respective GEMM kernel or a separate source file) to the Makefiles (and CMakeLists.txt) in the kernel
+directory. The new cpu name needs to be added to TargetLists.txt and the cpu autodetection code used by the `getarch` helper program - contained in
+the `cpuid_.c` file amended to include the CPUID (or equivalent) information processing required (see preceding section).
+
+## Adding support for an entirely new architecture
+
+This endeavour is best started by cloning the entire support structure for 32bit ARM, and within that the ARMV5 cpu in particular as this is implemented through plain C kernels only. An example providing a convenient "shopping list" can be seen in pull request #1526.
diff --git a/docs/distributing.md b/docs/distributing.md
index 1e6372a288..ff481b048d 100644
--- a/docs/distributing.md
+++ b/docs/distributing.md
@@ -1,11 +1,12 @@
-# Guidance for redistributing OpenBLAS
-
-*We note that this document contains recommendations only - packagers and other
-redistributors are in charge of how OpenBLAS is built and distributed in their
-systems, and may have good reasons to deviate from the guidance given on this
-page. These recommendations are aimed at general packaging systems, with a user
-base that typically is large, open source (or freely available at least), and
-doesn't behave uniformly or that the packager is directly connected with.*
+# Redistributing OpenBLAS
+
+!!! note
+ This document contains recommendations only - packagers and other
+ redistributors are in charge of how OpenBLAS is built and distributed in their
+ systems, and may have good reasons to deviate from the guidance given on this
+ page. These recommendations are aimed at general packaging systems, with a user
+ base that typically is large, open source (or freely available at least), and
+ doesn't behave uniformly or that the packager is directly connected with.*
OpenBLAS has a large number of build-time options which can be used to change
how it behaves at runtime, how artifacts or symbols are named, etc. Variation
diff --git a/docs/extensions.md b/docs/extensions.md
new file mode 100644
index 0000000000..3502f6487a
--- /dev/null
+++ b/docs/extensions.md
@@ -0,0 +1,28 @@
+* BLAS-like extensions
+
+| Routine | Data Types | Description |
+| ------------- |:------------- | :---------------|
+| ?axpby | s,d,c,z | like axpy with a multiplier for y |
+| ?gemm3m | c,z | gemm3m |
+| ?imatcopy | s,d,c,z | in-place transpositon/copying |
+| ?omatcopy | s,d,c,z | out-of-place transpositon/copying |
+| ?geadd | s,d,c,z | matrix add |
+| ?gemmt | s,d,c,z | gemm but only a triangular part updated|
+
+* BLAS-like and Conversion functions for bfloat16 (available when OpenBLAS was compiled with BUILD_BFLOAT16=1)
+ * `void cblas_sbstobf16` converts a float array to an array of bfloat16 values by rounding
+ * `void cblas_sbdtobf16` converts a double array to an array of bfloat16 values by rounding
+ * `void cblas_sbf16tos` converts a bfloat16 array to an array of floats
+ * `void cblas_dbf16tod` converts a bfloat16 array to an array of doubles
+ * `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
+
+* Utility functions
+ * openblas_get_num_threads
+ * openblas_set_num_threads
+ * `int openblas_get_num_procs(void)` returns the number of processors available on the system (may include "hyperthreading cores")
+ * `int openblas_get_parallel(void)` returns 0 for sequential use, 1 for platform-based threading and 2 for OpenMP-based threading
+ * `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 under Linux, with semantics identical to pthread_setaffinity_np)
+
diff --git a/docs/faq.md b/docs/faq.md
new file mode 100644
index 0000000000..699042d512
--- /dev/null
+++ b/docs/faq.md
@@ -0,0 +1,345 @@
+---
+title: FAQ
+---
+
+
+
+[TOC]
+
+## General questions
+
+### What is BLAS? Why is it important?
+
+[BLAS](https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms) stands for Basic Linear Algebra Subprograms. BLAS provides standard interfaces for [linear algebra](https://en.wikipedia.org/wiki/Linear_algebra), including BLAS1 (vector-vector operations), BLAS2 (matrix-vector operations), and BLAS3 (matrix-matrix operations). In general, BLAS is the computational kernel ("the bottom of the food chain") in linear algebra or scientific applications. Thus, if BLAS implementation is highly optimized, the whole application can get substantial benefit.
+
+### What functions are there and how can I call them from my C code?
+
+As BLAS is a standardized interface, you can refer to the documentation of its reference implementation at [netlib.org](http://netlib.org/blas/index.html#_blas_routines). Calls from C go through its CBLAS interface,
+so your code will need to include the provided cblas.h in addition to linking with -lopenblas.
+A single-precision matrix multiplication will look like
+```
+#include
+...
+cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, M, N, K, 1.0, A, K, B, N, 0.0, result, N);
+```
+where M,N,K are the dimensions of your data - see https://petewarden.files.wordpress.com/2015/04/gemm_corrected.png
+ (This image is part of an article on GEMM in the context of deep learning that is well worth reading in full -
+https://petewarden.com/2015/04/20/why-gemm-is-at-the-heart-of-deep-learning/)
+
+### What is OpenBLAS? Why did you create this project?
+
+OpenBLAS is an open source BLAS library forked from the GotoBLAS2-1.13 BSD version. Since Mr. Kazushige Goto left TACC, GotoBLAS is no longer being maintained. Thus, we created this project to continue developing OpenBLAS/GotoBLAS.
+
+### What's the difference between OpenBLAS and GotoBLAS?
+
+In OpenBLAS 0.2.0, we optimized level 3 BLAS on the Intel Sandy Bridge 64-bit OS. We obtained a performance comparable with that Intel MKL.
+
+We optimized level 3 BLAS performance on the [ICT Loongson-3A](http://en.wikipedia.org/wiki/Loongson) CPU. It outperformed GotoBLAS by 135% in a single thread and 120% in 4 threads.
+
+We fixed some GotoBLAS bugs including a SEGFAULT bug on the new Linux kernel, MingW32/64 bugs, and a ztrmm computing error bug on Intel Nehalem.
+
+We also added some minor features, e.g. supporting "make install", compiling without LAPACK and upgrading the LAPACK version to 3.4.2.
+
+You can find the full list of modifications in Changelog.txt.
+
+### Where do parameters GEMM_P, GEMM_Q, GEMM_R come from?
+
+The detailed explanation is probably in the original publication authored by Kazushige Goto - Goto, Kazushige; van de Geijn, Robert A; Anatomy of high-performance matrix multiplication. ACM Transactions on Mathematical Software (TOMS). Volume 34 Issue 3, May 2008
+While this article is paywalled and too old for preprints to be available on arxiv.org, more recent
+publications like https://arxiv.org/pdf/1609.00076 contain at least a brief description of the algorithm.
+In practice, the values are derived by experimentation to yield the block sizes that give the highest performance. A general rule of thumb for selecting a starting point seems to be that PxQ is about half the size of L2 cache.
+
+### How can I report a bug?
+
+Please file an issue at this [issue page](https://github.com/xianyi/OpenBLAS/issues) or send mail to the [OpenBLAS mailing list](https://groups.google.com/forum/#!forum/openblas-users).
+
+Please provide the following information: CPU, OS, compiler, and OpenBLAS compiling flags (Makefile.rule). In addition, please describe how to reproduce this bug.
+
+### How to reference OpenBLAS.
+
+You can reference our papers in [this page](about.md#publications). Alternatively, you can cite the OpenBLAS homepage http://www.openblas.net.
+
+### How can I use OpenBLAS in multi-threaded applications?
+
+If your application is already multi-threaded, it will conflict with OpenBLAS multi-threading. Thus, you must set OpenBLAS to use single thread as following.
+
+ * export OPENBLAS_NUM_THREADS=1 in the environment variables.
+Or
+ * Call openblas_set_num_threads(1) in the application on runtime.
+Or
+ * Build OpenBLAS single thread version, e.g. make USE_THREAD=0 USE_LOCKING=1 (see comment below)
+
+If the application is parallelized by OpenMP, please build OpenBLAS with USE_OPENMP=1
+
+With the increased availability of fast multicore hardware it has unfortunately become clear that the thread management provided by OpenMP is not sufficient to prevent race conditions when OpenBLAS was built single-threaded by USE_THREAD=0 and there are concurrent calls from multiple threads to OpenBLAS functions. In this case,
+it is vital to also specify USE_LOCKING=1 (introduced with OpenBLAS 0.3.7).
+
+### Does OpenBLAS support sparse matrices and/or vectors ?
+
+OpenBLAS implements only the standard (dense) BLAS and LAPACK functions with a select few extensions popularized by Intel's MKL. Some
+cases can probably be made to work using e.g. GEMV or AXPBY, in general using a dedicated package like SuiteSparse (which can make use of OpenBLAS or equivalent for standard operations) is recommended.
+
+### What support is there for recent PC hardware ? What about GPU ?
+
+ As OpenBLAS is a volunteer project, it can take some time for the combination of a capable developer,
+free time, and particular hardware to come along, even for relatively common processors. Starting from 0.3.1, support
+is being added for AVX 512 (TARGET=SKYLAKEX), requiring a compiler that is capable of handling avx512 intrinsics.
+While AMD Zen processors should be autodetected by the build system, as of 0.3.2 they are still handled exactly
+like Intel Haswell. There once was an effort to build an OpenCL implementation that one can still find at https://github.com/xianyi/clOpenBLAS , but work on this stopped in 2015.
+
+### How about the level 3 BLAS performance on Intel Sandy Bridge?
+
+We obtained a performance comparable with Intel MKL that actually outperformed Intel MKL in some cases.
+Here is the result of the DGEMM subroutine's performance on Intel Core i5-2500K Windows 7 SP1 64-bit:
+![Single Thread DGEMM Performance on Intel Desktop Sandy Bridge](http://xianyi.github.com/OpenBLAS/dgemm_snb_1thread.png)
+
+
+
+## OS and Compiler
+
+### How can I call an OpenBLAS function in Microsoft Visual Studio?
+
+Please read [this page](install.md#visual-studio).
+
+### How can I use CBLAS and LAPACKE without C99 complex number support (e.g. in Visual Studio)?
+
+Zaheer has fixed this bug. You can now use the structure instead of C99 complex numbers. Please read [this issue page](http://github.com/xianyi/OpenBLAS/issues/95) for details.
+
+[This issue](https://github.com/xianyi/OpenBLAS/issues/305) is for using LAPACKE in Visual Studio.
+
+### I get a SEGFAULT with multi-threading on Linux. What's wrong?
+
+This may be related to a bug in the Linux kernel 2.6.32 (?). Try applying the patch segaults.patch to disable mbind using
+
+ patch < segfaults.patch
+
+and see if the crashes persist. Note that this patch will lead to many compiler warnings.
+
+### When I make the library, there is no such instruction: `xgetbv' error. What's wrong?
+
+Please use GCC 4.4 and later version. This version supports xgetbv instruction. If you use the library for Sandy Bridge with AVX instructions, you should use GCC 4.6 and later version.
+
+On Mac OS X, please use Clang 3.1 and later version. For example, make CC=clang
+
+For the compatibility with old compilers (GCC < 4.4), you can enable NO_AVX flag. For example, make NO_AVX=1
+
+### My build fails due to the linker error "multiple definition of `dlamc3_'". What is the problem?
+
+This linker error occurs if GNU patch is missing or if our patch for LAPACK fails to apply.
+
+Background: OpenBLAS implements optimized versions of some LAPACK functions, so we need to disable the reference versions. If this process fails we end with duplicated implementations of the same function.
+
+### My build worked fine and passed all tests, but running `make lapack-test` ends with segfaults
+
+Some of the LAPACK tests, notably in xeigtstz, try to allocate around 10MB on the stack. You may need to use
+`ulimit -s` to change the default limits on your system to allow this.
+
+### How could I disable OpenBLAS threading affinity on runtime?
+
+You can define the OPENBLAS_MAIN_FREE or GOTOBLAS_MAIN_FREE environment variable to disable threading affinity on runtime. For example, before the running,
+```
+export OPENBLAS_MAIN_FREE=1
+```
+
+Alternatively, you can disable affinity feature with enabling NO_AFFINITY=1 in Makefile.rule.
+
+### How to solve undefined reference errors when statically linking against libopenblas.a
+
+On Linux, if OpenBLAS was compiled with threading support (`USE_THREAD=1` by default), custom programs statically linked against `libopenblas.a` should also link to the pthread library e.g.:
+
+```
+gcc -static -I/opt/OpenBLAS/include -L/opt/OpenBLAS/lib -o my_program my_program.c -lopenblas -lpthread
+```
+
+Failing to add the `-lpthread` flag will cause errors such as:
+
+```
+/opt/OpenBLAS/libopenblas.a(memory.o): In function `_touch_memory':
+memory.c:(.text+0x15): undefined reference to `pthread_mutex_lock'
+memory.c:(.text+0x41): undefined reference to `pthread_mutex_unlock'
+/opt/OpenBLAS/libopenblas.a(memory.o): In function `openblas_fork_handler':
+memory.c:(.text+0x440): undefined reference to `pthread_atfork'
+/opt/OpenBLAS/libopenblas.a(memory.o): In function `blas_memory_alloc':
+memory.c:(.text+0x7a5): undefined reference to `pthread_mutex_lock'
+memory.c:(.text+0x825): undefined reference to `pthread_mutex_unlock'
+/opt/OpenBLAS/libopenblas.a(memory.o): In function `blas_shutdown':
+memory.c:(.text+0x9e1): undefined reference to `pthread_mutex_lock'
+memory.c:(.text+0xa6e): undefined reference to `pthread_mutex_unlock'
+/opt/OpenBLAS/libopenblas.a(blas_server.o): In function `blas_thread_server':
+blas_server.c:(.text+0x273): undefined reference to `pthread_mutex_lock'
+blas_server.c:(.text+0x287): undefined reference to `pthread_mutex_unlock'
+blas_server.c:(.text+0x33f): undefined reference to `pthread_cond_wait'
+/opt/OpenBLAS/libopenblas.a(blas_server.o): In function `blas_thread_init':
+blas_server.c:(.text+0x416): undefined reference to `pthread_mutex_lock'
+blas_server.c:(.text+0x4be): undefined reference to `pthread_mutex_init'
+blas_server.c:(.text+0x4ca): undefined reference to `pthread_cond_init'
+blas_server.c:(.text+0x4e0): undefined reference to `pthread_create'
+blas_server.c:(.text+0x50f): undefined reference to `pthread_mutex_unlock'
+...
+```
+
+The `-lpthread` is not required when linking dynamically against `libopenblas.so.0`.
+
+### Building OpenBLAS for Haswell or Dynamic Arch on RHEL-6, CentOS-6, Rocks-6.1,Scientific Linux 6
+
+Minimum requirement to actually run AVX2-enabled software like OpenBLAS is kernel-2.6.32-358, shipped with EL6U4 in 2013
+
+The `binutils` package from RHEL6 does not know the instruction `vpermpd` or any other AVX2 instruction. You can download a newer `binutils` package from Enterprise Linux software collections, following instructions here:
+https://www.softwarecollections.org/en/scls/rhscl/devtoolset-3/
+After configuring repository you need to install devtoolset-?-binutils to get later usable binutils package
+```
+$ yum search devtoolset-\?-binutils
+$ sudo yum install devtoolset-3-binutils
+```
+once packages are installed check the correct name for SCL redirection set to enable new version
+```
+$ scl --list
+devtoolset-3
+rh-python35
+```
+Now just prefix your build commands with respective redirection:
+```
+$ scl enable devtoolset-3 -- make DYNAMIC_ARCH=1
+```
+AVX-512 (SKYLAKEX) support requires devtoolset-8-gcc-gfortran (which exceeds formal requirement for AVX-512 because of packaging issues in earlier packages) which dependency-installs respective binutils and gcc or later and kernel 2.6.32-696 aka 6U9 or 3.10.0-327 aka 7U2 or later to run. In absence of abovementioned toolset OpenBLAS will fall back to AVX2 instructions in place of AVX512 sacrificing some performance on SKYLAKE-X platform.
+
+### Building OpenBLAS in QEMU/KVM/XEN
+
+By default, QEMU reports the CPU as "QEMU Virtual CPU version 2.2.0", which shares CPUID with existing 32bit CPU even in 64bit virtual machine, and OpenBLAS recognizes it as PENTIUM2. Depending on the exact combination of CPU features the hypervisor choses to expose, this may not correspond to any CPU that exists, and OpenBLAS will error when trying to build. To fix this, pass `-cpu host` or `-cpu passthough` to QEMU, or another CPU model.
+Similarly, the XEN hypervisor may not pass through all features of the host cpu while reporting the cpu type itself correctly, which can
+lead to compiler error messages about an "ABI change" when compiling AVX512 code. Again changing the Xen configuration by running e.g.
+"xen-cmdline --set-xen cpuid=avx512" should get around this (as would building OpenBLAS for an older cpu lacking that particular feature, e.g. TARGET=HASWELL)
+
+### Building OpenBLAS on POWER fails with IBM XL
+
+ Trying to compile OpenBLAS with IBM XL ends with error messages about unknown register names
+like "vs32". Working around these by using known alternate names for the vector registers only leads to another assembler error about unsupported constraints. This is a known deficiency in the IBM compiler at least up to and including 16.1.0 (and in the POWER version of clang, from which it is derived) - use gcc instead. (See issues #1078
+and #1699 for related discussions)
+
+### Replacing system BLAS/updating APT OpenBLAS in Mint/Ubuntu/Debian
+
+Debian and Ubuntu LTS versions provide OpenBLAS package which is not updated after initial release, and under circumstances one might want to use more recent version of OpenBLAS e.g. to get support for newer CPUs
+
+Ubuntu and Debian provides 'alternatives' mechanism to comfortably replace BLAS and LAPACK libraries systemwide.
+
+After successful build of OpenBLAS (with DYNAMIC_ARCH set to 1)
+
+```
+$ make clean
+$ make DYNAMIC_ARCH=1
+$ sudo make DYNAMIC_ARCH=1 install
+```
+One can redirect BLAS and LAPACK alternatives to point to source-built OpenBLAS
+First you have to install NetLib LAPACK reference implementation (to have alternatives to replace):
+```
+$ sudo apt install libblas-dev liblapack-dev
+```
+Then we can set alternative to our freshly-built library:
+```
+$ sudo update-alternatives --install /usr/lib/libblas.so.3 libblas.so.3 /opt/OpenBLAS/lib/libopenblas.so.0 41 \
+ --slave /usr/lib/liblapack.so.3 liblapack.so.3 /opt/OpenBLAS/lib/libopenblas.so.0
+```
+Or remove redirection and switch back to APT-provided BLAS implementation order:
+```
+$ sudo update-alternatives --remove libblas.so.3 /opt/OpenBLAS/lib/libopenblas.so.0
+```
+In recent versions of the distributions, the installation path for the libraries has been changed to include the name of the host architecture, like /usr/lib/x86_64-linux-gnu/blas/libblas.so.3 or libblas.so.3.x86_64-linux-gnu. Use ```$ update-alternatives --display libblas.so.3```
+to find out what layout your system has.
+
+### I built OpenBLAS for use with some other software, but that software cannot find it
+
+Openblas installs as a single library named libopenblas.so, while some programs may be searching for a separate libblas.so and liblapack.so so you may need to create appropriate symbolic links (`ln -s libopenblas.so libblas.so;
+ln -s libopenblas.so liblapack.so`) or copies. Also make sure that the installation location (usually /opt/OpenBLAS/lib or /usr/local/lib) is among the library search paths of your system.
+
+### I included cblas.h in my program, but the compiler complains about a missing common.h or functions from it
+
+You probably tried to include a cblas.h that you simply copied from the OpenBLAS source, instead you need to run
+`make install` after building OpenBLAS and then use the modified cblas.h that this step builds in the installation
+path (usually either /usr/local/include, /opt/OpenBLAS/include or whatever you specified as PREFIX= on the `make install`)
+
+### Compiling OpenBLAS with gcc's -fbounds-check actually triggers aborts in programs
+
+This is due to different interpretations of the (informal) standard for passing characters as arguments between C and FORTRAN functions. As the method for storing text differs in the two languages, when C calls Fortran the text length is passed as an "invisible" additional parameter.
+Historically, this has not been required when the text is just a single character, so older code like the Reference-LAPACK bundled with OpenBLAS
+does not do it. Recently gcc's checking has changed to require it, but there is no consensus yet if and how the existing LAPACK (and many other codebases) should adapt. (And for actual compilation, gcc has mostly backtracked and provided compatibility options - hence the default build settings in the OpenBLAS Makefiles add -fno-optimize-sibling-calls to the gfortran options to prevent miscompilation with "affected" versions. See ticket 2154 in the issue tracker for more details and links)
+
+
+### Build fails with lots of errors about undefined ?GEMM_UNROLL_M
+
+Your cpu is apparently too new to be recognized by the build scripts, so they failed to assign appropriate parameters for the block algorithm.
+Do a `make clean` and try again with TARGET set to one of the cpu models listed in `TargetList.txt` - for x86_64 this will usually be HASWELL.
+
+### CMAKE/OSX: Build fails with 'argument list too long'
+
+This is a limitation in the maximum length of a command on OSX, coupled with how CMAKE works. You should be able to work around this
+by adding the option `-DCMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS=1` to your CMAKE arguments.
+
+### Likely problems with AVX2 support in Docker Desktop for OSX
+
+There have been a few reports of wrong calculation results and build-time test failures when building in a container environment managed by the OSX version of Docker Desktop, which uses the xhyve virtualizer underneath. Judging from these reports, AVX2 support in xhyve appears to be subtly broken but a corresponding ticket in the xhyve issue tracker has not drawn any reaction or comment since 2019. Therefore it is strongly recommended to build OpenBLAS with the NO_AVX2=1 option when inside a container under (or for later use with) the Docker Desktop environment on Intel-based Apple hardware.
+
+## Usage
+
+### Program is Terminated. Because you tried to allocate too many memory regions
+
+In OpenBLAS, we mange a pool of memory buffers and allocate the number of buffers as the following.
+```
+#define NUM_BUFFERS (MAX_CPU_NUMBER * 2)
+```
+This error indicates that the program exceeded the number of buffers.
+
+Please build OpenBLAS with larger `NUM_THREADS`. For example, `make NUM_THREADS=32` or `make NUM_THREADS=64`.
+In `Makefile.system`, we will set `MAX_CPU_NUMBER=NUM_THREADS`.
+
+### How to choose TARGET manually at runtime when compiled with DYNAMIC_ARCH
+
+The environment variable which control the kernel selection is `OPENBLAS_CORETYPE` (see `driver/others/dynamic.c`)
+e.g. `export OPENBLAS_CORETYPE=Haswell`. And the function `char* openblas_get_corename()` returns the used target.
+
+### After updating the installed OpenBLAS, a program complains about "undefined symbol gotoblas"
+
+This symbol gets defined only when OpenBLAS is built with "make DYNAMIC_ARCH=1" (which is what distributors will choose to ensure support for more than just one CPU type).
+
+### How can I find out at runtime what options the library was built with ?
+
+OpenBLAS has two utility functions that may come in here:
+
+openblas_get_parallel() will return 0 for a single-threaded library, 1 if multithreading without OpenMP, 2 if built with USE_OPENMP=1
+
+openblas_get_config() will return a string containing settings such as USE64BITINT or DYNAMIC_ARCH that were active at build time, as well as the target cpu (or in case of a dynamic_arch build, the currently detected one).
+
+### After making OpenBLAS, I find that the static library is multithreaded, but the dynamic one is not ?
+
+The shared OpenBLAS library you built is probably working fine as well, but your program may be picking up a different (probably single-threaded) version from one of the standard system paths like /usr/lib on startup.
+Running `ldd /path/to/your/program` will tell you which library the linkage loader will actually use.
+
+Specifying the "correct" library location with the `-L` flag (like `-L /opt/OpenBLAS/lib`) when linking your program only defines which library will be used to see if all symbols _can_ be resolved, you will need to add an rpath entry to the binary (using `-Wl,rpath=/opt/OpenBLAS/lib`) to make it request searching that location. Alternatively, remove the "wrong old" library (if you can), or set LD_LIBRARY_PATH to the desired location before running your program.
+
+### I want to use OpenBLAS with CUDA in the HPL 2.3 benchmark code but it keeps looking for Intel MKL
+
+You need to edit file src/cuda/cuda_dgemm.c in the NVIDIA version of HPL, change the "handle2" and "handle" dlopen calls to use libopenblas.so instead of libmkl_intel_lp64.so, and add an trailing underscore in the dlsym lines for dgemm_mkl and dtrsm_mkl (like `dgemm_mkl = (void(*)())dlsym(handle, “dgemm_”);`)
+
+### Multithreaded OpenBLAS runs no faster or is even slower than singlethreaded on my ARMV7 board
+
+The power saving mechanisms of your board may have shut down some cores, making them invisible to OpenBLAS in its startup phase. Try bringing them online before starting your calculation.
+
+### Speed varies wildly between individual runs on a typical ARMV8 smartphone processor
+
+Check the technical specifications, it could be that the SoC combines fast and slow cpus and threads can end up on either. In that case, binding the process to specific cores e.g. by setting `OMP_PLACES=cores` may help. (You may need to experiment with OpenMP options, it has been reported that using `OMP_NUM_THREADS=2 OMP_PLACES=cores` caused
+a huge drop in performance on a 4+4 core chip while `OMP_NUM_THREADS=2 OMP_PLACES=cores(2)` worked as intended - as did OMP_PLACES=cores with 4 threads)
+
+### I cannot get OpenBLAS to use more than a small subset of available cores on a big system
+
+Multithreading support in OpenBLAS requires the use of internal buffers for sharing partial results, the number and size of which is defined at compile time. Unless you specify NUM_THREADS in your make or cmake command, the build scripts try to autodetect the number of cores available in your build host to size the library to match. This unfortunately means that if you move the resulting binary from a small "front-end node" to a larger "compute node" later, it will still be limited to the hardware capabilities of the original system. The solution is to set NUM_THREADS to a number big enough to encompass the biggest systems you expect to run the binary on - at runtime, it will scale down the maximum number of threads it uses to match the number of cores physically available.
+
+### Getting "ELF load command address/offset not properly aligned" when loading libopenblas.so
+
+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)
+
+#### 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
+from the main thread of your program (i.e. outside of omp parallel constructs), a standard pthreads build of OpenBLAS can be used as well. In that case it may be useful to tune the linger behaviour of idle threads in both your OpenMP program (e.g. set OMP_WAIT_POLICY=passive) and OpenBLAS (by redefining the THREAD_TIMEOUT variable at build time, or setting the environment variable OPENBLAS_THREAD_TIMEOUT smaller than the default 26) so that the two alternating thread pools do not unnecessarily hog the cpu during the handover.
+
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 0000000000..3358491d59
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1,11 @@
+## Introduction
+
+OpenBLAS is an optimized Basic Linear Algebra Subprograms (BLAS) library based on [GotoBLAS2](https://www.tacc.utexas.edu/research-development/tacc-software/gotoblas2) 1.13 BSD version.
+
+OpenBLAS implements low-level routines for performing linear algebra operations such as vector addition, scalar multiplication, dot products, linear combinations, and matrix multiplication. OpenBLAS makes these routines available on multiple platforms, covering server, desktop and mobile operating systems, as well as different architectures including x86, ARM, MIPS, PPC, RISC-V, and zarch.
+
+The old GotoBLAS documentation can be found [on GitHub](https://github.com/OpenMathLib/OpenBLAS/blob/develop/GotoBLAS_01Readme.txt).
+
+## License
+
+OpenBLAS is licensed under the 3-clause BSD license. The full license can be found [on GitHub](https://github.com/OpenMathLib/OpenBLAS/blob/develop/LICENSE).
diff --git a/docs/install.md b/docs/install.md
new file mode 100644
index 0000000000..dff18e1507
--- /dev/null
+++ b/docs/install.md
@@ -0,0 +1,699 @@
+# Install OpenBLAS
+
+!!! note
+ Lists of precompiled packages are not comprehensive, is not meant to validate nor endorse a particular third-party build over others, and may not always lead to the newest version
+
+
+## Quick install
+
+Precompiled packages have recently become available for a number of platforms through their normal installation procedures, so for users of desktop devices at least, the instructions below are mostly relevant when you want to try the most recent development snapshot from git. See your platform's relevant "Precompiled packages" section.
+
+The [Conda-Forge](https://github.com/conda-forge) project maintains packages for the conda package manager at .
+
+## Source
+Download the latest [stable version](https://github.com/xianyi/OpenBLAS/releases) from release page.
+
+## Platforms
+
+### Linux
+
+Just type `make` to compile the library.
+
+Notes:
+
+* OpenBLAS doesn't support g77. Please use gfortran or other Fortran compilers. e.g. `make FC=gfortran`.
+* When building in an emulator (KVM,QEMU etc.) make sure that the combination of CPU features exposed to
+ the virtual environment matches that of an existing CPU to allow detection of the cpu model to succeed.
+ (With qemu, this can be done by passing `-cpu host` or a supported model name at invocation)
+
+
+#### Precompiled packages
+
+##### Debian/Ubuntu/Mint/Kali
+ OpenBLAS package is available in default repositories and can act as default BLAS in system
+
+Example installation commands:
+```bash
+$ sudo apt update
+$ apt search openblas
+$ sudo apt install libopenblas-dev
+$ sudo update-alternatives --config libblas.so.3
+```
+ Alternatively, if distributor's package proves unsatisfactory, you may try latest version of OpenBLAS, [Following guide in OpenBLAS FAQ](faq.md#debianlts)
+
+##### openSuSE/SLE
+ Recent OpenSUSE versions include OpenBLAS in default repositories and also permit OpenBLAS to act as replacement of system-wide BLAS.
+
+ Example installation commands:
+```bash
+$ sudo zypper ref
+$ zypper se openblas
+$ sudo zypper in openblas-devel
+$ sudo update-alternatives --config libblas.so.3
+```
+Should you be using older OpenSUSE or SLE that provides no OpenBLAS, you can attach optional or experimental openSUSE repository as a new package source to acquire recent build of OpenBLAS following [instructions on openSUSE software site](https://software.opensuse.org/package/openblas)
+
+##### Fedora/CentOS/RHEL
+Fedora provides OpenBLAS in default installation repositories.
+
+To install it try following:
+```bash
+$ dnf search openblas
+$ dnf install openblas-devel
+```
+For CentOS/RHEL/Scientific Linux packages are provided via [Fedora EPEL repository](https://fedoraproject.org/wiki/EPEL)
+
+After adding repository and repository keys installation is pretty straightforward:
+```bash
+$ yum search openblas
+$ yum install openblas-devel
+```
+No alternatives mechanism is provided for BLAS, and packages in system repositories are linked against NetLib BLAS or ATLAS BLAS libraries. You may wish to re-package RPMs to use OpenBLAS instead [as described here](https://fedoraproject.org/wiki/How_to_create_an_RPM_package)
+
+##### Mageia
+Mageia offers ATLAS and NetLIB LAPACK in base repositories.
+You can build your own OpenBLAS replacement, and once installed in /opt
+TODO: populate /usr/lib64 /usr/include accurately to replicate netlib with update-alternatives
+
+##### Arch/Manjaro/Antergos
+```bash
+$ sudo pacman -S openblas
+```
+
+### Windows
+
+The precompiled binaries available with each release (in ) are
+created with MinGW using an option list of
+"NUM_THREADS=64 TARGET=GENERIC DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 CONSISTENT_FPCSR=1" - they should work on
+any x86 or x86_64 computer. The zip archive contains the include files, static and dll libraries as well
+as configuration files for getting them found via CMAKE or pkgconfig - just create a suitable folder for
+your OpenBLAS installation and unzip it there. (Note that you will need to edit the provided openblas.pc
+and OpenBLASConfig.cmake to reflect the installation path on your computer, as distributed they have "win"
+or "win64" reflecting the local paths on the system they were built on). Some programs will expect the DLL
+name to be lapack.dll, blas.dll, or (in the case of the statistics package "R") even Rblas.dll to act as a
+direct replacement for whatever other implementation of BLAS and LAPACK they use by default. Just copy the
+openblas.dll to the desired name(s).
+Note that the provided binaries are built with INTERFACE64=0, meaning they use standard 32bit integers for
+array indexing and the like (as is the default for most if not all BLAS and LAPACK implementations). If the
+documentation of whatever program you are using with OpenBLAS mentions 64bit integers (INTERFACE64=1) for
+addressing huge matrix sizes, you will need to build OpenBLAS from source (or open an issue ticket to make
+the demand for such a precompiled build known).
+
+#### Precompiled packages
+
+*
+*
+
+#### Visual Studio
+
+As of OpenBLAS v0.2.15, we support MinGW and Visual Studio (using CMake to generate visual studio solution files – note that you will need at least version 3.11 of CMake for linking to work correctly) to build OpenBLAS on Windows.
+
+Note that you need a Fortran compiler if you plan to build and use the LAPACK functions included with OpenBLAS. The sections below describe using either `flang` as an add-on to clang/LLVM or `gfortran` as part of MinGW for this purpose. If you want to use the Intel Fortran compiler `ifort` for this, be sure to also use the Intel C compiler `icc` for building the C parts, as the ABI imposed by `ifort` is incompatible with `msvc`.
+
+##### 1. Native (MSVC) ABI
+
+A fully-optimized OpenBLAS that can be statically or dynamically linked to your application can currently be built for the 64-bit architecture with the LLVM compiler infrastructure. We're going to use Miniconda3 to grab all of the tools we need, since some of them are in an experimental status. Before you begin, you'll need to have Microsoft Visual Studio 2015 or newer installed.
+
+1. Install Miniconda3 for 64 bits using `winget install --id Anaconda.Miniconda3` or easily download from [conda.io](https://docs.conda.io/en/latest/miniconda.html).
+2. Open the "Anaconda Command Prompt," now available in the Start Menu, or at `%USERPROFILE%\miniconda3\shell\condabin\conda-hook.ps1`.
+3. In that command prompt window, use `cd` to change to the directory where you want to build OpenBLAS
+4. Now install all of the tools we need:
+
+ ```
+ conda update -n base conda
+ conda config --add channels conda-forge
+ conda install -y cmake flang clangdev perl libflang ninja
+ ```
+
+5. Still in the Anaconda Command Prompt window, activate the MSVC environment for 64 bits with `vcvarsall x64`. On Windows 11 with Visual Studio 2022, this would be done by invoking:
+
+ ```shell
+ "c:\Program Files\Microsoft Visual Studio\2022\Preview\vc\Auxiliary\Build\vcvars64.bat"
+ ```
+
+ With VS2019, the command should be the same – except for the year number, obviously. For other/older versions of MSVC,
+ the VS documentation or a quick search on the web should turn up the exact wording you need.
+
+ Confirm that the environment is active by typing `link` – this should return a long list of possible options for the `link` command. If it just
+ returns "command not found" or similar, review and retype the call to vcvars64.bat.
+ **NOTE:** if you are working from a Visual Studio Command prompt window instead (so that you do not have to do the vcvars call), you need to invoke
+ `conda activate` so that CONDA_PREFIX etc. get set up correctly before proceeding to step 6. Failing to do so will lead to link errors like
+ libflangmain.lib not getting found later in the build.
+
+6. Now configure the project with CMake. Starting in the project directory, execute the following:
+
+ ```
+ set "LIB=%CONDA_PREFIX%\Library\lib;%LIB%"
+ set "CPATH=%CONDA_PREFIX%\Library\include;%CPATH%"
+ mkdir build
+ cd build
+ cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DCMAKE_MT=mt -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DCMAKE_BUILD_TYPE=Release
+ ```
+
+ You may want to add further options in the `cmake` command here – for instance, the default only produces a static .lib version of the library. If you would rather have a DLL, add -DBUILD_SHARED_LIBS=ON above. Note that this step only creates some command files and directories, the actual build happens next.
+
+
+7. Build the project:
+
+ ```
+ cmake --build . --config Release
+ ```
+ This step will create the OpenBLAS library in the "lib" directory, and various build-time tests in the `test`, `ctest` and `openblas_utest` directories. However it will not separate the header files you might need for building your own programs from those used internally. To put all relevant files in a more convenient arrangement, run the next step.
+
+8. Install all relevant files created by the build
+
+ ```
+ cmake --install . --prefix c:\opt -v
+ ```
+ This will copy all files that are needed for building and running your own programs with OpenBLAS to the given location, creating appropriate subdirectories for the individual kinds of files. In the case of "C:\opt" as given above, this would be C:\opt\include\openblas for the header files,
+ C:\opt\bin for the libopenblas.dll and C:\opt\lib for the static library. C:\opt\share holds various support files that enable other cmake-based build scripts to find OpenBLAS automatically.
+
+###### Visual studio 2017+ (C++2017 standard)
+
+In newer visual studio versions, Microsoft has changed [how it handles complex types](https://docs.microsoft.com/en-us/cpp/c-runtime-library/complex-math-support?view=msvc-170#types-used-in-complex-math). Even when using a precompiled version of OpenBLAS, you might need to define `LAPACK_COMPLEX_CUSTOM` in order to define complex types properly for MSVC. For example, some variant of the following might help:
+
+```
+#if defined(_MSC_VER)
+ #include
+ #define LAPACK_COMPLEX_CUSTOM
+ #define lapack_complex_float _Fcomplex
+ #define lapack_complex_double _Dcomplex
+#endif
+```
+
+For reference, see https://github.com/xianyi/OpenBLAS/issues/3661, https://github.com/Reference-LAPACK/lapack/issues/683, and https://stackoverflow.com/questions/47520244/using-openblas-lapacke-in-visual-studio.
+
+###### CMake and Visual Studio
+
+To build OpenBLAS for the 32-bit architecture, you'll need to use the builtin Visual Studio compilers.
+
+!!! note
+ This method may produce binaries which demonstrate significantly lower performance than those built with the other methods. (The Visual Studio compiler does not support the dialect of assembly used in the cpu-specific optimized files, so only the "generic" TARGET which is
+ written in pure C will get built. For the same reason it is not possible (and not necessary) to use -DDYNAMIC_ARCH=ON in a Visual Studio build) You may consider building for the 32-bit architecture using the GNU (MinGW) ABI.
+
+####### 1. Install CMake at Windows
+
+####### 2. Use CMake to generate Visual Studio solution files
+
+```
+# Do this from Powershell so cmake can find visual studio
+cmake -G "Visual Studio 14 Win64" -DCMAKE_BUILD_TYPE=Release .
+```
+
+###### Build the solution at Visual Studio
+
+Note that this step depends on perl, so you'll need to install perl for windows, and put perl on your path so VS can start perl (http://stackoverflow.com/questions/3051049/active-perl-installation-on-windows-operating-system).
+
+Step 2 will build the OpenBLAS solution, open it in VS, and build the projects. Note that the dependencies do not seem to be automatically configured: if you try to build libopenblas directly, it will fail with a message saying that some .obj files aren't found, but if you build the projects libopenblas depends on before building libopenblas, the build will succeed.
+
+###### Build OpenBLAS for Universal Windows Platform
+
+OpenBLAS can be built for use on the [Universal Windows Platform](https://en.wikipedia.org/wiki/Universal_Windows_Platform) using a two step process since commit [c66b842](https://github.com/xianyi/OpenBLAS/commit/c66b842d66c5516e52804bf5a0544d18b1da1b44).
+
+####### 1. Follow steps 1 and 2 above to build the Visual Studio solution files for Windows. This builds the helper executables which are required when building the OpenBLAS Visual Studio solution files for UWP in step 2.
+
+####### 2. Remove the generated CMakeCache.txt and CMakeFiles directory from the OpenBLAS source directory and re-run CMake with the following options:
+
+```
+# do this to build UWP compatible solution files
+cmake -G "Visual Studio 14 Win64" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DCMAKE_SYSTEM_PROCESSOR=AMD64 -DVS_WINRT_COMPONENT=TRUE -DCMAKE_BUILD_TYPE=Release .
+```
+
+####### Build the solution with Visual Studio
+
+This will build the OpenBLAS binaries with the required settings for use with UWP.
+
+##### 2. GNU (MinGW) ABI
+
+The resulting library can be used in Visual Studio, but it can only be linked dynamically. This configuration has not been thoroughly tested and should be considered experimental.
+
+###### Incompatible x86 calling conventions
+
+Due to incompatibilities between the calling conventions of MinGW and Visual Studio you will need to make the following modifications ( **32-bit only** ):
+
+1. Use the newer GCC 4.7.0. The older GCC (<4.7.0) has an ABI incompatibility for returning aggregate structures larger than 8 bytes with MSVC.
+
+
+###### Build OpenBLAS on Windows OS
+1. Install the MinGW (GCC) compiler suite, either 32-bit (http://www.mingw.org/) or 64-bit (http://mingw-w64.sourceforge.net/). Be sure to install its gfortran package as well (unless you really want to build the BLAS part of OpenBLAS only) and check that gcc and gfortran are the same version – mixing compilers from different sources or release versions can lead to strange error messages in the linking stage. In addition, please install MSYS with MinGW.
+1. Build OpenBLAS in the MSYS shell. Usually, you can just type "make". OpenBLAS will detect the compiler and CPU automatically.
+1. After the build is complete, OpenBLAS will generate the static library "libopenblas.a" and the shared dll library "libopenblas.dll" in the folder. You can type "make PREFIX=/your/installation/path install" to install the library to a certain location.
+
+!!! note
+ We suggest using official MinGW or MinGW-w64 compilers. A user reported that s/he met `Unhandled exception` by other compiler suite. https://groups.google.com/forum/#!topic/openblas-users/me2S4LkE55w
+
+Note also that older versions of the alternative builds of mingw-w64 available through http://www.msys2.org may contain a defect that leads to a compilation failure accompanied by the error message
+```
+:0:4: error: expected identifier or '(' before numeric constant
+```
+If you encounter this, please upgrade your msys2 setup or see https://github.com/xianyi/OpenBLAS/issues/1503 for a workaround.
+
+###### Generate import library (before 0.2.10 version)
+
+1. First, you will need to have the `lib.exe` tool in the Visual Studio command prompt.
+1. Open the command prompt and type `cd OPENBLAS_TOP_DIR/exports`, where OPENBLAS_TOP_DIR is the main folder of your OpenBLAS installation.
+1. For a 32-bit library, type `lib /machine:i386 /def:libopenblas.def`. For 64-bit, type `lib /machine:X64 /def:libopenblas.def`.
+1. This will generate the import library "libopenblas.lib" and the export library "libopenblas.exp" in OPENBLAS_TOP_DIR/exports. Although these two files have the same name, they are totally different.
+
+###### Generate import library (0.2.10 and after version)
+1. OpenBLAS already generated the import library "libopenblas.dll.a" for "libopenblas.dll".
+
+###### generate windows native PDB files from gcc/gfortran build
+Tool to do so is available at https://github.com/rainers/cv2pdb
+
+###### Use OpenBLAS .dll library in Visual Studio
+1. Copy the import library (before 0.2.10: "OPENBLAS_TOP_DIR/exports/libopenblas.lib", 0.2.10 and after: "OPENBLAS_TOP_DIR/libopenblas.dll.a") and .dll library "libopenblas.dll" into the same folder(The folder of your project that is going to use the BLAS library. You may need to add the libopenblas.dll.a to the linker input list: properties->Linker->Input).
+1. Please follow the documentation about using third-party .dll libraries in MS Visual Studio 2008 or 2010. Make sure to link against a library for the correct architecture. For example, you may receive an error such as "The application was unable to start correctly (0xc000007b)" which typically indicates a mismatch between 32/64-bit libraries.
+
+!!! note
+ If you need CBLAS, you should include cblas.h in /your/installation/path/include in Visual Studio. Please read [this page](http://github.com/xianyi/OpenBLAS/issues/95).
+
+###### Limitations
+* Both static and dynamic linking are supported with MinGW. With Visual Studio, however, only dynamic linking is supported and so you should use the import library.
+* Debugging from Visual Studio does not work because MinGW and Visual Studio have incompatible formats for debug information (PDB vs. DWARF/STABS). You should either debug with GDB on the command-line or with a visual frontend, for instance [Eclipse](http://www.eclipse.org/cdt/) or [Qt Creator](http://qt.nokia.com/products/developer-tools/).
+
+
+#### Windows on Arm
+
+##### Prerequisites
+
+Following tools needs to be installed
+
+###### 1. Download and install clang for windows on arm
+
+Find the latest LLVM build for WoA from [LLVM release page](https://releases.llvm.org/)
+
+E.g: LLVM 12 build for WoA64 can be found [here](https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0/LLVM-12.0.0-woa64.exe)
+
+Run the LLVM installer and ensure that LLVM is added to environment PATH.
+
+###### 2. Download and install classic flang for windows on arm
+
+Classic flang is the only available FORTRAN compiler for windows on arm for now and a pre-release build can be found [here](https://github.com/kaadam/flang/releases/tag/v0.1)
+
+There is no installer for classic flang and the zip package can be extracted and the path needs to be added to environment PATH.
+
+E.g: on PowerShell
+
+```
+$env:Path += ";C:\flang_woa\bin"
+```
+
+##### Build
+
+The following steps describe how to build the static library for OpenBLAS with and without LAPACK
+
+###### 1. Build OpenBLAS static library with BLAS and LAPACK routines with Make
+
+Following command can be used to build OpenBLAS static library with BLAS and LAPACK routines
+
+```bash
+$ make CC="clang-cl" HOSTCC="clang-cl" AR="llvm-ar" BUILD_WITHOUT_LAPACK=0 NOFORTRAN=0 DYNAMIC_ARCH=0 TARGET=ARMV8 ARCH=arm64 BINARY=64 USE_OPENMP=0 PARALLEL=1 RANLIB="llvm-ranlib" MAKE=make F_COMPILER=FLANG FC=FLANG FFLAGS_NOOPT="-march=armv8-a -cpp" FFLAGS="-march=armv8-a -cpp" NEED_PIC=0 HOSTARCH=arm64 libs netlib
+```
+
+###### 2. Build static library with BLAS routines using CMake
+
+Classic flang has compatibility issues with cmake hence only BLAS routines can be compiled with CMake
+
+```bash
+$ mkdir build
+$ cd build
+$ cmake .. -G Ninja -DCMAKE_C_COMPILER=clang -DBUILD_WITHOUT_LAPACK=1 -DNOFORTRAN=1 -DDYNAMIC_ARCH=0 -DTARGET=ARMV8 -DARCH=arm64 -DBINARY=64 -DUSE_OPENMP=0 -DCMAKE_SYSTEM_PROCESSOR=ARM64 -DCMAKE_CROSSCOMPILING=1 -DCMAKE_SYSTEM_NAME=Windows
+$ cmake --build . --config Release
+```
+
+###### `getarch.exe` execution error
+
+If you notice that platform-specific headers by `getarch.exe` are not generated correctly, It could be due to a known debug runtime DLL issue for arm64 platforms. Please check out [link](https://linaro.atlassian.net/wiki/spaces/WOAR/pages/28677636097/Debug+run-time+DLL+issue#Workaround) for the workaround.
+
+#### MinGW import library
+
+Microsoft Windows has this thing called "import libraries". You don't need it in MinGW because the `ld` linker from GNU Binutils is smart, but you may still want it for whatever reason.
+
+##### Make the `.def`
+
+Import libraries are compiled from a list of what symbols to use, `.def`. This should be already in your `exports` directory: `cd OPENBLAS_TOP_DIR/exports`.
+
+##### Making a MinGW import library
+
+MinGW import libraries have the suffix `.a`, same as static libraries. (It's actually more common to do `.dll.a`...)
+
+You need to first prepend `libopenblas.def` with a line `LIBRARY libopenblas.dll`:
+
+ cat <(echo "LIBRARY libopenblas.dll") libopenblas.def > libopenblas.def.1
+ mv libopenblas.def.1 libopenblas.def
+
+Now it probably looks like:
+
+ LIBRARY libopenblas.dll
+ EXPORTS
+ caxpy=caxpy_ @1
+ caxpy_=caxpy_ @2
+ ...
+
+Then, generate the import library: `dlltool -d libopenblas.def -l libopenblas.a`
+
+Again, there is basically **no point** in making an import library for use in MinGW. It actually slows down linking.
+
+##### Making a MSVC import library
+
+Unlike MinGW, MSVC absolutely requires an import library. Now the C ABI of MSVC and MinGW are actually identical, so linking is actually okay. (Any incompatibility in the C ABI would be a bug.)
+
+The import libraries of MSVC have the suffix `.lib`. They are generated from a `.def` file using MSVC's `lib.exe`. See [the MSVC instructions](use_visual_studio.md#generate-import-library-before-0210-version).
+
+##### Notes
+
+* Always remember that MinGW is **not the same** as MSYS2 or Cygwin. MSYS2 and Cygwin are full POSIX environments with a lot of magic such as `fork()` and its own `malloc()`. MinGW, which builds on the normal Microsoft C Runtime, has none of that. Be clear about which one you are building for.
+
+### Mac OSX
+
+If your CPU is Sandy Bridge, please use Clang version 3.1 and above. The Clang 3.0 will generate the wrong AVX binary code of OpenBLAS.
+
+#### Precompiled packages
+
+
+
+`brew install openblas`
+
+or using the conda package manager from
+
+(which also has packages for the new M1 cpu)
+
+ `conda install openblas`
+
+#### Build on Apple M1
+
+On newer versions of Xcode and on arm64, you might need to compile with a newer macOS target (11.0) than the default (10.8) with `MACOSX_DEPLOYMENT_TARGET=11.0`, or switch your command-line tools to use an older SDK (e.g., [13.1](https://developer.apple.com/download/all/?q=Xcode%2013)).
+
+* without Fortran compiler (cannot build LAPACK)
+ ```bash
+ $ make CC=cc NOFORTRAN=1
+ ```
+* with Fortran compiler (you could `brew install gfortran`) https://github.com/xianyi/OpenBLAS/issues/3032
+ ```bash
+ $ export MACOSX_DEPLOYMENT_TARGET=11.0
+ $ make CC=cc FC=gfortran
+ ```
+
+### Android
+
+#### Prerequisites
+
+In addition to the Android NDK, you will need both Perl and a C compiler on the build host as these are currently
+required by the OpenBLAS build environment.
+
+
+#### Building with android NDK using clang compiler
+Around version 11 Android NDKs stopped supporting gcc, so you would need to use clang to compile OpenBLAS. clang is supported from OpenBLAS 0.2.20 version onwards. See below sections on how to build with clang for ARMV7 and ARMV8 targets. The same basic principles as described below for ARMV8 should also apply to building an x86 or x86_64 version (substitute something like NEHALEM for the target instead of ARMV8 and replace all the aarch64 in the toolchain paths obviously)
+"Historic" notes:
+Since version 19 the default toolchain is provided as a standalone toolchain, so building one yourself following [building a standalone toolchain](http://developer.android.com/ndk/guides/standalone_toolchain.html) should no longer be necessary.
+If you want to use static linking with an old NDK version older than about r17, you need to choose an API level below 23 currently due to NDK bug 272 (https://github.com/android-ndk/ndk/issues/272 , the libc.a lacks a definition of stderr) that will probably be fixed in r17 of the NDK.
+
+#### Build ARMV7 with clang
+```
+## Set path to ndk-bundle
+export NDK_BUNDLE_DIR=/path/to/ndk-bundle
+
+## Set the PATH to contain paths to clang and arm-linux-androideabi-* utilities
+export PATH=${NDK_BUNDLE_DIR}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:${NDK_BUNDLE_DIR}/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
+
+## Set LDFLAGS so that the linker finds the appropriate libgcc
+export LDFLAGS="-L${NDK_BUNDLE_DIR}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x"
+
+## Set the clang cross compile flags
+export CLANG_FLAGS="-target arm-linux-androideabi -marm -mfpu=vfp -mfloat-abi=softfp --sysroot ${NDK_BUNDLE_DIR}/platforms/android-23/arch-arm -gcc-toolchain ${NDK_BUNDLE_DIR}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/"
+
+#OpenBLAS Compile
+make TARGET=ARMV7 ONLY_CBLAS=1 AR=ar CC="clang ${CLANG_FLAGS}" HOSTCC=gcc ARM_SOFTFP_ABI=1 -j4
+```
+On a Mac, it may also be necessary to give the complete path to the `ar` utility in the make command above, like so:
+```
+AR=${NDK_BUNDLE_DIR}/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc-ar
+```
+otherwise you may get a linker error complaining about a "malformed archive header name at 8" when the native OSX ar command was invoked instead.
+
+#### Build ARMV8 with clang
+```
+## Set path to ndk-bundle
+export NDK_BUNDLE_DIR=/path/to/ndk-bundle/
+
+## Export PATH to contain directories of clang and aarch64-linux-android-* utilities
+export PATH=${NDK_BUNDLE_DIR}/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/:${NDK_BUNDLE_DIR}/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
+
+## Setup LDFLAGS so that loader can find libgcc and pass -lm for sqrt
+export LDFLAGS="-L${NDK_BUNDLE_DIR}/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x -lm"
+
+## Setup the clang cross compile options
+export CLANG_FLAGS="-target aarch64-linux-android --sysroot ${NDK_BUNDLE_DIR}/platforms/android-23/arch-arm64 -gcc-toolchain ${NDK_BUNDLE_DIR}/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/"
+
+## Compile
+make TARGET=ARMV8 ONLY_CBLAS=1 AR=ar CC="clang ${CLANG_FLAGS}" HOSTCC=gcc -j4
+```
+Note: Using TARGET=CORTEXA57 in place of ARMV8 will pick up better optimized routines. Implementations for CORTEXA57 target is compatible with all other armv8 targets.
+
+Note: For NDK 23b, something as simple as
+```
+export PATH=/opt/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/:$PATH
+make HOSTCC=gcc CC=/opt/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang ONLY_CBLAS=1 TARGET=ARMV8
+```
+appears to be sufficient on Linux.
+
+#### Alternative script which was tested on OSX with NDK(21.3.6528147)
+This script will build openblas for 3 architecture (ARMV7,ARMV8,X86) and put them with `sudo make install` to `/opt/OpenBLAS/lib`
+```
+export NDK=YOUR_PATH_TO_SDK/Android/sdk/ndk/21.3.6528147
+export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/darwin-x86_64
+
+make clean
+make \
+ TARGET=ARMV7 \
+ ONLY_CBLAS=1 \
+ CC="$TOOLCHAIN"/bin/armv7a-linux-androideabi21-clang \
+ AR="$TOOLCHAIN"/bin/arm-linux-androideabi-ar \
+ HOSTCC=gcc \
+ ARM_SOFTFP_ABI=1 \
+ -j4
+sudo make install
+
+make clean
+make \
+ TARGET=CORTEXA57 \
+ ONLY_CBLAS=1 \
+ CC=$TOOLCHAIN/bin/aarch64-linux-android21-clang \
+ AR=$TOOLCHAIN/bin/aarch64-linux-android-ar \
+ HOSTCC=gcc \
+ -j4
+sudo make install
+
+make clean
+make \
+ TARGET=ATOM \
+ ONLY_CBLAS=1 \
+ CC="$TOOLCHAIN"/bin/i686-linux-android21-clang \
+ AR="$TOOLCHAIN"/bin/i686-linux-android-ar \
+ HOSTCC=gcc \
+ ARM_SOFTFP_ABI=1 \
+ -j4
+sudo make install
+
+## This will build for x86_64
+make clean
+make \
+ TARGET=ATOM BINARY=64\
+ ONLY_CBLAS=1 \
+ CC="$TOOLCHAIN"/bin/x86_64-linux-android21-clang \
+ AR="$TOOLCHAIN"/bin/x86_64-linux-android-ar \
+ HOSTCC=gcc \
+ ARM_SOFTFP_ABI=1 \
+ -j4
+sudo make install
+```
+Also you can find full list of target architectures in [TargetsList.txt](https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt)
+
+***
+anything below this line should be irrelevant nowadays unless you need to perform software archeology
+***
+#### Building OpenBLAS with very old gcc-based versions of the NDK, without Fortran
+
+The prebuilt Android NDK toolchains do not include Fortran, hence parts like LAPACK cannot be built. You can still build OpenBLAS without it. For instructions on how to build OpenBLAS with Fortran, see the [next section](#building-openblas-with-fortran).
+
+To use easily the prebuilt toolchains, follow [building a standalone toolchain](http://developer.android.com/ndk/guides/standalone_toolchain.html) for your desired architecture.
+This would be `arm-linux-androideabi-gcc-4.9` for ARMV7 and `aarch64-linux-android-gcc-4.9` for ARMV8.
+
+You can build OpenBLAS (0.2.19 and earlier) with:
+```
+## Add the toolchain to your path
+export PATH=/path/to/standalone-toolchain/bin:$PATH
+
+## Build without Fortran for ARMV7
+make TARGET=ARMV7 HOSTCC=gcc CC=arm-linux-androideabi-gcc NOFORTRAN=1 libs
+## Build without Fortran for ARMV8
+make TARGET=ARMV8 BINARY=64 HOSTCC=gcc CC=aarch64-linux-android-gcc NOFORTRAN=1 libs
+```
+
+Since we are cross-compiling, we make the `libs` recipe, not `all`. Otherwise you will get errors when trying to link/run tests as versions up to and including 0.2.19 cannot build a shared library for Android.
+
+From 0.2.20 on, you should leave off the "libs" to get a full build, and you may want to use the softfp ABI instead of the deprecated hardfp one on ARMV7 so you would use
+```
+## Add the toolchain to your path
+export PATH=/path/to/standalone-toolchain/bin:$PATH
+
+## Build without Fortran for ARMV7
+make TARGET=ARMV7 ARM_SOFTFP_ABI=1 HOSTCC=gcc CC=arm-linux-androideabi-gcc NOFORTRAN=1
+## Build without Fortran for ARMV8
+make TARGET=ARMV8 BINARY=64 HOSTCC=gcc CC=aarch64-linux-android-gcc NOFORTRAN=1
+```
+
+If you get an error about stdio.h not being found, you need to specify your sysroot in the CFLAGS argument to `make` like
+```CFLAGS=--sysroot=$NDK/platforms/android-16/arch-arm```
+When you are done, install OpenBLAS into the desired directory. Be sure to also use all command line options
+here that you specified for building, otherwise errors may occur as it tries to install things you did not build:
+```
+make PREFIX=/path/to/install-dir TARGET=... install
+```
+
+#### Building OpenBLAS with Fortran
+
+Instructions on how to build the GNU toolchains with Fortran can be found [here](https://github.com/buffer51/android-gfortran). The [Releases section](https://github.com/buffer51/android-gfortran/releases) provides prebuilt versions, use the standalone one.
+
+You can build OpenBLAS with:
+```
+## Add the toolchain to your path
+export PATH=/path/to/standalone-toolchain-with-fortran/bin:$PATH
+
+## Build with Fortran for ARMV7
+make TARGET=ARMV7 HOSTCC=gcc CC=arm-linux-androideabi-gcc FC=arm-linux-androideabi-gfortran libs
+## Build with LAPACK for ARMV8
+make TARGET=ARMV8 BINARY=64 HOSTCC=gcc CC=aarch64-linux-android-gcc FC=aarch64-linux-android-gfortran libs
+```
+
+As mentioned above you can leave off the `libs` argument here when building 0.2.20 and later, and you may want to add ARM_SOFTFP_ABI=1 when building for ARMV7.
+
+#### Linking OpenBLAS (0.2.19 and earlier) for ARMV7
+
+If you are using `ndk-build`, you need to set the ABI to hard floating points in your Application.mk:
+```
+APP_ABI := armeabi-v7a-hard
+```
+
+This will set the appropriate flags for you. If you are not using `ndk-build`, you will want to add the following flags:
+```
+TARGET_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1
+TARGET_LDFLAGS += -Wl,--no-warn-mismatch -lm_hard
+```
+
+From 0.2.20 on, it is also possible to build for the softfp ABI by specifying ARM_SOFTFP_ABI=1 during the build.
+In that case, also make sure that all your dependencies are compiled with -mfloat-abi=softfp as well, as mixing
+"hard" and "soft" floating point ABIs in a program will make it crash.
+
+### iPhone/iOS
+
+As none of the current developers uses 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:
+```
+ CC=/Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
+
+CFLAGS= -O2 -Wno-macro-redefined -isysroot /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk -arch arm64 -miphoneos-version-min=10.0
+
+make TARGET=ARMV8 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
+```
+Adjust MIN_IOS_VERSION 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.
+
+### MIPS
+
+For mips targets you will need latest toolchains
+P5600 - MTI GNU/Linux Toolchain
+I6400, P6600 - IMG GNU/Linux Toolchain
+
+The download link is below
+(http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03/downloads.html)
+
+You can use following commandlines for builds
+
+
+ IMG_TOOLCHAIN_DIR={full IMG GNU/Linux Toolchain path including "bin" directory -- for example, /opt/linux_toolchain/bin}
+ IMG_GCC_PREFIX=mips-img-linux-gnu
+ IMG_TOOLCHAIN=${IMG_TOOLCHAIN_DIR}/${IMG_GCC_PREFIX}
+
+ I6400 Build (n32):
+ make BINARY=32 BINARY32=1 CC=$IMG_TOOLCHAIN-gcc AR=$IMG_TOOLCHAIN-ar FC="$IMG_TOOLCHAIN-gfortran -EL -mabi=n32" RANLIB=$IMG_TOOLCHAIN-ranlib HOSTCC=gcc CFLAGS="-EL" FFLAGS=$CFLAGS LDFLAGS=$CFLAGS TARGET=I6400
+
+ I6400 Build (n64):
+ make BINARY=64 BINARY64=1 CC=$IMG_TOOLCHAIN-gcc AR=$IMG_TOOLCHAIN-ar FC="$IMG_TOOLCHAIN-gfortran -EL" RANLIB=$IMG_TOOLCHAIN-ranlib HOSTCC=gcc CFLAGS="-EL" FFLAGS=$CFLAGS LDFLAGS=$CFLAGS TARGET=I6400
+
+ P6600 Build (n32):
+ make BINARY=32 BINARY32=1 CC=$IMG_TOOLCHAIN-gcc AR=$IMG_TOOLCHAIN-ar FC="$IMG_TOOLCHAIN-gfortran -EL -mabi=n32" RANLIB=$IMG_TOOLCHAIN-ranlib HOSTCC=gcc CFLAGS="-EL" FFLAGS=$CFLAGS LDFLAGS=$CFLAGS TARGET=P6600
+
+ P6600 Build (n64):
+ make BINARY=64 BINARY64=1 CC=$IMG_TOOLCHAIN-gcc AR=$IMG_TOOLCHAIN-ar FC="$IMG_TOOLCHAIN-gfortran -EL" RANLIB=$IMG_TOOLCHAIN-ranlib HOSTCC=gcc CFLAGS="-EL" FFLAGS="$CFLAGS" LDFLAGS="$CFLAGS" TARGET=P6600
+
+ MTI_TOOLCHAIN_DIR={full MTI GNU/Linux Toolchain path including "bin" directory -- for example, /opt/linux_toolchain/bin}
+ MTI_GCC_PREFIX=mips-mti-linux-gnu
+ MTI_TOOLCHAIN=${IMG_TOOLCHAIN_DIR}/${IMG_GCC_PREFIX}
+
+ P5600 Build:
+
+ make BINARY=32 BINARY32=1 CC=$MTI_TOOLCHAIN-gcc AR=$MTI_TOOLCHAIN-ar FC="$MTI_TOOLCHAIN-gfortran -EL" RANLIB=$MTI_TOOLCHAIN-ranlib HOSTCC=gcc CFLAGS="-EL" FFLAGS=$CFLAGS LDFLAGS=$CFLAGS TARGET=P5600
+
+### FreeBSD
+
+You will need to install the following tools from the FreeBSD ports tree:
+* lang/gcc [1]
+* lang/perl5.12
+* ftp/curl
+* devel/gmake
+* devel/patch
+
+To compile run the command:
+
+ $ gmake CC=gcc46 FC=gfortran46
+
+Note that you need to build with GNU make and manually specify the compiler, otherwhise gcc 4.2 from the base system would be used.
+
+[1]: [Removal of Fortran from the FreeBSD base system](http://www.bsdunix.ch/serendipity/index.php?/archives/345-Removal-of-Fortran-from-the-FreeBSD-base-system.html)
+
+
+```
+pkg install openblas
+```
+
+see
+
+### Cortex-M
+
+Cortex-M is a widely used microcontroller that is present in a variety of industrial and consumer electronics.
+A common variant of the Cortex-M is the STM32F4xx series. Here, we will give instructions for building for
+the STM32F4xx.
+
+First, install the embedded arm gcc compiler from the arm website. Then, create the following toolchain file and build as follows.
+
+```cmake
+# cmake .. -G Ninja -DCMAKE_C_COMPILER=arm-none-eabi-gcc -DCMAKE_TOOLCHAIN_FILE:PATH="toolchain.cmake" -DNOFORTRAN=1 -DTARGET=ARMV5 -DEMBEDDED=1
+
+set(CMAKE_SYSTEM_NAME Generic)
+set(CMAKE_SYSTEM_PROCESSOR arm)
+
+set(CMAKE_C_COMPILER "arm-none-eabi-gcc.exe")
+set(CMAKE_CXX_COMPILER "arm-none-eabi-g++.exe")
+
+set(CMAKE_EXE_LINKER_FLAGS "--specs=nosys.specs" CACHE INTERNAL "")
+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+```
+
+In your embedded application, the following functions need to be provided for OpenBLAS to work correctly:
+
+```C
+void free(void* ptr);
+void* malloc(size_t size);
+```
+
+!!! note
+ If you are developing for an embedded platform, it is your responsibility to make sure that the device has sufficient memory for malloc calls. [Libmemory][2] provides one implementation of malloc for embedded platforms.
+
+[2]: https://github.com/embeddedartistry/libmemory
diff --git a/docs/logo.svg b/docs/logo.svg
new file mode 100644
index 0000000000..e5a5df296b
--- /dev/null
+++ b/docs/logo.svg
@@ -0,0 +1,450 @@
+
+
diff --git a/docs/user_manual.md b/docs/user_manual.md
new file mode 100644
index 0000000000..b5cd632f15
--- /dev/null
+++ b/docs/user_manual.md
@@ -0,0 +1,179 @@
+## Compile the library
+### Normal compile
+ * type `make` to detect the CPU automatically.
+ or
+ * type `make TARGET=xxx` to set target CPU, e.g. `make TARGET=NEHALEM`. The full target list is in file TargetList.txt.
+
+### Cross compile
+Please set `CC` and `FC` with the cross toolchains. Then, set `HOSTCC` with your host C compiler. At last, set `TARGET` explicitly.
+
+Examples:
+
+* On x86 box, compile the library for ARM Cortex-A9 linux.
+
+Install only gnueabihf versions. Please check https://github.com/xianyi/OpenBLAS/issues/936#issuecomment-237596847
+
+ make CC=arm-linux-gnueabihf-gcc FC=arm-linux-gnueabihf-gfortran HOSTCC=gcc TARGET=CORTEXA9
+
+* On X86 box, compile this library for loongson3a CPU.
+
+```
+make BINARY=64 CC=mips64el-unknown-linux-gnu-gcc FC=mips64el-unknown-linux-gnu-gfortran HOSTCC=gcc TARGET=LOONGSON3A
+```
+
+* On X86 box, compile this library for loongson3a CPU with loongcc (based on Open64) compiler.
+
+```
+make CC=loongcc FC=loongf95 HOSTCC=gcc TARGET=LOONGSON3A CROSS=1 CROSS_SUFFIX=mips64el-st-linux-gnu- NO_LAPACKE=1 NO_SHARED=1 BINARY=32
+```
+
+### Debug version
+
+ make DEBUG=1
+
+### Install to the directory (optional)
+
+Example:
+
+ make install PREFIX=your_installation_directory
+
+The default directory is /opt/OpenBLAS. Note that any flags passed to `make` during build should also be passed to `make install` to circumvent any install errors, i.e. some headers not being copied over correctly.
+
+For more information, please read [Installation Guide](install.md).
+
+## Link the library
+
+* Link shared library
+
+```
+gcc -o test test.c -I/your_path/OpenBLAS/include/ -L/your_path/OpenBLAS/lib -Wl,-rpath,/your_path/OpenBLAS/lib -lopenblas
+```
+
+The `-Wl,-rpath,/your_path/OpenBLAS/lib` option to linker can be omitted if you ran `ldconfig` to update linker cache, put `/your_path/OpenBLAS/lib` in `/etc/ld.so.conf` or a file in `/etc/ld.so.conf.d`, or installed OpenBLAS in a location part of `ld.so` default search path. Otherwise, linking at runtime will fail.
+
+If the library is multithreaded, please add `-lpthread`. If the library contains LAPACK functions, please add `-lgfortran` or other Fortran libs, although if you only make calls to LAPACKE routines, i.e. your code has `#include "lapacke.h"` and makes calls to methods like `LAPACKE_dgeqrf`, `-lgfortran` is not needed.
+
+* Link static library
+
+```
+gcc -o test test.c /your/path/libopenblas.a
+```
+
+You can download `test.c` from https://gist.github.com/xianyi/5780018
+
+## Code examples
+
+### Call CBLAS interface
+This example shows calling cblas_dgemm in C. https://gist.github.com/xianyi/6930656
+```c
+#include
+#include
+
+void main()
+{
+ int i=0;
+ double A[6] = {1.0,2.0,1.0,-3.0,4.0,-1.0};
+ double B[6] = {1.0,2.0,1.0,-3.0,4.0,-1.0};
+ double C[9] = {.5,.5,.5,.5,.5,.5,.5,.5,.5};
+ cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans,3,3,2,1,A, 3, B, 3,2,C,3);
+
+ for(i=0; i<9; i++)
+ printf("%lf ", C[i]);
+ printf("\n");
+}
+```
+
+```
+gcc -o test_cblas_open test_cblas_dgemm.c -I /your_path/OpenBLAS/include/ -L/your_path/OpenBLAS/lib -lopenblas -lpthread -lgfortran
+```
+
+### Call BLAS Fortran interface
+
+This example shows calling dgemm Fortran interface in C. https://gist.github.com/xianyi/5780018
+
+```c
+#include "stdio.h"
+#include "stdlib.h"
+#include "sys/time.h"
+#include "time.h"
+
+extern void dgemm_(char*, char*, int*, int*,int*, double*, double*, int*, double*, int*, double*, double*, int*);
+
+int main(int argc, char* argv[])
+{
+ int i;
+ printf("test!\n");
+ if(argc<4){
+ printf("Input Error\n");
+ return 1;
+ }
+
+ int m = atoi(argv[1]);
+ int n = atoi(argv[2]);
+ int k = atoi(argv[3]);
+ int sizeofa = m * k;
+ int sizeofb = k * n;
+ int sizeofc = m * n;
+ char ta = 'N';
+ char tb = 'N';
+ double alpha = 1.2;
+ double beta = 0.001;
+
+ struct timeval start,finish;
+ double duration;
+
+ double* A = (double*)malloc(sizeof(double) * sizeofa);
+ double* B = (double*)malloc(sizeof(double) * sizeofb);
+ double* C = (double*)malloc(sizeof(double) * sizeofc);
+
+ srand((unsigned)time(NULL));
+
+ for (i=0; i
+```
+
+## Troubleshooting
+
+* Please read [Faq](faq.md) at first.
+* Please use gcc version 4.6 and above to compile Sandy Bridge AVX kernels on Linux/MingW/BSD.
+* Please use Clang version 3.1 and above to compile the library on Sandy Bridge microarchitecture. The Clang 3.0 will generate the wrong AVX binary code.
+* The number of CPUs/Cores should less than or equal to 256. On Linux x86_64(amd64), there is experimental support for up to 1024 CPUs/Cores and 128 numa nodes if you build the library with BIGNUMA=1.
+* OpenBLAS does not set processor affinity by default. On Linux, you can enable processor affinity by commenting the line NO_AFFINITY=1 in Makefile.rule. But this may cause [the conflict with R parallel](https://stat.ethz.ch/pipermail/r-sig-hpc/2012-April/001348.html).
+* On Loongson 3A. make test would be failed because of pthread_create error. The error code is EAGAIN. However, it will be OK when you run the same testcase on shell.
+
+## BLAS reference manual
+
+If you want to understand every BLAS function and definition, please read [Intel MKL reference manual](https://software.intel.com/en-us/intel-mkl/documentation) or [netlib.org](http://netlib.org/blas/)
+
+Here are [OpenBLAS extension functions](extensions.md)
diff --git a/driver/others/blas_server.c b/driver/others/blas_server.c
index c25d04b7b8..e3ebc7a7e8 100644
--- a/driver/others/blas_server.c
+++ b/driver/others/blas_server.c
@@ -460,7 +460,6 @@ blas_queue_t *tscq;
#endif
if(queue) {
-
exec_threads(cpu, queue, 0);
}
@@ -923,7 +922,7 @@ void goto_set_num_threads(int num_threads) {
blas_cpu_number = num_threads;
-#if defined(ARCH_MIPS64)
+#if defined(ARCH_MIPS64) || defined(ARCH_LOONGARCH64)
#ifndef DYNAMIC_ARCH
//set parameters for different number of threads.
blas_set_parameter();
@@ -1072,10 +1071,18 @@ fprintf(STDERR, "Server[%2ld] Calculation started. Mode = 0x%03x M = %3ld N=%3l
#endif
#ifdef MONITOR
- main_status[cpu] = MAIN_RUNNING1;
+ main_status[cpu] = MAIN_RUNNING1;
#endif
- if (sa == NULL) sa = (void *)((BLASLONG)buffer + GEMM_OFFSET_A);
+//For Loongson servers, like the 3C5000 (featuring 16 cores), applying an
+//offset to the buffer is essential for minimizing cache conflicts and optimizing performance.
+#if defined(LOONGSON3R5) && !defined(NO_AFFINITY)
+ char model_name[128];
+ get_cpu_model(model_name);
+ if ((strstr(model_name, "3C5000") != NULL) || (strstr(model_name, "3D5000") != NULL))
+ if (sa == NULL) sa = (void *)((BLASLONG)buffer + (WhereAmI() & 0xf) * GEMM_OFFSET_A);
+#endif
+ if (sa == NULL) sa = (void *)((BLASLONG)buffer + GEMM_OFFSET_A);
if (sb == NULL) {
if (!(queue -> mode & BLAS_COMPLEX)){
diff --git a/driver/others/blas_server_omp.c b/driver/others/blas_server_omp.c
index 2d06c1c705..06862cec02 100644
--- a/driver/others/blas_server_omp.c
+++ b/driver/others/blas_server_omp.c
@@ -113,7 +113,7 @@ void goto_set_num_threads(int num_threads) {
blas_cpu_number = num_threads;
adjust_thread_buffers();
-#if defined(ARCH_MIPS64)
+#if defined(ARCH_MIPS64) || defined(ARCH_LOONGARCH64)
//set parameters for different number of threads.
blas_set_parameter();
#endif
diff --git a/driver/others/blas_server_win32.c b/driver/others/blas_server_win32.c
index 56512ec333..3b5f510c7c 100644
--- a/driver/others/blas_server_win32.c
+++ b/driver/others/blas_server_win32.c
@@ -339,14 +339,14 @@ int exec_blas_async(BLASLONG pos, blas_queue_t *queue) {
}
else
{
- blas_queue_t *next_item = work_queue;
+ blas_queue_t *queue_item = work_queue;
// find the end of the work queue
- while (next_item)
- next_item = next_item->next;
+ while (queue_item->next)
+ queue_item = queue_item->next;
// add new work to the end
- next_item = queue;
+ queue_item->next = queue;
}
LeaveCriticalSection(&queue_lock);
diff --git a/driver/others/memory.c b/driver/others/memory.c
index 4ee8f9a2eb..c55688aced 100644
--- a/driver/others/memory.c
+++ b/driver/others/memory.c
@@ -1219,7 +1219,7 @@ UNLOCK_COMMAND(&alloc_lock);
if (!blas_num_threads) blas_cpu_number = blas_get_cpu_number();
#endif
-#if defined(ARCH_X86) || defined(ARCH_X86_64) || defined(ARCH_IA64) || defined(ARCH_MIPS64) || defined(ARCH_ARM64)
+#if defined(ARCH_X86) || defined(ARCH_X86_64) || defined(ARCH_IA64) || defined(ARCH_MIPS64) || defined(ARCH_ARM64) || defined(ARCH_LOONGARCH64)
#ifndef DYNAMIC_ARCH
blas_set_parameter();
#endif
@@ -2814,7 +2814,7 @@ void *blas_memory_alloc(int procpos){
if (!blas_num_threads) blas_cpu_number = blas_get_cpu_number();
#endif
-#if defined(ARCH_X86) || defined(ARCH_X86_64) || defined(ARCH_IA64) || defined(ARCH_MIPS64) || defined(ARCH_ARM64)
+#if defined(ARCH_X86) || defined(ARCH_X86_64) || defined(ARCH_IA64) || defined(ARCH_MIPS64) || defined(ARCH_ARM64) || defined(ARCH_LOONGARCH64)
#ifndef DYNAMIC_ARCH
blas_set_parameter();
#endif
diff --git a/driver/others/parameter.c b/driver/others/parameter.c
index de6bf0de46..a208a1a9d7 100644
--- a/driver/others/parameter.c
+++ b/driver/others/parameter.c
@@ -739,6 +739,100 @@ void blas_set_parameter(void){
}
#endif
+#if defined(ARCH_LOONGARCH64)
+int get_L3_size() {
+ int ret = 0, id = 0x14;
+ __asm__ volatile (
+ "cpucfg %[ret], %[id]"
+ : [ret]"=r"(ret)
+ : [id]"r"(id)
+ : "memory"
+ );
+ return ((ret & 0xffff) + 1) * pow(2, ((ret >> 16) & 0xff)) * pow(2, ((ret >> 24) & 0x7f)) / 1024 / 1024; // MB
+}
+
+void blas_set_parameter(void){
+#if defined(LOONGSON3R5)
+ int L3_size = get_L3_size();
+#ifdef SMP
+ if(blas_num_threads == 1){
+#endif
+ //single thread
+ if (L3_size == 32){ // 3C5000 and 3D5000
+ sgemm_p = 256;
+ sgemm_q = 384;
+ sgemm_r = 8192;
+
+ dgemm_p = 112;
+ dgemm_q = 289;
+ dgemm_r = 4096;
+
+ cgemm_p = 128;
+ cgemm_q = 256;
+ cgemm_r = 4096;
+
+ zgemm_p = 128;
+ zgemm_q = 128;
+ zgemm_r = 2048;
+ } else { // 3A5000 and 3C5000L
+ sgemm_p = 256;
+ sgemm_q = 384;
+ sgemm_r = 4096;
+
+ dgemm_p = 112;
+ dgemm_q = 300;
+ dgemm_r = 3024;
+
+ cgemm_p = 128;
+ cgemm_q = 256;
+ cgemm_r = 2048;
+
+ zgemm_p = 128;
+ zgemm_q = 128;
+ zgemm_r = 1024;
+ }
+#ifdef SMP
+ }else{
+ //multi thread
+ if (L3_size == 32){ // 3C5000 and 3D5000
+ sgemm_p = 256;
+ sgemm_q = 384;
+ sgemm_r = 1024;
+
+ dgemm_p = 112;
+ dgemm_q = 289;
+ dgemm_r = 342;
+
+ cgemm_p = 128;
+ cgemm_q = 256;
+ cgemm_r = 512;
+
+ zgemm_p = 128;
+ zgemm_q = 128;
+ zgemm_r = 512;
+ } else { // 3A5000 and 3C5000L
+ sgemm_p = 256;
+ sgemm_q = 384;
+ sgemm_r = 2048;
+
+ dgemm_p = 112;
+ dgemm_q = 300;
+ dgemm_r = 738;
+
+ cgemm_p = 128;
+ cgemm_q = 256;
+ cgemm_r = 1024;
+
+ zgemm_p = 128;
+ zgemm_q = 128;
+ zgemm_r = 1024;
+ }
+ }
+#endif
+#endif
+}
+#endif
+
#if defined(ARCH_ARM64)
void blas_set_parameter(void)
diff --git a/exports/Makefile b/exports/Makefile
index 27a291f341..33c47d4778 100644
--- a/exports/Makefile
+++ b/exports/Makefile
@@ -178,7 +178,7 @@ FEXTRALIB += -lm
EXTRALIB += -lm
else
ifeq ($(FIXED_LIBNAME),1)
-INTERNALNAME = $(LIBPREFIX)$(LIBNAMESUFFIX).so
+INTERNALNAME = $(LIBPREFIX).so
else
INTERNALNAME = $(LIBPREFIX).so.$(MAJOR_VERSION)
endif
@@ -266,7 +266,7 @@ so : ../$(LIBSONAME) linktest.c
../$(LIBSONAME) : aix.exp
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
- -Wl,-bE:aix.exp -Wl,-bbigtoc ../$(LIBNAME) $(EXTRALIB)
+ -Wl,-bcdtors:all:-2147481648:s,-bE:aix.exp -Wl,-bbigtoc ../$(LIBNAME) $(EXTRALIB)
aix.exp :
/usr/bin/nm -X32_64 -PCpgl ../$(LIBNAME) | /usr/bin/awk '{ if ((($$ 2 == "T") \
diff --git a/f_check b/f_check
index 81f598ffad..93c5962dee 100755
--- a/f_check
+++ b/f_check
@@ -86,7 +86,7 @@ else
vendor=CRAY
openmp='-fopenmp'
;;
- *Arm\ F90*)
+ *Arm\ F90*|*F90\ Flang*)
vendor=FLANG
openmp='-fopenmp'
;;
diff --git a/getarch.c b/getarch.c
index 2b5459a5f1..842a843fad 100644
--- a/getarch.c
+++ b/getarch.c
@@ -1331,6 +1331,21 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define CORENAME "CORTEXA73"
#endif
+#ifdef FORCE_CORTEXA76
+#define FORCE
+#define ARCHITECTURE "ARM64"
+#define SUBARCHITECTURE "CORTEXA76"
+#define SUBDIRNAME "arm64"
+#define ARCHCONFIG "-DCORTEXA76 " \
+ "-DL1_CODE_SIZE=49152 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
+ "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
+ "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
+ "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
+ "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
+#define LIBNAME "cortexa76"
+#define CORENAME "CORTEXA76"
+#endif
+
#ifdef FORCE_CORTEXX1
#define FORCE
#define ARCHITECTURE "ARM64"
diff --git a/interface/gemm.c b/interface/gemm.c
index 4778b641bb..c402836ca3 100644
--- a/interface/gemm.c
+++ b/interface/gemm.c
@@ -521,7 +521,18 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANS
buffer = (XFLOAT *)blas_memory_alloc(0);
+//For Loongson servers, like the 3C5000 (featuring 16 cores), applying an
+//offset to the buffer is essential for minimizing cache conflicts and optimizing performance.
+#if defined(LOONGSON3R5) && !defined(NO_AFFINITY)
+ char model_name[128];
+ get_cpu_model(model_name);
+ if ((strstr(model_name, "3C5000") != NULL) || (strstr(model_name, "3D5000") != NULL))
+ sa = (XFLOAT *)((BLASLONG)buffer + (WhereAmI() & 0xf) * GEMM_OFFSET_A);
+ else
+ sa = (XFLOAT *)((BLASLONG)buffer + GEMM_OFFSET_A);
+#else
sa = (XFLOAT *)((BLASLONG)buffer +GEMM_OFFSET_A);
+#endif
sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
#ifdef SMP
@@ -533,8 +544,12 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANS
MNK = (double) args.m * (double) args.n * (double) args.k;
if ( MNK <= (SMP_THRESHOLD_MIN * (double) GEMM_MULTITHREAD_THRESHOLD) )
args.nthreads = 1;
- else
+ else {
args.nthreads = num_cpu_avail(3);
+ if (MNK/args.nthreads < SMP_THRESHOLD_MIN*(double)GEMM_MULTITHREAD_THRESHOLD)
+ args.nthreads = MNK/(SMP_THRESHOLD_MIN*(double)GEMM_MULTITHREAD_THRESHOLD);
+ }
+
args.common = NULL;
if (args.nthreads == 1) {
diff --git a/interface/lapack/getrf.c b/interface/lapack/getrf.c
index 323370ebc6..270604120f 100644
--- a/interface/lapack/getrf.c
+++ b/interface/lapack/getrf.c
@@ -95,14 +95,19 @@ int NAME(blasint *M, blasint *N, FLOAT *a, blasint *ldA, blasint *ipiv, blasint
#ifdef SMP
args.common = NULL;
+
#ifndef DOUBLE
- if (args.m*args.n < 40000)
-#else
- if (args.m*args.n < 10000)
+ int nmax = 40000;
+#else
+ int nmax = 10000;
#endif
- args.nthreads=1;
- else
- args.nthreads = num_cpu_avail(4);
+ if (args.m*args.n > 16) & 0xff)) * pow(2, ((ret >> 24) & 0x7f)) / 1024 / 1024; // MB
+}
static void init_parameter(void) {
#ifdef BUILD_BFLOAT16
TABLE_NAME.sbgemm_p = SBGEMM_DEFAULT_P;
#endif
+
+#ifdef BUILD_BFLOAT16
+ TABLE_NAME.sbgemm_r = SBGEMM_DEFAULT_R;
+#endif
+
+#if defined(LOONGSON3R5)
+ int L3_size = get_L3_size();
+#ifdef SMP
+ if(blas_num_threads == 1){
+#endif
+ //single thread
+ if (L3_size == 32){ // 3C5000 and 3D5000
+ TABLE_NAME.sgemm_p = 256;
+ TABLE_NAME.sgemm_q = 384;
+ TABLE_NAME.sgemm_r = 8192;
+
+ TABLE_NAME.dgemm_p = 112;
+ TABLE_NAME.dgemm_q = 289;
+ TABLE_NAME.dgemm_r = 4096;
+
+ TABLE_NAME.cgemm_p = 128;
+ TABLE_NAME.cgemm_q = 256;
+ TABLE_NAME.cgemm_r = 4096;
+
+ TABLE_NAME.zgemm_p = 128;
+ TABLE_NAME.zgemm_q = 128;
+ TABLE_NAME.zgemm_r = 2048;
+ } else { // 3A5000 and 3C5000L
+ TABLE_NAME.sgemm_p = 256;
+ TABLE_NAME.sgemm_q = 384;
+ TABLE_NAME.sgemm_r = 4096;
+
+ TABLE_NAME.dgemm_p = 112;
+ TABLE_NAME.dgemm_q = 300;
+ TABLE_NAME.dgemm_r = 3024;
+
+ TABLE_NAME.cgemm_p = 128;
+ TABLE_NAME.cgemm_q = 256;
+ TABLE_NAME.cgemm_r = 2048;
+
+ TABLE_NAME.zgemm_p = 128;
+ TABLE_NAME.zgemm_q = 128;
+ TABLE_NAME.zgemm_r = 1024;
+ }
+#ifdef SMP
+ }else{
+ //multi thread
+ if (L3_size == 32){ // 3C5000 and 3D5000
+ TABLE_NAME.sgemm_p = 256;
+ TABLE_NAME.sgemm_q = 384;
+ TABLE_NAME.sgemm_r = 1024;
+
+ TABLE_NAME.dgemm_p = 112;
+ TABLE_NAME.dgemm_q = 289;
+ TABLE_NAME.dgemm_r = 342;
+
+ TABLE_NAME.cgemm_p = 128;
+ TABLE_NAME.cgemm_q = 256;
+ TABLE_NAME.cgemm_r = 512;
+
+ TABLE_NAME.zgemm_p = 128;
+ TABLE_NAME.zgemm_q = 128;
+ TABLE_NAME.zgemm_r = 512;
+ } else { // 3A5000 and 3C5000L
+ TABLE_NAME.sgemm_p = 256;
+ TABLE_NAME.sgemm_q = 384;
+ TABLE_NAME.sgemm_r = 2048;
+
+ TABLE_NAME.dgemm_p = 112;
+ TABLE_NAME.dgemm_q = 300;
+ TABLE_NAME.dgemm_r = 738;
+
+ TABLE_NAME.cgemm_p = 128;
+ TABLE_NAME.cgemm_q = 256;
+ TABLE_NAME.cgemm_r = 1024;
+
+ TABLE_NAME.zgemm_p = 128;
+ TABLE_NAME.zgemm_q = 128;
+ TABLE_NAME.zgemm_r = 1024;
+ }
+ }
+#endif
+#else
TABLE_NAME.sgemm_p = SGEMM_DEFAULT_P;
TABLE_NAME.dgemm_p = DGEMM_DEFAULT_P;
TABLE_NAME.cgemm_p = CGEMM_DEFAULT_P;
TABLE_NAME.zgemm_p = ZGEMM_DEFAULT_P;
-#ifdef BUILD_BFLOAT16
- TABLE_NAME.sbgemm_r = SBGEMM_DEFAULT_R;
-#endif
+ TABLE_NAME.sgemm_q = SGEMM_DEFAULT_Q;
+ TABLE_NAME.dgemm_q = DGEMM_DEFAULT_Q;
+ TABLE_NAME.cgemm_q = CGEMM_DEFAULT_Q;
+ TABLE_NAME.zgemm_q = ZGEMM_DEFAULT_Q;
+
TABLE_NAME.sgemm_r = SGEMM_DEFAULT_R;
TABLE_NAME.dgemm_r = DGEMM_DEFAULT_R;
TABLE_NAME.cgemm_r = CGEMM_DEFAULT_R;
TABLE_NAME.zgemm_r = ZGEMM_DEFAULT_R;
+#endif
#ifdef BUILD_BFLOAT16
TABLE_NAME.sbgemm_q = SBGEMM_DEFAULT_Q;
#endif
- TABLE_NAME.sgemm_q = SGEMM_DEFAULT_Q;
- TABLE_NAME.dgemm_q = DGEMM_DEFAULT_Q;
- TABLE_NAME.cgemm_q = CGEMM_DEFAULT_Q;
- TABLE_NAME.zgemm_q = ZGEMM_DEFAULT_Q;
}
#else // (ARCH_LOONGARCH64)
#if (ARCH_POWER)
@@ -1248,6 +1340,10 @@ static __inline__ int get_l2_size(void){
int eax, ebx, ecx, edx, l2;
+ l2 = readenv_atoi("OPENBLAS_L2_SIZE");
+ if (l2 != 0)
+ return l2;
+
cpuid(0x80000006, &eax, &ebx, &ecx, &edx);
l2 = BITMASK(ecx, 16, 0xffff);
diff --git a/lapack-netlib/SRC/DEPRECATED/cgegs.c b/lapack-netlib/SRC/DEPRECATED/cgegs.c
index 270a05ebde..4770bb21cb 100644
--- a/lapack-netlib/SRC/DEPRECATED/cgegs.c
+++ b/lapack-netlib/SRC/DEPRECATED/cgegs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
diff --git a/lapack-netlib/SRC/DEPRECATED/cgegv.c b/lapack-netlib/SRC/DEPRECATED/cgegv.c
index d485b05b67..482a6633d7 100644
--- a/lapack-netlib/SRC/DEPRECATED/cgegv.c
+++ b/lapack-netlib/SRC/DEPRECATED/cgegv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/cgelqs.c b/lapack-netlib/SRC/DEPRECATED/cgelqs.c
index ee6d561193..3b71b83660 100644
--- a/lapack-netlib/SRC/DEPRECATED/cgelqs.c
+++ b/lapack-netlib/SRC/DEPRECATED/cgelqs.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -256,14 +253,6 @@ typedef struct Namelist Namelist;
#define myhuge_(w) {HUGE_VAL}
#define mymaxloc_(w,s,e,n) dmaxloc_(w,*(s),*(e),n)
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
diff --git a/lapack-netlib/SRC/DEPRECATED/cgelsx.c b/lapack-netlib/SRC/DEPRECATED/cgelsx.c
index cb3c33323a..ae4bcd0c31 100644
--- a/lapack-netlib/SRC/DEPRECATED/cgelsx.c
+++ b/lapack-netlib/SRC/DEPRECATED/cgelsx.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/cgeqpf.c b/lapack-netlib/SRC/DEPRECATED/cgeqpf.c
index 12f8e5c766..f27fece7be 100644
--- a/lapack-netlib/SRC/DEPRECATED/cgeqpf.c
+++ b/lapack-netlib/SRC/DEPRECATED/cgeqpf.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
diff --git a/lapack-netlib/SRC/DEPRECATED/cgeqrs.c b/lapack-netlib/SRC/DEPRECATED/cgeqrs.c
index c71b8af674..882eee9468 100644
--- a/lapack-netlib/SRC/DEPRECATED/cgeqrs.c
+++ b/lapack-netlib/SRC/DEPRECATED/cgeqrs.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -256,15 +253,6 @@ typedef struct Namelist Namelist;
#define myhuge_(w) {HUGE_VAL}
#define mymaxloc_(w,s,e,n) dmaxloc_(w,*(s),*(e),n)
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/cggsvd.c b/lapack-netlib/SRC/DEPRECATED/cggsvd.c
index 1a8a827c1f..4f0c6f5882 100644
--- a/lapack-netlib/SRC/DEPRECATED/cggsvd.c
+++ b/lapack-netlib/SRC/DEPRECATED/cggsvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/*
You must link the resulting object file with the libraries:
diff --git a/lapack-netlib/SRC/DEPRECATED/cggsvp.c b/lapack-netlib/SRC/DEPRECATED/cggsvp.c
index 3bf5871725..047d9b3218 100644
--- a/lapack-netlib/SRC/DEPRECATED/cggsvp.c
+++ b/lapack-netlib/SRC/DEPRECATED/cggsvp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/clahrd.c b/lapack-netlib/SRC/DEPRECATED/clahrd.c
index 517e4786bf..7b60f014c0 100644
--- a/lapack-netlib/SRC/DEPRECATED/clahrd.c
+++ b/lapack-netlib/SRC/DEPRECATED/clahrd.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/SRC/DEPRECATED/clatzm.c b/lapack-netlib/SRC/DEPRECATED/clatzm.c
index 747f5bc114..e721ba9022 100644
--- a/lapack-netlib/SRC/DEPRECATED/clatzm.c
+++ b/lapack-netlib/SRC/DEPRECATED/clatzm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/SRC/DEPRECATED/ctzrqf.c b/lapack-netlib/SRC/DEPRECATED/ctzrqf.c
index 3986f7854c..045222f546 100644
--- a/lapack-netlib/SRC/DEPRECATED/ctzrqf.c
+++ b/lapack-netlib/SRC/DEPRECATED/ctzrqf.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
diff --git a/lapack-netlib/SRC/DEPRECATED/dgegs.c b/lapack-netlib/SRC/DEPRECATED/dgegs.c
index f034821a40..7d7b5e6462 100644
--- a/lapack-netlib/SRC/DEPRECATED/dgegs.c
+++ b/lapack-netlib/SRC/DEPRECATED/dgegs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
diff --git a/lapack-netlib/SRC/DEPRECATED/dgegv.c b/lapack-netlib/SRC/DEPRECATED/dgegv.c
index 38df37116d..72a146405c 100644
--- a/lapack-netlib/SRC/DEPRECATED/dgegv.c
+++ b/lapack-netlib/SRC/DEPRECATED/dgegv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/dgelqs.c b/lapack-netlib/SRC/DEPRECATED/dgelqs.c
index e3cf1e0295..df0c351b3c 100644
--- a/lapack-netlib/SRC/DEPRECATED/dgelqs.c
+++ b/lapack-netlib/SRC/DEPRECATED/dgelqs.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -256,15 +253,6 @@ typedef struct Namelist Namelist;
#define myhuge_(w) {HUGE_VAL}
#define mymaxloc_(w,s,e,n) dmaxloc_(w,*(s),*(e),n)
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/dgelsx.c b/lapack-netlib/SRC/DEPRECATED/dgelsx.c
index 5abeebe84f..5871f75013 100644
--- a/lapack-netlib/SRC/DEPRECATED/dgelsx.c
+++ b/lapack-netlib/SRC/DEPRECATED/dgelsx.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/dgeqpf.c b/lapack-netlib/SRC/DEPRECATED/dgeqpf.c
index 21c6a5c7d8..e23f53a6ab 100644
--- a/lapack-netlib/SRC/DEPRECATED/dgeqpf.c
+++ b/lapack-netlib/SRC/DEPRECATED/dgeqpf.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/*
You must link the resulting object file with the libraries:
diff --git a/lapack-netlib/SRC/DEPRECATED/dgeqrs.c b/lapack-netlib/SRC/DEPRECATED/dgeqrs.c
index 70236738a4..f94e69d8f7 100644
--- a/lapack-netlib/SRC/DEPRECATED/dgeqrs.c
+++ b/lapack-netlib/SRC/DEPRECATED/dgeqrs.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -256,15 +253,6 @@ typedef struct Namelist Namelist;
#define myhuge_(w) {HUGE_VAL}
#define mymaxloc_(w,s,e,n) dmaxloc_(w,*(s),*(e),n)
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/dggsvd.c b/lapack-netlib/SRC/DEPRECATED/dggsvd.c
index e5993b833c..fddc72cbda 100644
--- a/lapack-netlib/SRC/DEPRECATED/dggsvd.c
+++ b/lapack-netlib/SRC/DEPRECATED/dggsvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
diff --git a/lapack-netlib/SRC/DEPRECATED/dggsvp.c b/lapack-netlib/SRC/DEPRECATED/dggsvp.c
index b3a53fad1e..66cf0f39c1 100644
--- a/lapack-netlib/SRC/DEPRECATED/dggsvp.c
+++ b/lapack-netlib/SRC/DEPRECATED/dggsvp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/dlahrd.c b/lapack-netlib/SRC/DEPRECATED/dlahrd.c
index 30f7a0f7a0..0e960aaf21 100644
--- a/lapack-netlib/SRC/DEPRECATED/dlahrd.c
+++ b/lapack-netlib/SRC/DEPRECATED/dlahrd.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
diff --git a/lapack-netlib/SRC/DEPRECATED/dlatzm.c b/lapack-netlib/SRC/DEPRECATED/dlatzm.c
index 698b09e85e..c2954c4b7b 100644
--- a/lapack-netlib/SRC/DEPRECATED/dlatzm.c
+++ b/lapack-netlib/SRC/DEPRECATED/dlatzm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/SRC/DEPRECATED/dtzrqf.c b/lapack-netlib/SRC/DEPRECATED/dtzrqf.c
index ff47d4177b..f919ce5f11 100644
--- a/lapack-netlib/SRC/DEPRECATED/dtzrqf.c
+++ b/lapack-netlib/SRC/DEPRECATED/dtzrqf.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
diff --git a/lapack-netlib/SRC/DEPRECATED/sgegs.c b/lapack-netlib/SRC/DEPRECATED/sgegs.c
index 6ab9050e07..05b5bb584d 100644
--- a/lapack-netlib/SRC/DEPRECATED/sgegs.c
+++ b/lapack-netlib/SRC/DEPRECATED/sgegs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
diff --git a/lapack-netlib/SRC/DEPRECATED/sgegv.c b/lapack-netlib/SRC/DEPRECATED/sgegv.c
index 39b2d6fb6b..575feefbcc 100644
--- a/lapack-netlib/SRC/DEPRECATED/sgegv.c
+++ b/lapack-netlib/SRC/DEPRECATED/sgegv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/sgelqs.c b/lapack-netlib/SRC/DEPRECATED/sgelqs.c
index 03034b0dca..c0b9dc8cdd 100644
--- a/lapack-netlib/SRC/DEPRECATED/sgelqs.c
+++ b/lapack-netlib/SRC/DEPRECATED/sgelqs.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -258,13 +255,6 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
/* Table of constant values */
static real c_b7 = 1.f;
diff --git a/lapack-netlib/SRC/DEPRECATED/sgelsx.c b/lapack-netlib/SRC/DEPRECATED/sgelsx.c
index b2c480481a..c91c746b22 100644
--- a/lapack-netlib/SRC/DEPRECATED/sgelsx.c
+++ b/lapack-netlib/SRC/DEPRECATED/sgelsx.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/sgeqpf.c b/lapack-netlib/SRC/DEPRECATED/sgeqpf.c
index 67121341ec..d2889e44aa 100644
--- a/lapack-netlib/SRC/DEPRECATED/sgeqpf.c
+++ b/lapack-netlib/SRC/DEPRECATED/sgeqpf.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/*
You must link the resulting object file with the libraries:
diff --git a/lapack-netlib/SRC/DEPRECATED/sgeqrs.c b/lapack-netlib/SRC/DEPRECATED/sgeqrs.c
index b593d0dc9b..1530337f5e 100644
--- a/lapack-netlib/SRC/DEPRECATED/sgeqrs.c
+++ b/lapack-netlib/SRC/DEPRECATED/sgeqrs.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -256,15 +253,6 @@ typedef struct Namelist Namelist;
#define myhuge_(w) {HUGE_VAL}
#define mymaxloc_(w,s,e,n) dmaxloc_(w,*(s),*(e),n)
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/sggsvd.c b/lapack-netlib/SRC/DEPRECATED/sggsvd.c
index a10edf0601..39f60e5475 100644
--- a/lapack-netlib/SRC/DEPRECATED/sggsvd.c
+++ b/lapack-netlib/SRC/DEPRECATED/sggsvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
diff --git a/lapack-netlib/SRC/DEPRECATED/sggsvp.c b/lapack-netlib/SRC/DEPRECATED/sggsvp.c
index ca47bc6290..2626170c57 100644
--- a/lapack-netlib/SRC/DEPRECATED/sggsvp.c
+++ b/lapack-netlib/SRC/DEPRECATED/sggsvp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/slahrd.c b/lapack-netlib/SRC/DEPRECATED/slahrd.c
index 9202886864..518d6cc4e2 100644
--- a/lapack-netlib/SRC/DEPRECATED/slahrd.c
+++ b/lapack-netlib/SRC/DEPRECATED/slahrd.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/slatzm.c b/lapack-netlib/SRC/DEPRECATED/slatzm.c
index 6e53dceca8..7b84a5d3bb 100644
--- a/lapack-netlib/SRC/DEPRECATED/slatzm.c
+++ b/lapack-netlib/SRC/DEPRECATED/slatzm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
diff --git a/lapack-netlib/SRC/DEPRECATED/stzrqf.c b/lapack-netlib/SRC/DEPRECATED/stzrqf.c
index 72c0083bb0..61773343d0 100644
--- a/lapack-netlib/SRC/DEPRECATED/stzrqf.c
+++ b/lapack-netlib/SRC/DEPRECATED/stzrqf.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/SRC/DEPRECATED/zgegs.c b/lapack-netlib/SRC/DEPRECATED/zgegs.c
index c053ec4323..7f3b0ed62b 100644
--- a/lapack-netlib/SRC/DEPRECATED/zgegs.c
+++ b/lapack-netlib/SRC/DEPRECATED/zgegs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
diff --git a/lapack-netlib/SRC/DEPRECATED/zgegv.c b/lapack-netlib/SRC/DEPRECATED/zgegv.c
index 8272bd9181..791362d1d9 100644
--- a/lapack-netlib/SRC/DEPRECATED/zgegv.c
+++ b/lapack-netlib/SRC/DEPRECATED/zgegv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/zgelqs.c b/lapack-netlib/SRC/DEPRECATED/zgelqs.c
index b77ba906a4..59d84d7c2b 100644
--- a/lapack-netlib/SRC/DEPRECATED/zgelqs.c
+++ b/lapack-netlib/SRC/DEPRECATED/zgelqs.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -256,15 +253,6 @@ typedef struct Namelist Namelist;
#define myhuge_(w) {HUGE_VAL}
#define mymaxloc_(w,s,e,n) dmaxloc_(w,*(s),*(e),n)
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/zgelsx.c b/lapack-netlib/SRC/DEPRECATED/zgelsx.c
index 82d195550a..396a38f2a7 100644
--- a/lapack-netlib/SRC/DEPRECATED/zgelsx.c
+++ b/lapack-netlib/SRC/DEPRECATED/zgelsx.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/zgeqpf.c b/lapack-netlib/SRC/DEPRECATED/zgeqpf.c
index 0a2f8c7aa3..3f884d6603 100644
--- a/lapack-netlib/SRC/DEPRECATED/zgeqpf.c
+++ b/lapack-netlib/SRC/DEPRECATED/zgeqpf.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/*
You must link the resulting object file with the libraries:
diff --git a/lapack-netlib/SRC/DEPRECATED/zgeqrs.c b/lapack-netlib/SRC/DEPRECATED/zgeqrs.c
index 3e8f3cce7b..da3dccf4f8 100644
--- a/lapack-netlib/SRC/DEPRECATED/zgeqrs.c
+++ b/lapack-netlib/SRC/DEPRECATED/zgeqrs.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -256,15 +253,6 @@ typedef struct Namelist Namelist;
#define myhuge_(w) {HUGE_VAL}
#define mymaxloc_(w,s,e,n) dmaxloc_(w,*(s),*(e),n)
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/zggsvd.c b/lapack-netlib/SRC/DEPRECATED/zggsvd.c
index e9d7234043..5d252edce4 100644
--- a/lapack-netlib/SRC/DEPRECATED/zggsvd.c
+++ b/lapack-netlib/SRC/DEPRECATED/zggsvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/*
You must link the resulting object file with the libraries:
diff --git a/lapack-netlib/SRC/DEPRECATED/zggsvp.c b/lapack-netlib/SRC/DEPRECATED/zggsvp.c
index 0409e97b1a..c5b7fc1bc5 100644
--- a/lapack-netlib/SRC/DEPRECATED/zggsvp.c
+++ b/lapack-netlib/SRC/DEPRECATED/zggsvp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/*
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
diff --git a/lapack-netlib/SRC/DEPRECATED/zlahrd.c b/lapack-netlib/SRC/DEPRECATED/zlahrd.c
index 41c26d98eb..b35355153f 100644
--- a/lapack-netlib/SRC/DEPRECATED/zlahrd.c
+++ b/lapack-netlib/SRC/DEPRECATED/zlahrd.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/SRC/DEPRECATED/zlatzm.c b/lapack-netlib/SRC/DEPRECATED/zlatzm.c
index 25c4765245..f7f67b0dbb 100644
--- a/lapack-netlib/SRC/DEPRECATED/zlatzm.c
+++ b/lapack-netlib/SRC/DEPRECATED/zlatzm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/SRC/DEPRECATED/ztzrqf.c b/lapack-netlib/SRC/DEPRECATED/ztzrqf.c
index 3a94fa79ad..54ec15c1eb 100644
--- a/lapack-netlib/SRC/DEPRECATED/ztzrqf.c
+++ b/lapack-netlib/SRC/DEPRECATED/ztzrqf.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/SRC/cbbcsd.c b/lapack-netlib/SRC/cbbcsd.c
index 5754ab80b2..097b5ab938 100644
--- a/lapack-netlib/SRC/cbbcsd.c
+++ b/lapack-netlib/SRC/cbbcsd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cbdsqr.c b/lapack-netlib/SRC/cbdsqr.c
index c9b4d00983..f913307cf4 100644
--- a/lapack-netlib/SRC/cbdsqr.c
+++ b/lapack-netlib/SRC/cbdsqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgbbrd.c b/lapack-netlib/SRC/cgbbrd.c
index 929f34d13b..b4ec9b26bc 100644
--- a/lapack-netlib/SRC/cgbbrd.c
+++ b/lapack-netlib/SRC/cgbbrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgbcon.c b/lapack-netlib/SRC/cgbcon.c
index 87565510f0..1945c221fa 100644
--- a/lapack-netlib/SRC/cgbcon.c
+++ b/lapack-netlib/SRC/cgbcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgbequ.c b/lapack-netlib/SRC/cgbequ.c
index 149497aaf5..a7abb8f4e1 100644
--- a/lapack-netlib/SRC/cgbequ.c
+++ b/lapack-netlib/SRC/cgbequ.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgbequb.c b/lapack-netlib/SRC/cgbequb.c
index caa9354999..fcc4b74474 100644
--- a/lapack-netlib/SRC/cgbequb.c
+++ b/lapack-netlib/SRC/cgbequb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgbrfs.c b/lapack-netlib/SRC/cgbrfs.c
index 8b9ab20d97..886e4926e0 100644
--- a/lapack-netlib/SRC/cgbrfs.c
+++ b/lapack-netlib/SRC/cgbrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgbrfsx.c b/lapack-netlib/SRC/cgbrfsx.c
index aa3ac4f728..61885f2fe1 100644
--- a/lapack-netlib/SRC/cgbrfsx.c
+++ b/lapack-netlib/SRC/cgbrfsx.c
@@ -54,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -257,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgbsv.c b/lapack-netlib/SRC/cgbsv.c
index 2bc88cc762..a5c1d7d125 100644
--- a/lapack-netlib/SRC/cgbsv.c
+++ b/lapack-netlib/SRC/cgbsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgbsvx.c b/lapack-netlib/SRC/cgbsvx.c
index 92118b3929..518a02dbd5 100644
--- a/lapack-netlib/SRC/cgbsvx.c
+++ b/lapack-netlib/SRC/cgbsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgbsvx.f b/lapack-netlib/SRC/cgbsvx.f
index 7b6770d20d..eaab5682c7 100644
--- a/lapack-netlib/SRC/cgbsvx.f
+++ b/lapack-netlib/SRC/cgbsvx.f
@@ -322,7 +322,7 @@
*>
*> \param[out] RWORK
*> \verbatim
-*> RWORK is REAL array, dimension (N)
+*> RWORK is REAL array, dimension (MAX(1,N))
*> On exit, RWORK(1) contains the reciprocal pivot growth
*> factor norm(A)/norm(U). The "max absolute element" norm is
*> used. If RWORK(1) is much less than 1, then the stability
diff --git a/lapack-netlib/SRC/cgbsvxx.c b/lapack-netlib/SRC/cgbsvxx.c
index 7e0142b462..774bc30d78 100644
--- a/lapack-netlib/SRC/cgbsvxx.c
+++ b/lapack-netlib/SRC/cgbsvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgbtf2.c b/lapack-netlib/SRC/cgbtf2.c
index e09126c80d..6493e7a14d 100644
--- a/lapack-netlib/SRC/cgbtf2.c
+++ b/lapack-netlib/SRC/cgbtf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgbtrf.c b/lapack-netlib/SRC/cgbtrf.c
index 36a782d540..cacdd6ec24 100644
--- a/lapack-netlib/SRC/cgbtrf.c
+++ b/lapack-netlib/SRC/cgbtrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgbtrs.c b/lapack-netlib/SRC/cgbtrs.c
index 86df26e23c..cd2232c14d 100644
--- a/lapack-netlib/SRC/cgbtrs.c
+++ b/lapack-netlib/SRC/cgbtrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgebak.c b/lapack-netlib/SRC/cgebak.c
index a40b10ba2a..92cb843d06 100644
--- a/lapack-netlib/SRC/cgebak.c
+++ b/lapack-netlib/SRC/cgebak.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgebal.c b/lapack-netlib/SRC/cgebal.c
index 26e8279448..483e2b4102 100644
--- a/lapack-netlib/SRC/cgebal.c
+++ b/lapack-netlib/SRC/cgebal.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgebd2.c b/lapack-netlib/SRC/cgebd2.c
index 6beb67a560..c0f164272b 100644
--- a/lapack-netlib/SRC/cgebd2.c
+++ b/lapack-netlib/SRC/cgebd2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgebrd.c b/lapack-netlib/SRC/cgebrd.c
index e474cdac31..1427fa34e1 100644
--- a/lapack-netlib/SRC/cgebrd.c
+++ b/lapack-netlib/SRC/cgebrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgecon.c b/lapack-netlib/SRC/cgecon.c
index dd67491bec..a8f084ec84 100644
--- a/lapack-netlib/SRC/cgecon.c
+++ b/lapack-netlib/SRC/cgecon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgedmd.c b/lapack-netlib/SRC/cgedmd.c
index 570395c7b1..8850d2848e 100644
--- a/lapack-netlib/SRC/cgedmd.c
+++ b/lapack-netlib/SRC/cgedmd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgedmdq.c b/lapack-netlib/SRC/cgedmdq.c
index 6e3a1faca0..afb5c73536 100644
--- a/lapack-netlib/SRC/cgedmdq.c
+++ b/lapack-netlib/SRC/cgedmdq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeequ.c b/lapack-netlib/SRC/cgeequ.c
index 466b9290d4..5c043f8654 100644
--- a/lapack-netlib/SRC/cgeequ.c
+++ b/lapack-netlib/SRC/cgeequ.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeequb.c b/lapack-netlib/SRC/cgeequb.c
index 4834039305..d107d7d8b0 100644
--- a/lapack-netlib/SRC/cgeequb.c
+++ b/lapack-netlib/SRC/cgeequb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgees.c b/lapack-netlib/SRC/cgees.c
index a0b44c4b3a..9145dc6598 100644
--- a/lapack-netlib/SRC/cgees.c
+++ b/lapack-netlib/SRC/cgees.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeesx.c b/lapack-netlib/SRC/cgeesx.c
index 848125f1e9..b4c408ce43 100644
--- a/lapack-netlib/SRC/cgeesx.c
+++ b/lapack-netlib/SRC/cgeesx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeev.c b/lapack-netlib/SRC/cgeev.c
index b5022234bf..1df44bca2c 100644
--- a/lapack-netlib/SRC/cgeev.c
+++ b/lapack-netlib/SRC/cgeev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeevx.c b/lapack-netlib/SRC/cgeevx.c
index 1d59f2c703..531ec71bef 100644
--- a/lapack-netlib/SRC/cgeevx.c
+++ b/lapack-netlib/SRC/cgeevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgehd2.c b/lapack-netlib/SRC/cgehd2.c
index 16d4fd76e9..2330a27ae5 100644
--- a/lapack-netlib/SRC/cgehd2.c
+++ b/lapack-netlib/SRC/cgehd2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgehrd.c b/lapack-netlib/SRC/cgehrd.c
index 86f3705a13..a3919624bd 100644
--- a/lapack-netlib/SRC/cgehrd.c
+++ b/lapack-netlib/SRC/cgehrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgejsv.c b/lapack-netlib/SRC/cgejsv.c
index e4bfd86aee..a3e356ff26 100644
--- a/lapack-netlib/SRC/cgejsv.c
+++ b/lapack-netlib/SRC/cgejsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgelq.c b/lapack-netlib/SRC/cgelq.c
index 0d9ca6399f..889d8985a7 100644
--- a/lapack-netlib/SRC/cgelq.c
+++ b/lapack-netlib/SRC/cgelq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgelq2.c b/lapack-netlib/SRC/cgelq2.c
index 5dae7577f7..4d4bfd5491 100644
--- a/lapack-netlib/SRC/cgelq2.c
+++ b/lapack-netlib/SRC/cgelq2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgelqf.c b/lapack-netlib/SRC/cgelqf.c
index 3aa95c1779..d7bf1234ea 100644
--- a/lapack-netlib/SRC/cgelqf.c
+++ b/lapack-netlib/SRC/cgelqf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgelqt.c b/lapack-netlib/SRC/cgelqt.c
index 9f05cfa347..4ace1dd26e 100644
--- a/lapack-netlib/SRC/cgelqt.c
+++ b/lapack-netlib/SRC/cgelqt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgelqt3.c b/lapack-netlib/SRC/cgelqt3.c
index 0d7b3d0516..64d8552ce1 100644
--- a/lapack-netlib/SRC/cgelqt3.c
+++ b/lapack-netlib/SRC/cgelqt3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgels.c b/lapack-netlib/SRC/cgels.c
index 6ac7240a88..1a84f97b37 100644
--- a/lapack-netlib/SRC/cgels.c
+++ b/lapack-netlib/SRC/cgels.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgelsd.c b/lapack-netlib/SRC/cgelsd.c
index 195e7b8d22..145c65274a 100644
--- a/lapack-netlib/SRC/cgelsd.c
+++ b/lapack-netlib/SRC/cgelsd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgelss.c b/lapack-netlib/SRC/cgelss.c
index 2fe469a91e..71227e33a4 100644
--- a/lapack-netlib/SRC/cgelss.c
+++ b/lapack-netlib/SRC/cgelss.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgelst.c b/lapack-netlib/SRC/cgelst.c
index 21187e28dc..2378d4074f 100644
--- a/lapack-netlib/SRC/cgelst.c
+++ b/lapack-netlib/SRC/cgelst.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgelsy.c b/lapack-netlib/SRC/cgelsy.c
index a9db55ea3e..dc1e5158f9 100644
--- a/lapack-netlib/SRC/cgelsy.c
+++ b/lapack-netlib/SRC/cgelsy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgemlq.c b/lapack-netlib/SRC/cgemlq.c
index 527ab2fedd..cbc80360b9 100644
--- a/lapack-netlib/SRC/cgemlq.c
+++ b/lapack-netlib/SRC/cgemlq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgemlqt.c b/lapack-netlib/SRC/cgemlqt.c
index ef6e1cfabe..6087b28a48 100644
--- a/lapack-netlib/SRC/cgemlqt.c
+++ b/lapack-netlib/SRC/cgemlqt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgemqr.c b/lapack-netlib/SRC/cgemqr.c
index 0ec64b7965..dbe3bf7536 100644
--- a/lapack-netlib/SRC/cgemqr.c
+++ b/lapack-netlib/SRC/cgemqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgemqrt.c b/lapack-netlib/SRC/cgemqrt.c
index f374c4a642..08c69c1513 100644
--- a/lapack-netlib/SRC/cgemqrt.c
+++ b/lapack-netlib/SRC/cgemqrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeql2.c b/lapack-netlib/SRC/cgeql2.c
index 240c0dc956..bfc1066989 100644
--- a/lapack-netlib/SRC/cgeql2.c
+++ b/lapack-netlib/SRC/cgeql2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeqlf.c b/lapack-netlib/SRC/cgeqlf.c
index 08a18a3353..e923ace8af 100644
--- a/lapack-netlib/SRC/cgeqlf.c
+++ b/lapack-netlib/SRC/cgeqlf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeqp3.c b/lapack-netlib/SRC/cgeqp3.c
index 8376d54dce..e34adf7007 100644
--- a/lapack-netlib/SRC/cgeqp3.c
+++ b/lapack-netlib/SRC/cgeqp3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeqp3rk.c b/lapack-netlib/SRC/cgeqp3rk.c
index 54e7fb1403..3afd9fc89f 100644
--- a/lapack-netlib/SRC/cgeqp3rk.c
+++ b/lapack-netlib/SRC/cgeqp3rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeqr.c b/lapack-netlib/SRC/cgeqr.c
index 2389e358aa..bd3fb98256 100644
--- a/lapack-netlib/SRC/cgeqr.c
+++ b/lapack-netlib/SRC/cgeqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeqr2.c b/lapack-netlib/SRC/cgeqr2.c
index a3adcb7a86..a403450b95 100644
--- a/lapack-netlib/SRC/cgeqr2.c
+++ b/lapack-netlib/SRC/cgeqr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeqr2p.c b/lapack-netlib/SRC/cgeqr2p.c
index cdefd0c9ba..f93abd79eb 100644
--- a/lapack-netlib/SRC/cgeqr2p.c
+++ b/lapack-netlib/SRC/cgeqr2p.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeqrf.c b/lapack-netlib/SRC/cgeqrf.c
index 42aa20b317..9ddcd20abe 100644
--- a/lapack-netlib/SRC/cgeqrf.c
+++ b/lapack-netlib/SRC/cgeqrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeqrfp.c b/lapack-netlib/SRC/cgeqrfp.c
index 3f577aa745..4cf0ddd733 100644
--- a/lapack-netlib/SRC/cgeqrfp.c
+++ b/lapack-netlib/SRC/cgeqrfp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeqrt.c b/lapack-netlib/SRC/cgeqrt.c
index 362ae322d2..55f0ab829f 100644
--- a/lapack-netlib/SRC/cgeqrt.c
+++ b/lapack-netlib/SRC/cgeqrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeqrt2.c b/lapack-netlib/SRC/cgeqrt2.c
index fb7ceb441e..80ce2cbd37 100644
--- a/lapack-netlib/SRC/cgeqrt2.c
+++ b/lapack-netlib/SRC/cgeqrt2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgeqrt3.c b/lapack-netlib/SRC/cgeqrt3.c
index 8471a6f059..c4fe4c6ce0 100644
--- a/lapack-netlib/SRC/cgeqrt3.c
+++ b/lapack-netlib/SRC/cgeqrt3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgerfs.c b/lapack-netlib/SRC/cgerfs.c
index 91b60c677e..3931e4716d 100644
--- a/lapack-netlib/SRC/cgerfs.c
+++ b/lapack-netlib/SRC/cgerfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgerfsx.c b/lapack-netlib/SRC/cgerfsx.c
index aa3ac4f728..61885f2fe1 100644
--- a/lapack-netlib/SRC/cgerfsx.c
+++ b/lapack-netlib/SRC/cgerfsx.c
@@ -54,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -257,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgerq2.c b/lapack-netlib/SRC/cgerq2.c
index 05e6d6c9cd..205f6d3b95 100644
--- a/lapack-netlib/SRC/cgerq2.c
+++ b/lapack-netlib/SRC/cgerq2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgerqf.c b/lapack-netlib/SRC/cgerqf.c
index f13a5b245b..5e988d06ea 100644
--- a/lapack-netlib/SRC/cgerqf.c
+++ b/lapack-netlib/SRC/cgerqf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgesc2.c b/lapack-netlib/SRC/cgesc2.c
index 6bde5e427f..0f438be4fa 100644
--- a/lapack-netlib/SRC/cgesc2.c
+++ b/lapack-netlib/SRC/cgesc2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgesdd.c b/lapack-netlib/SRC/cgesdd.c
index 3ff545231e..15f270501a 100644
--- a/lapack-netlib/SRC/cgesdd.c
+++ b/lapack-netlib/SRC/cgesdd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgesv.c b/lapack-netlib/SRC/cgesv.c
index f74542d125..35402e4428 100644
--- a/lapack-netlib/SRC/cgesv.c
+++ b/lapack-netlib/SRC/cgesv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgesvd.c b/lapack-netlib/SRC/cgesvd.c
index 67a2c00305..64de714a25 100644
--- a/lapack-netlib/SRC/cgesvd.c
+++ b/lapack-netlib/SRC/cgesvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgesvdq.c b/lapack-netlib/SRC/cgesvdq.c
index 77f1b45f30..5e39f1cd1f 100644
--- a/lapack-netlib/SRC/cgesvdq.c
+++ b/lapack-netlib/SRC/cgesvdq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgesvdx.c b/lapack-netlib/SRC/cgesvdx.c
index 0274709a3f..999e6e40f3 100644
--- a/lapack-netlib/SRC/cgesvdx.c
+++ b/lapack-netlib/SRC/cgesvdx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgesvj.c b/lapack-netlib/SRC/cgesvj.c
index 82837435b1..c31a71edb1 100644
--- a/lapack-netlib/SRC/cgesvj.c
+++ b/lapack-netlib/SRC/cgesvj.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgesvx.c b/lapack-netlib/SRC/cgesvx.c
index cc7485672c..952ac564cb 100644
--- a/lapack-netlib/SRC/cgesvx.c
+++ b/lapack-netlib/SRC/cgesvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgesvx.f b/lapack-netlib/SRC/cgesvx.f
index 66c714bb1c..74a37e9a0e 100644
--- a/lapack-netlib/SRC/cgesvx.f
+++ b/lapack-netlib/SRC/cgesvx.f
@@ -302,7 +302,7 @@
*>
*> \param[out] RWORK
*> \verbatim
-*> RWORK is REAL array, dimension (2*N)
+*> RWORK is REAL array, dimension (MAX(1,2*N))
*> On exit, RWORK(1) contains the reciprocal pivot growth
*> factor norm(A)/norm(U). The "max absolute element" norm is
*> used. If RWORK(1) is much less than 1, then the stability
diff --git a/lapack-netlib/SRC/cgesvxx.c b/lapack-netlib/SRC/cgesvxx.c
index c17d8f5991..a0f997545f 100644
--- a/lapack-netlib/SRC/cgesvxx.c
+++ b/lapack-netlib/SRC/cgesvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgetc2.c b/lapack-netlib/SRC/cgetc2.c
index 46362ce927..c6b3a46ee2 100644
--- a/lapack-netlib/SRC/cgetc2.c
+++ b/lapack-netlib/SRC/cgetc2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgetf2.c b/lapack-netlib/SRC/cgetf2.c
index e7b8f558c7..8418162dbf 100644
--- a/lapack-netlib/SRC/cgetf2.c
+++ b/lapack-netlib/SRC/cgetf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgetrf.c b/lapack-netlib/SRC/cgetrf.c
index a5fc71f1d0..6202fc1496 100644
--- a/lapack-netlib/SRC/cgetrf.c
+++ b/lapack-netlib/SRC/cgetrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgetrf2.c b/lapack-netlib/SRC/cgetrf2.c
index 4d0a8ecc1f..4592fbafba 100644
--- a/lapack-netlib/SRC/cgetrf2.c
+++ b/lapack-netlib/SRC/cgetrf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgetri.c b/lapack-netlib/SRC/cgetri.c
index aed0fbd54c..9d9aebab69 100644
--- a/lapack-netlib/SRC/cgetri.c
+++ b/lapack-netlib/SRC/cgetri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgetrs.c b/lapack-netlib/SRC/cgetrs.c
index 3d895187d3..ad5dfe7ce1 100644
--- a/lapack-netlib/SRC/cgetrs.c
+++ b/lapack-netlib/SRC/cgetrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgetsls.c b/lapack-netlib/SRC/cgetsls.c
index b2a87f4f0b..33c7b192ab 100644
--- a/lapack-netlib/SRC/cgetsls.c
+++ b/lapack-netlib/SRC/cgetsls.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgetsqrhrt.c b/lapack-netlib/SRC/cgetsqrhrt.c
index 922a911c39..0ad22aff79 100644
--- a/lapack-netlib/SRC/cgetsqrhrt.c
+++ b/lapack-netlib/SRC/cgetsqrhrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cggbak.c b/lapack-netlib/SRC/cggbak.c
index d55caff2e4..c3aa839459 100644
--- a/lapack-netlib/SRC/cggbak.c
+++ b/lapack-netlib/SRC/cggbak.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cggbal.c b/lapack-netlib/SRC/cggbal.c
index b68f6c3625..c3710b9830 100644
--- a/lapack-netlib/SRC/cggbal.c
+++ b/lapack-netlib/SRC/cggbal.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgges.c b/lapack-netlib/SRC/cgges.c
index 1c1db9a87d..ade0a38164 100644
--- a/lapack-netlib/SRC/cgges.c
+++ b/lapack-netlib/SRC/cgges.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgges3.c b/lapack-netlib/SRC/cgges3.c
index e7b2e877ec..4cc9411a02 100644
--- a/lapack-netlib/SRC/cgges3.c
+++ b/lapack-netlib/SRC/cgges3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cggesx.c b/lapack-netlib/SRC/cggesx.c
index d33dad3391..375332cdb9 100644
--- a/lapack-netlib/SRC/cggesx.c
+++ b/lapack-netlib/SRC/cggesx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cggev.c b/lapack-netlib/SRC/cggev.c
index bb7b0b4f64..cb70995653 100644
--- a/lapack-netlib/SRC/cggev.c
+++ b/lapack-netlib/SRC/cggev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cggev3.c b/lapack-netlib/SRC/cggev3.c
index 511635d3d4..a5768ca118 100644
--- a/lapack-netlib/SRC/cggev3.c
+++ b/lapack-netlib/SRC/cggev3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cggevx.c b/lapack-netlib/SRC/cggevx.c
index 4b72816d8c..8c17497ceb 100644
--- a/lapack-netlib/SRC/cggevx.c
+++ b/lapack-netlib/SRC/cggevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cggglm.c b/lapack-netlib/SRC/cggglm.c
index 8165d277b0..a71d656f0d 100644
--- a/lapack-netlib/SRC/cggglm.c
+++ b/lapack-netlib/SRC/cggglm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgghd3.c b/lapack-netlib/SRC/cgghd3.c
index 71f56c6bbc..4394805abd 100644
--- a/lapack-netlib/SRC/cgghd3.c
+++ b/lapack-netlib/SRC/cgghd3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgghrd.c b/lapack-netlib/SRC/cgghrd.c
index f67b1460b0..649c69b42f 100644
--- a/lapack-netlib/SRC/cgghrd.c
+++ b/lapack-netlib/SRC/cgghrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgglse.c b/lapack-netlib/SRC/cgglse.c
index 7b35f8fe49..67871b3180 100644
--- a/lapack-netlib/SRC/cgglse.c
+++ b/lapack-netlib/SRC/cgglse.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cggqrf.c b/lapack-netlib/SRC/cggqrf.c
index 27da14abe8..e59ef8f8b4 100644
--- a/lapack-netlib/SRC/cggqrf.c
+++ b/lapack-netlib/SRC/cggqrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cggrqf.c b/lapack-netlib/SRC/cggrqf.c
index d499d70831..9cdcf275eb 100644
--- a/lapack-netlib/SRC/cggrqf.c
+++ b/lapack-netlib/SRC/cggrqf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cggsvd3.c b/lapack-netlib/SRC/cggsvd3.c
index b467a606ce..c22c621bca 100644
--- a/lapack-netlib/SRC/cggsvd3.c
+++ b/lapack-netlib/SRC/cggsvd3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cggsvp3.c b/lapack-netlib/SRC/cggsvp3.c
index a3fc3e4e7b..e394ab9058 100644
--- a/lapack-netlib/SRC/cggsvp3.c
+++ b/lapack-netlib/SRC/cggsvp3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgsvj0.c b/lapack-netlib/SRC/cgsvj0.c
index 50c00aa638..baf6410f53 100644
--- a/lapack-netlib/SRC/cgsvj0.c
+++ b/lapack-netlib/SRC/cgsvj0.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgsvj1.c b/lapack-netlib/SRC/cgsvj1.c
index 9ee9d043a4..d52880f3ba 100644
--- a/lapack-netlib/SRC/cgsvj1.c
+++ b/lapack-netlib/SRC/cgsvj1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgtcon.c b/lapack-netlib/SRC/cgtcon.c
index 284fc2584c..bf0c32e9ff 100644
--- a/lapack-netlib/SRC/cgtcon.c
+++ b/lapack-netlib/SRC/cgtcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgtrfs.c b/lapack-netlib/SRC/cgtrfs.c
index dd0316af41..bcb2d9465c 100644
--- a/lapack-netlib/SRC/cgtrfs.c
+++ b/lapack-netlib/SRC/cgtrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgtsv.c b/lapack-netlib/SRC/cgtsv.c
index acff81cdf8..7982e59bc8 100644
--- a/lapack-netlib/SRC/cgtsv.c
+++ b/lapack-netlib/SRC/cgtsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgtsvx.c b/lapack-netlib/SRC/cgtsvx.c
index 93956c7678..34585d9ced 100644
--- a/lapack-netlib/SRC/cgtsvx.c
+++ b/lapack-netlib/SRC/cgtsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgttrf.c b/lapack-netlib/SRC/cgttrf.c
index 2b6aa9ce8a..13f80705ab 100644
--- a/lapack-netlib/SRC/cgttrf.c
+++ b/lapack-netlib/SRC/cgttrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgttrs.c b/lapack-netlib/SRC/cgttrs.c
index c846fae8b7..e41b649a5b 100644
--- a/lapack-netlib/SRC/cgttrs.c
+++ b/lapack-netlib/SRC/cgttrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cgtts2.c b/lapack-netlib/SRC/cgtts2.c
index 153537493d..bcf53d4f1a 100644
--- a/lapack-netlib/SRC/cgtts2.c
+++ b/lapack-netlib/SRC/cgtts2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chb2st_kernels.c b/lapack-netlib/SRC/chb2st_kernels.c
index 58f3d3d942..efb4158d01 100644
--- a/lapack-netlib/SRC/chb2st_kernels.c
+++ b/lapack-netlib/SRC/chb2st_kernels.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chbev.c b/lapack-netlib/SRC/chbev.c
index d5a40cc93a..5b26dd38e5 100644
--- a/lapack-netlib/SRC/chbev.c
+++ b/lapack-netlib/SRC/chbev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chbev_2stage.c b/lapack-netlib/SRC/chbev_2stage.c
index 6e75065d8e..885e3ac486 100644
--- a/lapack-netlib/SRC/chbev_2stage.c
+++ b/lapack-netlib/SRC/chbev_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chbevd.c b/lapack-netlib/SRC/chbevd.c
index a15df5cf48..5065c6ee4c 100644
--- a/lapack-netlib/SRC/chbevd.c
+++ b/lapack-netlib/SRC/chbevd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chbevd_2stage.c b/lapack-netlib/SRC/chbevd_2stage.c
index d5dbd357cd..bb60ea807a 100644
--- a/lapack-netlib/SRC/chbevd_2stage.c
+++ b/lapack-netlib/SRC/chbevd_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chbevx.c b/lapack-netlib/SRC/chbevx.c
index e854802569..39ed25b11b 100644
--- a/lapack-netlib/SRC/chbevx.c
+++ b/lapack-netlib/SRC/chbevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chbevx_2stage.c b/lapack-netlib/SRC/chbevx_2stage.c
index 1572222572..4e34bddb41 100644
--- a/lapack-netlib/SRC/chbevx_2stage.c
+++ b/lapack-netlib/SRC/chbevx_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chbgst.c b/lapack-netlib/SRC/chbgst.c
index 416ce9ec4c..4a61253534 100644
--- a/lapack-netlib/SRC/chbgst.c
+++ b/lapack-netlib/SRC/chbgst.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chbgv.c b/lapack-netlib/SRC/chbgv.c
index 1a5c67c606..fd25c6f785 100644
--- a/lapack-netlib/SRC/chbgv.c
+++ b/lapack-netlib/SRC/chbgv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chbgvd.c b/lapack-netlib/SRC/chbgvd.c
index c1aada39fe..f484904241 100644
--- a/lapack-netlib/SRC/chbgvd.c
+++ b/lapack-netlib/SRC/chbgvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chbgvx.c b/lapack-netlib/SRC/chbgvx.c
index 191399fa57..0cbeeeff50 100644
--- a/lapack-netlib/SRC/chbgvx.c
+++ b/lapack-netlib/SRC/chbgvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chbtrd.c b/lapack-netlib/SRC/chbtrd.c
index d748da9172..ae8965d13a 100644
--- a/lapack-netlib/SRC/chbtrd.c
+++ b/lapack-netlib/SRC/chbtrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/checon.c b/lapack-netlib/SRC/checon.c
index 8539008965..56b65a7ec2 100644
--- a/lapack-netlib/SRC/checon.c
+++ b/lapack-netlib/SRC/checon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/checon_3.c b/lapack-netlib/SRC/checon_3.c
index b5318afc46..ced3b62383 100644
--- a/lapack-netlib/SRC/checon_3.c
+++ b/lapack-netlib/SRC/checon_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/checon_rook.c b/lapack-netlib/SRC/checon_rook.c
index fda6cc6315..796dc9a0de 100644
--- a/lapack-netlib/SRC/checon_rook.c
+++ b/lapack-netlib/SRC/checon_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cheequb.c b/lapack-netlib/SRC/cheequb.c
index 141ceee143..f9f4c78ec5 100644
--- a/lapack-netlib/SRC/cheequb.c
+++ b/lapack-netlib/SRC/cheequb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cheev.c b/lapack-netlib/SRC/cheev.c
index 03e05dc60c..2fd79fd890 100644
--- a/lapack-netlib/SRC/cheev.c
+++ b/lapack-netlib/SRC/cheev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cheev_2stage.c b/lapack-netlib/SRC/cheev_2stage.c
index 4aec6a9335..f70ac96c6a 100644
--- a/lapack-netlib/SRC/cheev_2stage.c
+++ b/lapack-netlib/SRC/cheev_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cheevd.c b/lapack-netlib/SRC/cheevd.c
index 0f494f4266..c4d7f88024 100644
--- a/lapack-netlib/SRC/cheevd.c
+++ b/lapack-netlib/SRC/cheevd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cheevd_2stage.c b/lapack-netlib/SRC/cheevd_2stage.c
index 8ded0446c5..21def564c0 100644
--- a/lapack-netlib/SRC/cheevd_2stage.c
+++ b/lapack-netlib/SRC/cheevd_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cheevr.c b/lapack-netlib/SRC/cheevr.c
index 0799305adf..6bf5228607 100644
--- a/lapack-netlib/SRC/cheevr.c
+++ b/lapack-netlib/SRC/cheevr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cheevr_2stage.c b/lapack-netlib/SRC/cheevr_2stage.c
index 73bbe617d8..86da2b76b7 100644
--- a/lapack-netlib/SRC/cheevr_2stage.c
+++ b/lapack-netlib/SRC/cheevr_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cheevx.c b/lapack-netlib/SRC/cheevx.c
index c68954121f..2285ea596f 100644
--- a/lapack-netlib/SRC/cheevx.c
+++ b/lapack-netlib/SRC/cheevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cheevx_2stage.c b/lapack-netlib/SRC/cheevx_2stage.c
index 3bd68fd658..3287a06650 100644
--- a/lapack-netlib/SRC/cheevx_2stage.c
+++ b/lapack-netlib/SRC/cheevx_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chegs2.c b/lapack-netlib/SRC/chegs2.c
index 14762a5cfd..0c6af6139f 100644
--- a/lapack-netlib/SRC/chegs2.c
+++ b/lapack-netlib/SRC/chegs2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chegst.c b/lapack-netlib/SRC/chegst.c
index 5140e846d2..9634a8036c 100644
--- a/lapack-netlib/SRC/chegst.c
+++ b/lapack-netlib/SRC/chegst.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chegv.c b/lapack-netlib/SRC/chegv.c
index 599f47ffb9..00fad8162c 100644
--- a/lapack-netlib/SRC/chegv.c
+++ b/lapack-netlib/SRC/chegv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chegv_2stage.c b/lapack-netlib/SRC/chegv_2stage.c
index 340820c9bb..2fbf3f49f9 100644
--- a/lapack-netlib/SRC/chegv_2stage.c
+++ b/lapack-netlib/SRC/chegv_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chegvd.c b/lapack-netlib/SRC/chegvd.c
index 1259b737fa..0b33453be1 100644
--- a/lapack-netlib/SRC/chegvd.c
+++ b/lapack-netlib/SRC/chegvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chegvx.c b/lapack-netlib/SRC/chegvx.c
index 198c480d5e..fae6c19865 100644
--- a/lapack-netlib/SRC/chegvx.c
+++ b/lapack-netlib/SRC/chegvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cherfs.c b/lapack-netlib/SRC/cherfs.c
index f10c671f89..1861a18858 100644
--- a/lapack-netlib/SRC/cherfs.c
+++ b/lapack-netlib/SRC/cherfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cherfsx.c b/lapack-netlib/SRC/cherfsx.c
index aa3ac4f728..61885f2fe1 100644
--- a/lapack-netlib/SRC/cherfsx.c
+++ b/lapack-netlib/SRC/cherfsx.c
@@ -54,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -257,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chesv.c b/lapack-netlib/SRC/chesv.c
index 8c438db95b..1754443d20 100644
--- a/lapack-netlib/SRC/chesv.c
+++ b/lapack-netlib/SRC/chesv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chesv_aa.c b/lapack-netlib/SRC/chesv_aa.c
index 9401ecb619..42a1357312 100644
--- a/lapack-netlib/SRC/chesv_aa.c
+++ b/lapack-netlib/SRC/chesv_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chesv_aa_2stage.c b/lapack-netlib/SRC/chesv_aa_2stage.c
index 31c4127be3..232369685c 100644
--- a/lapack-netlib/SRC/chesv_aa_2stage.c
+++ b/lapack-netlib/SRC/chesv_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chesv_rk.c b/lapack-netlib/SRC/chesv_rk.c
index f1acea5167..2b73e4455f 100644
--- a/lapack-netlib/SRC/chesv_rk.c
+++ b/lapack-netlib/SRC/chesv_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chesv_rook.c b/lapack-netlib/SRC/chesv_rook.c
index b3311798c8..6548818e40 100644
--- a/lapack-netlib/SRC/chesv_rook.c
+++ b/lapack-netlib/SRC/chesv_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chesvx.c b/lapack-netlib/SRC/chesvx.c
index 18a299a0d3..fc99f57a46 100644
--- a/lapack-netlib/SRC/chesvx.c
+++ b/lapack-netlib/SRC/chesvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chesvxx.c b/lapack-netlib/SRC/chesvxx.c
index ce97591667..751f0871cd 100644
--- a/lapack-netlib/SRC/chesvxx.c
+++ b/lapack-netlib/SRC/chesvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cheswapr.c b/lapack-netlib/SRC/cheswapr.c
index 9c475e78dc..2f018e0151 100644
--- a/lapack-netlib/SRC/cheswapr.c
+++ b/lapack-netlib/SRC/cheswapr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetd2.c b/lapack-netlib/SRC/chetd2.c
index b52f5e8d7e..f459875db5 100644
--- a/lapack-netlib/SRC/chetd2.c
+++ b/lapack-netlib/SRC/chetd2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetf2.c b/lapack-netlib/SRC/chetf2.c
index 6c186962c4..d664807603 100644
--- a/lapack-netlib/SRC/chetf2.c
+++ b/lapack-netlib/SRC/chetf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetf2_rk.c b/lapack-netlib/SRC/chetf2_rk.c
index 2d1754531f..1ee4af9410 100644
--- a/lapack-netlib/SRC/chetf2_rk.c
+++ b/lapack-netlib/SRC/chetf2_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetf2_rook.c b/lapack-netlib/SRC/chetf2_rook.c
index d623cc5ab7..922c29fbbf 100644
--- a/lapack-netlib/SRC/chetf2_rook.c
+++ b/lapack-netlib/SRC/chetf2_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrd.c b/lapack-netlib/SRC/chetrd.c
index 67ff572d23..075071e345 100644
--- a/lapack-netlib/SRC/chetrd.c
+++ b/lapack-netlib/SRC/chetrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrd_2stage.c b/lapack-netlib/SRC/chetrd_2stage.c
index d61672b83a..861051794a 100644
--- a/lapack-netlib/SRC/chetrd_2stage.c
+++ b/lapack-netlib/SRC/chetrd_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrd_hb2st.c b/lapack-netlib/SRC/chetrd_hb2st.c
index cbcebf3dd6..cb3344fc7c 100644
--- a/lapack-netlib/SRC/chetrd_hb2st.c
+++ b/lapack-netlib/SRC/chetrd_hb2st.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrd_he2hb.c b/lapack-netlib/SRC/chetrd_he2hb.c
index 8461cc7784..1bf08ed686 100644
--- a/lapack-netlib/SRC/chetrd_he2hb.c
+++ b/lapack-netlib/SRC/chetrd_he2hb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrf.c b/lapack-netlib/SRC/chetrf.c
index 0b1a12cf07..112140771c 100644
--- a/lapack-netlib/SRC/chetrf.c
+++ b/lapack-netlib/SRC/chetrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrf_aa.c b/lapack-netlib/SRC/chetrf_aa.c
index 707043942e..4937a007a0 100644
--- a/lapack-netlib/SRC/chetrf_aa.c
+++ b/lapack-netlib/SRC/chetrf_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrf_aa_2stage.c b/lapack-netlib/SRC/chetrf_aa_2stage.c
index 47de92e10c..bb34f96f01 100644
--- a/lapack-netlib/SRC/chetrf_aa_2stage.c
+++ b/lapack-netlib/SRC/chetrf_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrf_rk.c b/lapack-netlib/SRC/chetrf_rk.c
index 953c497f2e..0bd16a089e 100644
--- a/lapack-netlib/SRC/chetrf_rk.c
+++ b/lapack-netlib/SRC/chetrf_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrf_rook.c b/lapack-netlib/SRC/chetrf_rook.c
index 5025d7d275..d873296cf3 100644
--- a/lapack-netlib/SRC/chetrf_rook.c
+++ b/lapack-netlib/SRC/chetrf_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetri.c b/lapack-netlib/SRC/chetri.c
index 01a8b298e1..5432212734 100644
--- a/lapack-netlib/SRC/chetri.c
+++ b/lapack-netlib/SRC/chetri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetri2.c b/lapack-netlib/SRC/chetri2.c
index 529a24fc71..8f319e4e95 100644
--- a/lapack-netlib/SRC/chetri2.c
+++ b/lapack-netlib/SRC/chetri2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetri2x.c b/lapack-netlib/SRC/chetri2x.c
index 00869feade..a839fa707e 100644
--- a/lapack-netlib/SRC/chetri2x.c
+++ b/lapack-netlib/SRC/chetri2x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetri_3.c b/lapack-netlib/SRC/chetri_3.c
index f174298e46..b966d1dbdb 100644
--- a/lapack-netlib/SRC/chetri_3.c
+++ b/lapack-netlib/SRC/chetri_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetri_3x.c b/lapack-netlib/SRC/chetri_3x.c
index 145dcccef6..491ca4d254 100644
--- a/lapack-netlib/SRC/chetri_3x.c
+++ b/lapack-netlib/SRC/chetri_3x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetri_rook.c b/lapack-netlib/SRC/chetri_rook.c
index ae64d562a4..808363a29c 100644
--- a/lapack-netlib/SRC/chetri_rook.c
+++ b/lapack-netlib/SRC/chetri_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrs.c b/lapack-netlib/SRC/chetrs.c
index e8f259cce3..32d58c7b16 100644
--- a/lapack-netlib/SRC/chetrs.c
+++ b/lapack-netlib/SRC/chetrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrs2.c b/lapack-netlib/SRC/chetrs2.c
index 854cfd69c1..31e7c817d9 100644
--- a/lapack-netlib/SRC/chetrs2.c
+++ b/lapack-netlib/SRC/chetrs2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrs_3.c b/lapack-netlib/SRC/chetrs_3.c
index 9e46d445cd..1a22b2a962 100644
--- a/lapack-netlib/SRC/chetrs_3.c
+++ b/lapack-netlib/SRC/chetrs_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrs_aa.c b/lapack-netlib/SRC/chetrs_aa.c
index 464bc96672..0e0b5f316d 100644
--- a/lapack-netlib/SRC/chetrs_aa.c
+++ b/lapack-netlib/SRC/chetrs_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrs_aa_2stage.c b/lapack-netlib/SRC/chetrs_aa_2stage.c
index d4cca77e5f..38c21852b5 100644
--- a/lapack-netlib/SRC/chetrs_aa_2stage.c
+++ b/lapack-netlib/SRC/chetrs_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chetrs_rook.c b/lapack-netlib/SRC/chetrs_rook.c
index f2c4c30c0e..1662d373d8 100644
--- a/lapack-netlib/SRC/chetrs_rook.c
+++ b/lapack-netlib/SRC/chetrs_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chfrk.c b/lapack-netlib/SRC/chfrk.c
index 3604d0566c..23d23355c3 100644
--- a/lapack-netlib/SRC/chfrk.c
+++ b/lapack-netlib/SRC/chfrk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chgeqz.c b/lapack-netlib/SRC/chgeqz.c
index 2781ce6302..1097091399 100644
--- a/lapack-netlib/SRC/chgeqz.c
+++ b/lapack-netlib/SRC/chgeqz.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chla_transtype.c b/lapack-netlib/SRC/chla_transtype.c
index 7bb53987e0..7b0781d0fb 100644
--- a/lapack-netlib/SRC/chla_transtype.c
+++ b/lapack-netlib/SRC/chla_transtype.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chpcon.c b/lapack-netlib/SRC/chpcon.c
index 54f4a8159b..02af5ed6d2 100644
--- a/lapack-netlib/SRC/chpcon.c
+++ b/lapack-netlib/SRC/chpcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chpev.c b/lapack-netlib/SRC/chpev.c
index 2a704ec064..25e2fa5bd6 100644
--- a/lapack-netlib/SRC/chpev.c
+++ b/lapack-netlib/SRC/chpev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chpevd.c b/lapack-netlib/SRC/chpevd.c
index 9e5224da07..3e70bc1d9e 100644
--- a/lapack-netlib/SRC/chpevd.c
+++ b/lapack-netlib/SRC/chpevd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chpevx.c b/lapack-netlib/SRC/chpevx.c
index 8435471914..e127633896 100644
--- a/lapack-netlib/SRC/chpevx.c
+++ b/lapack-netlib/SRC/chpevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chpgst.c b/lapack-netlib/SRC/chpgst.c
index 30898fc849..03320d36b4 100644
--- a/lapack-netlib/SRC/chpgst.c
+++ b/lapack-netlib/SRC/chpgst.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chpgv.c b/lapack-netlib/SRC/chpgv.c
index 9028fa5d67..1c079e7538 100644
--- a/lapack-netlib/SRC/chpgv.c
+++ b/lapack-netlib/SRC/chpgv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chpgvd.c b/lapack-netlib/SRC/chpgvd.c
index 18e1100dfd..295a975d1a 100644
--- a/lapack-netlib/SRC/chpgvd.c
+++ b/lapack-netlib/SRC/chpgvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chpgvx.c b/lapack-netlib/SRC/chpgvx.c
index da649dd47f..f352725104 100644
--- a/lapack-netlib/SRC/chpgvx.c
+++ b/lapack-netlib/SRC/chpgvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chprfs.c b/lapack-netlib/SRC/chprfs.c
index 612976b281..ca33e648e3 100644
--- a/lapack-netlib/SRC/chprfs.c
+++ b/lapack-netlib/SRC/chprfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chpsv.c b/lapack-netlib/SRC/chpsv.c
index ee137647c7..b10f9503e6 100644
--- a/lapack-netlib/SRC/chpsv.c
+++ b/lapack-netlib/SRC/chpsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chpsvx.c b/lapack-netlib/SRC/chpsvx.c
index b6377469ba..7bd76d1be1 100644
--- a/lapack-netlib/SRC/chpsvx.c
+++ b/lapack-netlib/SRC/chpsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chptrd.c b/lapack-netlib/SRC/chptrd.c
index 8a42cd4d1f..1882f68d65 100644
--- a/lapack-netlib/SRC/chptrd.c
+++ b/lapack-netlib/SRC/chptrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chptrf.c b/lapack-netlib/SRC/chptrf.c
index 8e0c5f1662..9bbcd22f05 100644
--- a/lapack-netlib/SRC/chptrf.c
+++ b/lapack-netlib/SRC/chptrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chptri.c b/lapack-netlib/SRC/chptri.c
index 334da92b1c..054664681d 100644
--- a/lapack-netlib/SRC/chptri.c
+++ b/lapack-netlib/SRC/chptri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chptrs.c b/lapack-netlib/SRC/chptrs.c
index 941362df1c..919330f673 100644
--- a/lapack-netlib/SRC/chptrs.c
+++ b/lapack-netlib/SRC/chptrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chsein.c b/lapack-netlib/SRC/chsein.c
index eeaaffb0cd..87c177bc64 100644
--- a/lapack-netlib/SRC/chsein.c
+++ b/lapack-netlib/SRC/chsein.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/chseqr.c b/lapack-netlib/SRC/chseqr.c
index 002313ba2a..b98db683b1 100644
--- a/lapack-netlib/SRC/chseqr.c
+++ b/lapack-netlib/SRC/chseqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_gbamv.c b/lapack-netlib/SRC/cla_gbamv.c
index a5978c82d4..1d3b549214 100644
--- a/lapack-netlib/SRC/cla_gbamv.c
+++ b/lapack-netlib/SRC/cla_gbamv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_gbrcond_c.c b/lapack-netlib/SRC/cla_gbrcond_c.c
index e6ade54240..7172f59f6e 100644
--- a/lapack-netlib/SRC/cla_gbrcond_c.c
+++ b/lapack-netlib/SRC/cla_gbrcond_c.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_gbrcond_x.c b/lapack-netlib/SRC/cla_gbrcond_x.c
index 2c00c8f761..a3a55b9ea8 100644
--- a/lapack-netlib/SRC/cla_gbrcond_x.c
+++ b/lapack-netlib/SRC/cla_gbrcond_x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_gbrfsx_extended.c b/lapack-netlib/SRC/cla_gbrfsx_extended.c
index f793251d42..fb7db29dbe 100644
--- a/lapack-netlib/SRC/cla_gbrfsx_extended.c
+++ b/lapack-netlib/SRC/cla_gbrfsx_extended.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_gbrpvgrw.c b/lapack-netlib/SRC/cla_gbrpvgrw.c
index 47bbb51cc5..cabf167e25 100644
--- a/lapack-netlib/SRC/cla_gbrpvgrw.c
+++ b/lapack-netlib/SRC/cla_gbrpvgrw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_geamv.c b/lapack-netlib/SRC/cla_geamv.c
index 4b936d3fb4..7cb9d33dbc 100644
--- a/lapack-netlib/SRC/cla_geamv.c
+++ b/lapack-netlib/SRC/cla_geamv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_gercond_c.c b/lapack-netlib/SRC/cla_gercond_c.c
index d94e84f9ea..53c8728dc0 100644
--- a/lapack-netlib/SRC/cla_gercond_c.c
+++ b/lapack-netlib/SRC/cla_gercond_c.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_gercond_x.c b/lapack-netlib/SRC/cla_gercond_x.c
index ac5eb18679..905c6e186a 100644
--- a/lapack-netlib/SRC/cla_gercond_x.c
+++ b/lapack-netlib/SRC/cla_gercond_x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_gerfsx_extended.c b/lapack-netlib/SRC/cla_gerfsx_extended.c
index 1adc015bb9..3984f1d17e 100644
--- a/lapack-netlib/SRC/cla_gerfsx_extended.c
+++ b/lapack-netlib/SRC/cla_gerfsx_extended.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_gerpvgrw.c b/lapack-netlib/SRC/cla_gerpvgrw.c
index 4a5e5867e9..873e087c9d 100644
--- a/lapack-netlib/SRC/cla_gerpvgrw.c
+++ b/lapack-netlib/SRC/cla_gerpvgrw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_heamv.c b/lapack-netlib/SRC/cla_heamv.c
index cb7a356243..40ff92caa6 100644
--- a/lapack-netlib/SRC/cla_heamv.c
+++ b/lapack-netlib/SRC/cla_heamv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_hercond_c.c b/lapack-netlib/SRC/cla_hercond_c.c
index 56d922f1ca..57f94b21a2 100644
--- a/lapack-netlib/SRC/cla_hercond_c.c
+++ b/lapack-netlib/SRC/cla_hercond_c.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_hercond_x.c b/lapack-netlib/SRC/cla_hercond_x.c
index 271eab4ba6..a2a2ea4937 100644
--- a/lapack-netlib/SRC/cla_hercond_x.c
+++ b/lapack-netlib/SRC/cla_hercond_x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_herfsx_extended.c b/lapack-netlib/SRC/cla_herfsx_extended.c
index f721e573f3..289c8c0eb6 100644
--- a/lapack-netlib/SRC/cla_herfsx_extended.c
+++ b/lapack-netlib/SRC/cla_herfsx_extended.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_herpvgrw.c b/lapack-netlib/SRC/cla_herpvgrw.c
index 7694549278..d0fd9afaa8 100644
--- a/lapack-netlib/SRC/cla_herpvgrw.c
+++ b/lapack-netlib/SRC/cla_herpvgrw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_lin_berr.c b/lapack-netlib/SRC/cla_lin_berr.c
index e4a356f01f..f7b11e567b 100644
--- a/lapack-netlib/SRC/cla_lin_berr.c
+++ b/lapack-netlib/SRC/cla_lin_berr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_porcond_c.c b/lapack-netlib/SRC/cla_porcond_c.c
index c8c18f1022..e282fb42a3 100644
--- a/lapack-netlib/SRC/cla_porcond_c.c
+++ b/lapack-netlib/SRC/cla_porcond_c.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_porcond_x.c b/lapack-netlib/SRC/cla_porcond_x.c
index 8491049238..192a498899 100644
--- a/lapack-netlib/SRC/cla_porcond_x.c
+++ b/lapack-netlib/SRC/cla_porcond_x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_porfsx_extended.c b/lapack-netlib/SRC/cla_porfsx_extended.c
index 4346519f50..42f41e2415 100644
--- a/lapack-netlib/SRC/cla_porfsx_extended.c
+++ b/lapack-netlib/SRC/cla_porfsx_extended.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_porpvgrw.c b/lapack-netlib/SRC/cla_porpvgrw.c
index 7fe941c9ef..dedfc61d24 100644
--- a/lapack-netlib/SRC/cla_porpvgrw.c
+++ b/lapack-netlib/SRC/cla_porpvgrw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_syamv.c b/lapack-netlib/SRC/cla_syamv.c
index bfd3a03a31..2e9c91cec5 100644
--- a/lapack-netlib/SRC/cla_syamv.c
+++ b/lapack-netlib/SRC/cla_syamv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_syrcond_c.c b/lapack-netlib/SRC/cla_syrcond_c.c
index 21b09af462..b36da6fa2f 100644
--- a/lapack-netlib/SRC/cla_syrcond_c.c
+++ b/lapack-netlib/SRC/cla_syrcond_c.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_syrcond_x.c b/lapack-netlib/SRC/cla_syrcond_x.c
index f14c0925a1..2801b6ee3f 100644
--- a/lapack-netlib/SRC/cla_syrcond_x.c
+++ b/lapack-netlib/SRC/cla_syrcond_x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_syrfsx_extended.c b/lapack-netlib/SRC/cla_syrfsx_extended.c
index f76de38553..3ad595ebe9 100644
--- a/lapack-netlib/SRC/cla_syrfsx_extended.c
+++ b/lapack-netlib/SRC/cla_syrfsx_extended.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_syrpvgrw.c b/lapack-netlib/SRC/cla_syrpvgrw.c
index 9ff5f2d19d..1a722d1d9e 100644
--- a/lapack-netlib/SRC/cla_syrpvgrw.c
+++ b/lapack-netlib/SRC/cla_syrpvgrw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cla_wwaddw.c b/lapack-netlib/SRC/cla_wwaddw.c
index 34f2f6a78c..999bee392c 100644
--- a/lapack-netlib/SRC/cla_wwaddw.c
+++ b/lapack-netlib/SRC/cla_wwaddw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clabrd.c b/lapack-netlib/SRC/clabrd.c
index 08cbe07dc5..0d1d299a8f 100644
--- a/lapack-netlib/SRC/clabrd.c
+++ b/lapack-netlib/SRC/clabrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clacgv.c b/lapack-netlib/SRC/clacgv.c
index 1b8411e5e7..46e8e115ed 100644
--- a/lapack-netlib/SRC/clacgv.c
+++ b/lapack-netlib/SRC/clacgv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clacn2.c b/lapack-netlib/SRC/clacn2.c
index e8ba4b0c70..f4138bdc7d 100644
--- a/lapack-netlib/SRC/clacn2.c
+++ b/lapack-netlib/SRC/clacn2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clacon.c b/lapack-netlib/SRC/clacon.c
index 243ecd11be..52187649f9 100644
--- a/lapack-netlib/SRC/clacon.c
+++ b/lapack-netlib/SRC/clacon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clacp2.c b/lapack-netlib/SRC/clacp2.c
index f41ab98183..078018ef79 100644
--- a/lapack-netlib/SRC/clacp2.c
+++ b/lapack-netlib/SRC/clacp2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clacpy.c b/lapack-netlib/SRC/clacpy.c
index e2b988a937..2395e0c989 100644
--- a/lapack-netlib/SRC/clacpy.c
+++ b/lapack-netlib/SRC/clacpy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clacrm.c b/lapack-netlib/SRC/clacrm.c
index f4633af64d..ed7b9215a1 100644
--- a/lapack-netlib/SRC/clacrm.c
+++ b/lapack-netlib/SRC/clacrm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clacrt.c b/lapack-netlib/SRC/clacrt.c
index 9f89ba906b..7faa247797 100644
--- a/lapack-netlib/SRC/clacrt.c
+++ b/lapack-netlib/SRC/clacrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cladiv.c b/lapack-netlib/SRC/cladiv.c
index fb8c84aff4..10ffa2a284 100644
--- a/lapack-netlib/SRC/cladiv.c
+++ b/lapack-netlib/SRC/cladiv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claed0.c b/lapack-netlib/SRC/claed0.c
index 185f648444..381ca74c1f 100644
--- a/lapack-netlib/SRC/claed0.c
+++ b/lapack-netlib/SRC/claed0.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claed7.c b/lapack-netlib/SRC/claed7.c
index 2c9aef5a97..0a4f970ddd 100644
--- a/lapack-netlib/SRC/claed7.c
+++ b/lapack-netlib/SRC/claed7.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claed8.c b/lapack-netlib/SRC/claed8.c
index f6c3a3106d..bc7c360f87 100644
--- a/lapack-netlib/SRC/claed8.c
+++ b/lapack-netlib/SRC/claed8.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claein.c b/lapack-netlib/SRC/claein.c
index 21b2d45fe0..cea6c9825f 100644
--- a/lapack-netlib/SRC/claein.c
+++ b/lapack-netlib/SRC/claein.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claesy.c b/lapack-netlib/SRC/claesy.c
index cd217e71dc..81440412bd 100644
--- a/lapack-netlib/SRC/claesy.c
+++ b/lapack-netlib/SRC/claesy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claev2.c b/lapack-netlib/SRC/claev2.c
index c1aaaae937..69736b44c1 100644
--- a/lapack-netlib/SRC/claev2.c
+++ b/lapack-netlib/SRC/claev2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clag2z.c b/lapack-netlib/SRC/clag2z.c
index 98bf82b8df..ff455c7e2e 100644
--- a/lapack-netlib/SRC/clag2z.c
+++ b/lapack-netlib/SRC/clag2z.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clags2.c b/lapack-netlib/SRC/clags2.c
index 2a58b634e4..6323cde978 100644
--- a/lapack-netlib/SRC/clags2.c
+++ b/lapack-netlib/SRC/clags2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clagtm.c b/lapack-netlib/SRC/clagtm.c
index d1db98464d..0bc287e046 100644
--- a/lapack-netlib/SRC/clagtm.c
+++ b/lapack-netlib/SRC/clagtm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clahef.c b/lapack-netlib/SRC/clahef.c
index 1cf2bdbba9..42bd1ac771 100644
--- a/lapack-netlib/SRC/clahef.c
+++ b/lapack-netlib/SRC/clahef.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clahef_aa.c b/lapack-netlib/SRC/clahef_aa.c
index 535a770e1a..10e024a759 100644
--- a/lapack-netlib/SRC/clahef_aa.c
+++ b/lapack-netlib/SRC/clahef_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clahef_rk.c b/lapack-netlib/SRC/clahef_rk.c
index 9b3d074537..a841b2515e 100644
--- a/lapack-netlib/SRC/clahef_rk.c
+++ b/lapack-netlib/SRC/clahef_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clahef_rook.c b/lapack-netlib/SRC/clahef_rook.c
index ed3e91ecfc..f77aedc3c3 100644
--- a/lapack-netlib/SRC/clahef_rook.c
+++ b/lapack-netlib/SRC/clahef_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clahqr.c b/lapack-netlib/SRC/clahqr.c
index a862b32bc1..05aaa484d9 100644
--- a/lapack-netlib/SRC/clahqr.c
+++ b/lapack-netlib/SRC/clahqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clahr2.c b/lapack-netlib/SRC/clahr2.c
index 09f3ccc7cc..f3877b07da 100644
--- a/lapack-netlib/SRC/clahr2.c
+++ b/lapack-netlib/SRC/clahr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claic1.c b/lapack-netlib/SRC/claic1.c
index bde27f3761..0c51d41d21 100644
--- a/lapack-netlib/SRC/claic1.c
+++ b/lapack-netlib/SRC/claic1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clals0.c b/lapack-netlib/SRC/clals0.c
index b2d57e34e9..c37066cacc 100644
--- a/lapack-netlib/SRC/clals0.c
+++ b/lapack-netlib/SRC/clals0.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clalsa.c b/lapack-netlib/SRC/clalsa.c
index 711d1a868b..2d8d187577 100644
--- a/lapack-netlib/SRC/clalsa.c
+++ b/lapack-netlib/SRC/clalsa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clalsd.c b/lapack-netlib/SRC/clalsd.c
index bc6135f63c..3c0ac35ebe 100644
--- a/lapack-netlib/SRC/clalsd.c
+++ b/lapack-netlib/SRC/clalsd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clamswlq.c b/lapack-netlib/SRC/clamswlq.c
index ed84b30749..cc666294bb 100644
--- a/lapack-netlib/SRC/clamswlq.c
+++ b/lapack-netlib/SRC/clamswlq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clamtsqr.c b/lapack-netlib/SRC/clamtsqr.c
index 553013785b..c8c6ce86c7 100644
--- a/lapack-netlib/SRC/clamtsqr.c
+++ b/lapack-netlib/SRC/clamtsqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clangb.c b/lapack-netlib/SRC/clangb.c
index 7276060032..75e3dc68af 100644
--- a/lapack-netlib/SRC/clangb.c
+++ b/lapack-netlib/SRC/clangb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clange.c b/lapack-netlib/SRC/clange.c
index 7e4e073894..da57e9cde4 100644
--- a/lapack-netlib/SRC/clange.c
+++ b/lapack-netlib/SRC/clange.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clangt.c b/lapack-netlib/SRC/clangt.c
index d9d55a9cad..e9a51eea59 100644
--- a/lapack-netlib/SRC/clangt.c
+++ b/lapack-netlib/SRC/clangt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clanhb.c b/lapack-netlib/SRC/clanhb.c
index 497c9ca2d7..528a92b305 100644
--- a/lapack-netlib/SRC/clanhb.c
+++ b/lapack-netlib/SRC/clanhb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clanhe.c b/lapack-netlib/SRC/clanhe.c
index 6b9f8e8266..c739ae8294 100644
--- a/lapack-netlib/SRC/clanhe.c
+++ b/lapack-netlib/SRC/clanhe.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clanhf.c b/lapack-netlib/SRC/clanhf.c
index 4755084e5f..2bee60a463 100644
--- a/lapack-netlib/SRC/clanhf.c
+++ b/lapack-netlib/SRC/clanhf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clanhp.c b/lapack-netlib/SRC/clanhp.c
index 7b21fdd384..7dd13d6da5 100644
--- a/lapack-netlib/SRC/clanhp.c
+++ b/lapack-netlib/SRC/clanhp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clanhs.c b/lapack-netlib/SRC/clanhs.c
index 3ba45e7a0a..7fd7d8dd05 100644
--- a/lapack-netlib/SRC/clanhs.c
+++ b/lapack-netlib/SRC/clanhs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clanht.c b/lapack-netlib/SRC/clanht.c
index 8383b15a91..01b8ff0a0d 100644
--- a/lapack-netlib/SRC/clanht.c
+++ b/lapack-netlib/SRC/clanht.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clansb.c b/lapack-netlib/SRC/clansb.c
index 098afaea8f..cf8227766b 100644
--- a/lapack-netlib/SRC/clansb.c
+++ b/lapack-netlib/SRC/clansb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clansp.c b/lapack-netlib/SRC/clansp.c
index 120443574e..7f276b854d 100644
--- a/lapack-netlib/SRC/clansp.c
+++ b/lapack-netlib/SRC/clansp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clansy.c b/lapack-netlib/SRC/clansy.c
index 5855b365a5..dce61068fd 100644
--- a/lapack-netlib/SRC/clansy.c
+++ b/lapack-netlib/SRC/clansy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clantb.c b/lapack-netlib/SRC/clantb.c
index f13532cedc..7c4ad45229 100644
--- a/lapack-netlib/SRC/clantb.c
+++ b/lapack-netlib/SRC/clantb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clantp.c b/lapack-netlib/SRC/clantp.c
index 29cde18685..2d063d39dc 100644
--- a/lapack-netlib/SRC/clantp.c
+++ b/lapack-netlib/SRC/clantp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clantr.c b/lapack-netlib/SRC/clantr.c
index 1a7132a70b..63df0252ef 100644
--- a/lapack-netlib/SRC/clantr.c
+++ b/lapack-netlib/SRC/clantr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clapll.c b/lapack-netlib/SRC/clapll.c
index 3263178200..15116c55e7 100644
--- a/lapack-netlib/SRC/clapll.c
+++ b/lapack-netlib/SRC/clapll.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clapmr.c b/lapack-netlib/SRC/clapmr.c
index f61d1923b1..d611167b9e 100644
--- a/lapack-netlib/SRC/clapmr.c
+++ b/lapack-netlib/SRC/clapmr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clapmt.c b/lapack-netlib/SRC/clapmt.c
index 6f3f220266..059424e88c 100644
--- a/lapack-netlib/SRC/clapmt.c
+++ b/lapack-netlib/SRC/clapmt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqgb.c b/lapack-netlib/SRC/claqgb.c
index 1a00478bd8..5da1775b72 100644
--- a/lapack-netlib/SRC/claqgb.c
+++ b/lapack-netlib/SRC/claqgb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqge.c b/lapack-netlib/SRC/claqge.c
index c1b2bd196c..dcedde2a7c 100644
--- a/lapack-netlib/SRC/claqge.c
+++ b/lapack-netlib/SRC/claqge.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqhb.c b/lapack-netlib/SRC/claqhb.c
index 53f04e3a56..3f6741b991 100644
--- a/lapack-netlib/SRC/claqhb.c
+++ b/lapack-netlib/SRC/claqhb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqhe.c b/lapack-netlib/SRC/claqhe.c
index 050de301b5..c41f85c984 100644
--- a/lapack-netlib/SRC/claqhe.c
+++ b/lapack-netlib/SRC/claqhe.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqhp.c b/lapack-netlib/SRC/claqhp.c
index 2597f0cbb7..8d7b1987e5 100644
--- a/lapack-netlib/SRC/claqhp.c
+++ b/lapack-netlib/SRC/claqhp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqp2.c b/lapack-netlib/SRC/claqp2.c
index 58e4008d28..6e7ff04c10 100644
--- a/lapack-netlib/SRC/claqp2.c
+++ b/lapack-netlib/SRC/claqp2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqp2rk.c b/lapack-netlib/SRC/claqp2rk.c
index 4184c59278..9e64e24289 100644
--- a/lapack-netlib/SRC/claqp2rk.c
+++ b/lapack-netlib/SRC/claqp2rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqp3rk.c b/lapack-netlib/SRC/claqp3rk.c
index ca305fab7f..92c570e61e 100644
--- a/lapack-netlib/SRC/claqp3rk.c
+++ b/lapack-netlib/SRC/claqp3rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqps.c b/lapack-netlib/SRC/claqps.c
index 125823b24b..5e834b9eaa 100644
--- a/lapack-netlib/SRC/claqps.c
+++ b/lapack-netlib/SRC/claqps.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqr0.c b/lapack-netlib/SRC/claqr0.c
index 78c0ca8504..25e589b239 100644
--- a/lapack-netlib/SRC/claqr0.c
+++ b/lapack-netlib/SRC/claqr0.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqr1.c b/lapack-netlib/SRC/claqr1.c
index 9a4d8b1e2b..b69a6f635d 100644
--- a/lapack-netlib/SRC/claqr1.c
+++ b/lapack-netlib/SRC/claqr1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqr2.c b/lapack-netlib/SRC/claqr2.c
index cf50f81c28..ee1f8050b6 100644
--- a/lapack-netlib/SRC/claqr2.c
+++ b/lapack-netlib/SRC/claqr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqr3.c b/lapack-netlib/SRC/claqr3.c
index d72a00622c..e0c84e6c86 100644
--- a/lapack-netlib/SRC/claqr3.c
+++ b/lapack-netlib/SRC/claqr3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqr4.c b/lapack-netlib/SRC/claqr4.c
index 0abf2416ed..3ebe723ba9 100644
--- a/lapack-netlib/SRC/claqr4.c
+++ b/lapack-netlib/SRC/claqr4.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqr5.c b/lapack-netlib/SRC/claqr5.c
index f608c6498e..e464801449 100644
--- a/lapack-netlib/SRC/claqr5.c
+++ b/lapack-netlib/SRC/claqr5.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqsb.c b/lapack-netlib/SRC/claqsb.c
index dd7f124039..a661a762ba 100644
--- a/lapack-netlib/SRC/claqsb.c
+++ b/lapack-netlib/SRC/claqsb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqsp.c b/lapack-netlib/SRC/claqsp.c
index 2380c85636..0eea85904f 100644
--- a/lapack-netlib/SRC/claqsp.c
+++ b/lapack-netlib/SRC/claqsp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqsy.c b/lapack-netlib/SRC/claqsy.c
index 6f78b14213..d332c59a8d 100644
--- a/lapack-netlib/SRC/claqsy.c
+++ b/lapack-netlib/SRC/claqsy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqz0.c b/lapack-netlib/SRC/claqz0.c
index d05923a46d..6d7e7d5340 100644
--- a/lapack-netlib/SRC/claqz0.c
+++ b/lapack-netlib/SRC/claqz0.c
@@ -18,8 +18,28 @@
#ifdef I
#undef I
#endif
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
-typedef int integer;
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +53,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +256,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqz1.c b/lapack-netlib/SRC/claqz1.c
index d05923a46d..7856e080ff 100644
--- a/lapack-netlib/SRC/claqz1.c
+++ b/lapack-netlib/SRC/claqz1.c
@@ -19,7 +19,28 @@
#undef I
#endif
-typedef int integer;
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
+
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqz2.c b/lapack-netlib/SRC/claqz2.c
index d05923a46d..7856e080ff 100644
--- a/lapack-netlib/SRC/claqz2.c
+++ b/lapack-netlib/SRC/claqz2.c
@@ -19,7 +19,28 @@
#undef I
#endif
-typedef int integer;
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
+
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claqz3.c b/lapack-netlib/SRC/claqz3.c
index d05923a46d..7856e080ff 100644
--- a/lapack-netlib/SRC/claqz3.c
+++ b/lapack-netlib/SRC/claqz3.c
@@ -19,7 +19,28 @@
#undef I
#endif
-typedef int integer;
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
+
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clar1v.c b/lapack-netlib/SRC/clar1v.c
index c67a19c932..f96f97d411 100644
--- a/lapack-netlib/SRC/clar1v.c
+++ b/lapack-netlib/SRC/clar1v.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clar2v.c b/lapack-netlib/SRC/clar2v.c
index abe5b226b2..8e0c1a0b05 100644
--- a/lapack-netlib/SRC/clar2v.c
+++ b/lapack-netlib/SRC/clar2v.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarcm.c b/lapack-netlib/SRC/clarcm.c
index ff1af10439..6bc44f9d0b 100644
--- a/lapack-netlib/SRC/clarcm.c
+++ b/lapack-netlib/SRC/clarcm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarf.c b/lapack-netlib/SRC/clarf.c
index 5d08bee903..770f94b188 100644
--- a/lapack-netlib/SRC/clarf.c
+++ b/lapack-netlib/SRC/clarf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarfb.c b/lapack-netlib/SRC/clarfb.c
index e62517579c..cf5d850713 100644
--- a/lapack-netlib/SRC/clarfb.c
+++ b/lapack-netlib/SRC/clarfb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarfb_gett.c b/lapack-netlib/SRC/clarfb_gett.c
index 7cf3550e77..5cca69d24c 100644
--- a/lapack-netlib/SRC/clarfb_gett.c
+++ b/lapack-netlib/SRC/clarfb_gett.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarfg.c b/lapack-netlib/SRC/clarfg.c
index 7fe91f1b54..9deed53d85 100644
--- a/lapack-netlib/SRC/clarfg.c
+++ b/lapack-netlib/SRC/clarfg.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarfgp.c b/lapack-netlib/SRC/clarfgp.c
index e87a6b7c0a..5de4728f47 100644
--- a/lapack-netlib/SRC/clarfgp.c
+++ b/lapack-netlib/SRC/clarfgp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarft.c b/lapack-netlib/SRC/clarft.c
index e26b8402e1..76b4dcf1eb 100644
--- a/lapack-netlib/SRC/clarft.c
+++ b/lapack-netlib/SRC/clarft.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarfx.c b/lapack-netlib/SRC/clarfx.c
index d5d61945fb..4f70bb97ec 100644
--- a/lapack-netlib/SRC/clarfx.c
+++ b/lapack-netlib/SRC/clarfx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarfy.c b/lapack-netlib/SRC/clarfy.c
index 15a83738d0..086902c47f 100644
--- a/lapack-netlib/SRC/clarfy.c
+++ b/lapack-netlib/SRC/clarfy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clargv.c b/lapack-netlib/SRC/clargv.c
index 6ed8623bec..239f6ca7c8 100644
--- a/lapack-netlib/SRC/clargv.c
+++ b/lapack-netlib/SRC/clargv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarnv.c b/lapack-netlib/SRC/clarnv.c
index aafd0ee707..e42cc0caff 100644
--- a/lapack-netlib/SRC/clarnv.c
+++ b/lapack-netlib/SRC/clarnv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarrv.c b/lapack-netlib/SRC/clarrv.c
index 5fb8764eb3..92b3aa08c5 100644
--- a/lapack-netlib/SRC/clarrv.c
+++ b/lapack-netlib/SRC/clarrv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarscl2.c b/lapack-netlib/SRC/clarscl2.c
index 920ee8e04b..48641bc923 100644
--- a/lapack-netlib/SRC/clarscl2.c
+++ b/lapack-netlib/SRC/clarscl2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clartg.c b/lapack-netlib/SRC/clartg.c
index 8d318f5cdc..83a74a2b0f 100644
--- a/lapack-netlib/SRC/clartg.c
+++ b/lapack-netlib/SRC/clartg.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clartv.c b/lapack-netlib/SRC/clartv.c
index 04c23485d8..bbbe553d21 100644
--- a/lapack-netlib/SRC/clartv.c
+++ b/lapack-netlib/SRC/clartv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarz.c b/lapack-netlib/SRC/clarz.c
index d50c2e74f4..dbffdec65e 100644
--- a/lapack-netlib/SRC/clarz.c
+++ b/lapack-netlib/SRC/clarz.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarzb.c b/lapack-netlib/SRC/clarzb.c
index f20a1fb2e5..dd69c2a8ec 100644
--- a/lapack-netlib/SRC/clarzb.c
+++ b/lapack-netlib/SRC/clarzb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clarzt.c b/lapack-netlib/SRC/clarzt.c
index e0665d0814..09fbc5efcf 100644
--- a/lapack-netlib/SRC/clarzt.c
+++ b/lapack-netlib/SRC/clarzt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clascl.c b/lapack-netlib/SRC/clascl.c
index 892c219081..31be8d40d6 100644
--- a/lapack-netlib/SRC/clascl.c
+++ b/lapack-netlib/SRC/clascl.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clascl2.c b/lapack-netlib/SRC/clascl2.c
index 7a1621463d..fada47968e 100644
--- a/lapack-netlib/SRC/clascl2.c
+++ b/lapack-netlib/SRC/clascl2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claset.c b/lapack-netlib/SRC/claset.c
index a96a5b4c92..f16e734a60 100644
--- a/lapack-netlib/SRC/claset.c
+++ b/lapack-netlib/SRC/claset.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clasr.c b/lapack-netlib/SRC/clasr.c
index 75e91ecd01..0a3c2e4da3 100644
--- a/lapack-netlib/SRC/clasr.c
+++ b/lapack-netlib/SRC/clasr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/classq.c b/lapack-netlib/SRC/classq.c
index 346158f3b0..a514ed6a1d 100644
--- a/lapack-netlib/SRC/classq.c
+++ b/lapack-netlib/SRC/classq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claswlq.c b/lapack-netlib/SRC/claswlq.c
index 562dc4a65d..cdbcbca0fa 100644
--- a/lapack-netlib/SRC/claswlq.c
+++ b/lapack-netlib/SRC/claswlq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claswp.c b/lapack-netlib/SRC/claswp.c
index 404e6aad50..372a7960de 100644
--- a/lapack-netlib/SRC/claswp.c
+++ b/lapack-netlib/SRC/claswp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clasyf.c b/lapack-netlib/SRC/clasyf.c
index df3a0d9f06..89b1f75f86 100644
--- a/lapack-netlib/SRC/clasyf.c
+++ b/lapack-netlib/SRC/clasyf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clasyf_aa.c b/lapack-netlib/SRC/clasyf_aa.c
index 6f58989613..9f986aedfe 100644
--- a/lapack-netlib/SRC/clasyf_aa.c
+++ b/lapack-netlib/SRC/clasyf_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clasyf_rk.c b/lapack-netlib/SRC/clasyf_rk.c
index f72b1c105d..e592a19c3d 100644
--- a/lapack-netlib/SRC/clasyf_rk.c
+++ b/lapack-netlib/SRC/clasyf_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clasyf_rook.c b/lapack-netlib/SRC/clasyf_rook.c
index a4613912f8..1ed592bd4c 100644
--- a/lapack-netlib/SRC/clasyf_rook.c
+++ b/lapack-netlib/SRC/clasyf_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clatbs.c b/lapack-netlib/SRC/clatbs.c
index 168aca749d..df8e5e02e8 100644
--- a/lapack-netlib/SRC/clatbs.c
+++ b/lapack-netlib/SRC/clatbs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clatdf.c b/lapack-netlib/SRC/clatdf.c
index 68c1d63efd..7ab67315c9 100644
--- a/lapack-netlib/SRC/clatdf.c
+++ b/lapack-netlib/SRC/clatdf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clatps.c b/lapack-netlib/SRC/clatps.c
index 64563abbd9..ff8f2172ec 100644
--- a/lapack-netlib/SRC/clatps.c
+++ b/lapack-netlib/SRC/clatps.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clatrd.c b/lapack-netlib/SRC/clatrd.c
index f1c30202be..3e83285224 100644
--- a/lapack-netlib/SRC/clatrd.c
+++ b/lapack-netlib/SRC/clatrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clatrs.c b/lapack-netlib/SRC/clatrs.c
index 61e43419d1..9363e028b6 100644
--- a/lapack-netlib/SRC/clatrs.c
+++ b/lapack-netlib/SRC/clatrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clatrs3.c b/lapack-netlib/SRC/clatrs3.c
index a53483ff00..91bd5cdfdf 100644
--- a/lapack-netlib/SRC/clatrs3.c
+++ b/lapack-netlib/SRC/clatrs3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -263,7 +263,7 @@ static int my_expfunc(float *x) {int e; (void)frexpf(*x,&e); return e;}
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clatrz.c b/lapack-netlib/SRC/clatrz.c
index 2447fbac1a..531c800da2 100644
--- a/lapack-netlib/SRC/clatrz.c
+++ b/lapack-netlib/SRC/clatrz.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clatsqr.c b/lapack-netlib/SRC/clatsqr.c
index d88e0da3a2..42576d127b 100644
--- a/lapack-netlib/SRC/clatsqr.c
+++ b/lapack-netlib/SRC/clatsqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claunhr_col_getrfnp.c b/lapack-netlib/SRC/claunhr_col_getrfnp.c
index 70f8c44dc3..8c14b05780 100644
--- a/lapack-netlib/SRC/claunhr_col_getrfnp.c
+++ b/lapack-netlib/SRC/claunhr_col_getrfnp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/claunhr_col_getrfnp2.c b/lapack-netlib/SRC/claunhr_col_getrfnp2.c
index 65fdc0027d..6b405e2557 100644
--- a/lapack-netlib/SRC/claunhr_col_getrfnp2.c
+++ b/lapack-netlib/SRC/claunhr_col_getrfnp2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clauu2.c b/lapack-netlib/SRC/clauu2.c
index 2be32a3c06..07c0213886 100644
--- a/lapack-netlib/SRC/clauu2.c
+++ b/lapack-netlib/SRC/clauu2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/clauum.c b/lapack-netlib/SRC/clauum.c
index 45a1de4a93..e0e9c992c4 100644
--- a/lapack-netlib/SRC/clauum.c
+++ b/lapack-netlib/SRC/clauum.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpbcon.c b/lapack-netlib/SRC/cpbcon.c
index e46ce643af..4ae81d0849 100644
--- a/lapack-netlib/SRC/cpbcon.c
+++ b/lapack-netlib/SRC/cpbcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpbequ.c b/lapack-netlib/SRC/cpbequ.c
index 0d69760da2..49f42ad230 100644
--- a/lapack-netlib/SRC/cpbequ.c
+++ b/lapack-netlib/SRC/cpbequ.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpbrfs.c b/lapack-netlib/SRC/cpbrfs.c
index fccc1f3d4d..c80fe8a36c 100644
--- a/lapack-netlib/SRC/cpbrfs.c
+++ b/lapack-netlib/SRC/cpbrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpbstf.c b/lapack-netlib/SRC/cpbstf.c
index f0a88e4b4b..ceb0a4d278 100644
--- a/lapack-netlib/SRC/cpbstf.c
+++ b/lapack-netlib/SRC/cpbstf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpbsv.c b/lapack-netlib/SRC/cpbsv.c
index 83b0f63b18..b69809ecf2 100644
--- a/lapack-netlib/SRC/cpbsv.c
+++ b/lapack-netlib/SRC/cpbsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpbsvx.c b/lapack-netlib/SRC/cpbsvx.c
index 49925c13ce..b9f7c4493c 100644
--- a/lapack-netlib/SRC/cpbsvx.c
+++ b/lapack-netlib/SRC/cpbsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpbtf2.c b/lapack-netlib/SRC/cpbtf2.c
index de89747f9b..e2cfb6ad9f 100644
--- a/lapack-netlib/SRC/cpbtf2.c
+++ b/lapack-netlib/SRC/cpbtf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpbtrf.c b/lapack-netlib/SRC/cpbtrf.c
index b239f20b41..3aaa287444 100644
--- a/lapack-netlib/SRC/cpbtrf.c
+++ b/lapack-netlib/SRC/cpbtrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpbtrs.c b/lapack-netlib/SRC/cpbtrs.c
index 14b1bae6f0..24939ae44d 100644
--- a/lapack-netlib/SRC/cpbtrs.c
+++ b/lapack-netlib/SRC/cpbtrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpftrf.c b/lapack-netlib/SRC/cpftrf.c
index 67bdc365e0..04b6a7def3 100644
--- a/lapack-netlib/SRC/cpftrf.c
+++ b/lapack-netlib/SRC/cpftrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpftri.c b/lapack-netlib/SRC/cpftri.c
index 9005b128af..a0c598442c 100644
--- a/lapack-netlib/SRC/cpftri.c
+++ b/lapack-netlib/SRC/cpftri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpftrs.c b/lapack-netlib/SRC/cpftrs.c
index 2feb7e53bb..7fa6bd3507 100644
--- a/lapack-netlib/SRC/cpftrs.c
+++ b/lapack-netlib/SRC/cpftrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpocon.c b/lapack-netlib/SRC/cpocon.c
index 6665d00377..e20c2994d2 100644
--- a/lapack-netlib/SRC/cpocon.c
+++ b/lapack-netlib/SRC/cpocon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpoequ.c b/lapack-netlib/SRC/cpoequ.c
index f7f9e87cfe..2006b12a22 100644
--- a/lapack-netlib/SRC/cpoequ.c
+++ b/lapack-netlib/SRC/cpoequ.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpoequb.c b/lapack-netlib/SRC/cpoequb.c
index b7c246116d..2c9f5a7642 100644
--- a/lapack-netlib/SRC/cpoequb.c
+++ b/lapack-netlib/SRC/cpoequb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cporfs.c b/lapack-netlib/SRC/cporfs.c
index 5c3237ec99..7c9b90d75a 100644
--- a/lapack-netlib/SRC/cporfs.c
+++ b/lapack-netlib/SRC/cporfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cporfsx.c b/lapack-netlib/SRC/cporfsx.c
index aa3ac4f728..61885f2fe1 100644
--- a/lapack-netlib/SRC/cporfsx.c
+++ b/lapack-netlib/SRC/cporfsx.c
@@ -54,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -257,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cposv.c b/lapack-netlib/SRC/cposv.c
index 2a24682ac1..2616194fc3 100644
--- a/lapack-netlib/SRC/cposv.c
+++ b/lapack-netlib/SRC/cposv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cposvx.c b/lapack-netlib/SRC/cposvx.c
index 10161efaf0..60862279ee 100644
--- a/lapack-netlib/SRC/cposvx.c
+++ b/lapack-netlib/SRC/cposvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cposvxx.c b/lapack-netlib/SRC/cposvxx.c
index d36d9b4a35..6f64b6eb3f 100644
--- a/lapack-netlib/SRC/cposvxx.c
+++ b/lapack-netlib/SRC/cposvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpotf2.c b/lapack-netlib/SRC/cpotf2.c
index 6d6d4182f0..1fffebc670 100644
--- a/lapack-netlib/SRC/cpotf2.c
+++ b/lapack-netlib/SRC/cpotf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpotrf.c b/lapack-netlib/SRC/cpotrf.c
index 5395ad952c..155302fd9d 100644
--- a/lapack-netlib/SRC/cpotrf.c
+++ b/lapack-netlib/SRC/cpotrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpotrf2.c b/lapack-netlib/SRC/cpotrf2.c
index ff478e7740..a8b2891612 100644
--- a/lapack-netlib/SRC/cpotrf2.c
+++ b/lapack-netlib/SRC/cpotrf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpotri.c b/lapack-netlib/SRC/cpotri.c
index 6681781e32..f82badadc3 100644
--- a/lapack-netlib/SRC/cpotri.c
+++ b/lapack-netlib/SRC/cpotri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpotrs.c b/lapack-netlib/SRC/cpotrs.c
index dfedbef850..c614de522d 100644
--- a/lapack-netlib/SRC/cpotrs.c
+++ b/lapack-netlib/SRC/cpotrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cppcon.c b/lapack-netlib/SRC/cppcon.c
index ad4cbd1ee1..66087fb865 100644
--- a/lapack-netlib/SRC/cppcon.c
+++ b/lapack-netlib/SRC/cppcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cppequ.c b/lapack-netlib/SRC/cppequ.c
index 27e735cdf0..eb350ca0a1 100644
--- a/lapack-netlib/SRC/cppequ.c
+++ b/lapack-netlib/SRC/cppequ.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpprfs.c b/lapack-netlib/SRC/cpprfs.c
index 185f15996c..72afc9c190 100644
--- a/lapack-netlib/SRC/cpprfs.c
+++ b/lapack-netlib/SRC/cpprfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cppsv.c b/lapack-netlib/SRC/cppsv.c
index 4f2ae517d1..e9320bf1fa 100644
--- a/lapack-netlib/SRC/cppsv.c
+++ b/lapack-netlib/SRC/cppsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cppsvx.c b/lapack-netlib/SRC/cppsvx.c
index 9798ed06f5..178c3521a6 100644
--- a/lapack-netlib/SRC/cppsvx.c
+++ b/lapack-netlib/SRC/cppsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpptrf.c b/lapack-netlib/SRC/cpptrf.c
index 711fb200b0..1f2a4a84ee 100644
--- a/lapack-netlib/SRC/cpptrf.c
+++ b/lapack-netlib/SRC/cpptrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpptri.c b/lapack-netlib/SRC/cpptri.c
index 1d99d3e88e..db77738622 100644
--- a/lapack-netlib/SRC/cpptri.c
+++ b/lapack-netlib/SRC/cpptri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpptrs.c b/lapack-netlib/SRC/cpptrs.c
index 6251b1e535..dadb90ce2d 100644
--- a/lapack-netlib/SRC/cpptrs.c
+++ b/lapack-netlib/SRC/cpptrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpstf2.c b/lapack-netlib/SRC/cpstf2.c
index f0ac9bf924..ae7fb05c4e 100644
--- a/lapack-netlib/SRC/cpstf2.c
+++ b/lapack-netlib/SRC/cpstf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpstrf.c b/lapack-netlib/SRC/cpstrf.c
index e8cb87df42..ab4811273d 100644
--- a/lapack-netlib/SRC/cpstrf.c
+++ b/lapack-netlib/SRC/cpstrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cptcon.c b/lapack-netlib/SRC/cptcon.c
index 829e7bd50f..3920fd2da9 100644
--- a/lapack-netlib/SRC/cptcon.c
+++ b/lapack-netlib/SRC/cptcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpteqr.c b/lapack-netlib/SRC/cpteqr.c
index b382724e0d..41f373ff3a 100644
--- a/lapack-netlib/SRC/cpteqr.c
+++ b/lapack-netlib/SRC/cpteqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cptrfs.c b/lapack-netlib/SRC/cptrfs.c
index 4704650114..e56f94cb5b 100644
--- a/lapack-netlib/SRC/cptrfs.c
+++ b/lapack-netlib/SRC/cptrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cptsv.c b/lapack-netlib/SRC/cptsv.c
index b2e3edbff1..2d0ece1f4d 100644
--- a/lapack-netlib/SRC/cptsv.c
+++ b/lapack-netlib/SRC/cptsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cptsvx.c b/lapack-netlib/SRC/cptsvx.c
index 7c0c26251d..f04b96ebad 100644
--- a/lapack-netlib/SRC/cptsvx.c
+++ b/lapack-netlib/SRC/cptsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpttrf.c b/lapack-netlib/SRC/cpttrf.c
index d071efc185..06f71abc41 100644
--- a/lapack-netlib/SRC/cpttrf.c
+++ b/lapack-netlib/SRC/cpttrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cpttrs.c b/lapack-netlib/SRC/cpttrs.c
index 803ed32618..474596e6f0 100644
--- a/lapack-netlib/SRC/cpttrs.c
+++ b/lapack-netlib/SRC/cpttrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cptts2.c b/lapack-netlib/SRC/cptts2.c
index d6f5c0aff7..ce3d901058 100644
--- a/lapack-netlib/SRC/cptts2.c
+++ b/lapack-netlib/SRC/cptts2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/crot.c b/lapack-netlib/SRC/crot.c
index eed83d90a3..f001028fb6 100644
--- a/lapack-netlib/SRC/crot.c
+++ b/lapack-netlib/SRC/crot.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/crscl.c b/lapack-netlib/SRC/crscl.c
index 7c87553d5d..6408422827 100644
--- a/lapack-netlib/SRC/crscl.c
+++ b/lapack-netlib/SRC/crscl.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cspcon.c b/lapack-netlib/SRC/cspcon.c
index c03725281d..784be17288 100644
--- a/lapack-netlib/SRC/cspcon.c
+++ b/lapack-netlib/SRC/cspcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cspmv.c b/lapack-netlib/SRC/cspmv.c
index 03622bcfc0..732372dea9 100644
--- a/lapack-netlib/SRC/cspmv.c
+++ b/lapack-netlib/SRC/cspmv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cspr.c b/lapack-netlib/SRC/cspr.c
index 2ea2b048e0..2a0e4e9b90 100644
--- a/lapack-netlib/SRC/cspr.c
+++ b/lapack-netlib/SRC/cspr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csprfs.c b/lapack-netlib/SRC/csprfs.c
index 9b7979c890..bccda39eb1 100644
--- a/lapack-netlib/SRC/csprfs.c
+++ b/lapack-netlib/SRC/csprfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cspsv.c b/lapack-netlib/SRC/cspsv.c
index 84fe88f4ef..253059704b 100644
--- a/lapack-netlib/SRC/cspsv.c
+++ b/lapack-netlib/SRC/cspsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cspsvx.c b/lapack-netlib/SRC/cspsvx.c
index 3caff1f525..59865d5889 100644
--- a/lapack-netlib/SRC/cspsvx.c
+++ b/lapack-netlib/SRC/cspsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csptrf.c b/lapack-netlib/SRC/csptrf.c
index 9c5b853745..c3aedf418f 100644
--- a/lapack-netlib/SRC/csptrf.c
+++ b/lapack-netlib/SRC/csptrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csptri.c b/lapack-netlib/SRC/csptri.c
index 610ef89664..57ade83260 100644
--- a/lapack-netlib/SRC/csptri.c
+++ b/lapack-netlib/SRC/csptri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csptrs.c b/lapack-netlib/SRC/csptrs.c
index 0e1e7ffb5a..ac3098a987 100644
--- a/lapack-netlib/SRC/csptrs.c
+++ b/lapack-netlib/SRC/csptrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csrscl.c b/lapack-netlib/SRC/csrscl.c
index d7d08c3455..e82571d081 100644
--- a/lapack-netlib/SRC/csrscl.c
+++ b/lapack-netlib/SRC/csrscl.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cstedc.c b/lapack-netlib/SRC/cstedc.c
index 1d60e6a977..9d60c9aa92 100644
--- a/lapack-netlib/SRC/cstedc.c
+++ b/lapack-netlib/SRC/cstedc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cstegr.c b/lapack-netlib/SRC/cstegr.c
index 836534ef6a..7e56ff3345 100644
--- a/lapack-netlib/SRC/cstegr.c
+++ b/lapack-netlib/SRC/cstegr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cstein.c b/lapack-netlib/SRC/cstein.c
index 335dbaa48c..2002dcdf69 100644
--- a/lapack-netlib/SRC/cstein.c
+++ b/lapack-netlib/SRC/cstein.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cstemr.c b/lapack-netlib/SRC/cstemr.c
index ede8ea27ed..b817c760e4 100644
--- a/lapack-netlib/SRC/cstemr.c
+++ b/lapack-netlib/SRC/cstemr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csteqr.c b/lapack-netlib/SRC/csteqr.c
index c85a56dd57..d2158f1336 100644
--- a/lapack-netlib/SRC/csteqr.c
+++ b/lapack-netlib/SRC/csteqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csycon.c b/lapack-netlib/SRC/csycon.c
index 4f606a5fe7..3842cdef7f 100644
--- a/lapack-netlib/SRC/csycon.c
+++ b/lapack-netlib/SRC/csycon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csycon_3.c b/lapack-netlib/SRC/csycon_3.c
index 2bb7f3032c..9062661219 100644
--- a/lapack-netlib/SRC/csycon_3.c
+++ b/lapack-netlib/SRC/csycon_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csycon_rook.c b/lapack-netlib/SRC/csycon_rook.c
index ac0fb0105a..8936a85c80 100644
--- a/lapack-netlib/SRC/csycon_rook.c
+++ b/lapack-netlib/SRC/csycon_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csyconv.c b/lapack-netlib/SRC/csyconv.c
index f1f7c1c415..da9c4cec96 100644
--- a/lapack-netlib/SRC/csyconv.c
+++ b/lapack-netlib/SRC/csyconv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csyconvf.c b/lapack-netlib/SRC/csyconvf.c
index edb900d16a..9b9742ee9f 100644
--- a/lapack-netlib/SRC/csyconvf.c
+++ b/lapack-netlib/SRC/csyconvf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csyconvf_rook.c b/lapack-netlib/SRC/csyconvf_rook.c
index d453eda3ec..7d05991a5b 100644
--- a/lapack-netlib/SRC/csyconvf_rook.c
+++ b/lapack-netlib/SRC/csyconvf_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csyequb.c b/lapack-netlib/SRC/csyequb.c
index 223619d29c..9f194854d8 100644
--- a/lapack-netlib/SRC/csyequb.c
+++ b/lapack-netlib/SRC/csyequb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csymv.c b/lapack-netlib/SRC/csymv.c
index d07419db57..3148e83a89 100644
--- a/lapack-netlib/SRC/csymv.c
+++ b/lapack-netlib/SRC/csymv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csyr.c b/lapack-netlib/SRC/csyr.c
index e684b20246..beeeb07c39 100644
--- a/lapack-netlib/SRC/csyr.c
+++ b/lapack-netlib/SRC/csyr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csyrfs.c b/lapack-netlib/SRC/csyrfs.c
index 2bd501fc3f..633afc41e5 100644
--- a/lapack-netlib/SRC/csyrfs.c
+++ b/lapack-netlib/SRC/csyrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csyrfsx.c b/lapack-netlib/SRC/csyrfsx.c
index aa3ac4f728..61885f2fe1 100644
--- a/lapack-netlib/SRC/csyrfsx.c
+++ b/lapack-netlib/SRC/csyrfsx.c
@@ -54,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -257,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csysv.c b/lapack-netlib/SRC/csysv.c
index 1eecd1711a..e52875c7b7 100644
--- a/lapack-netlib/SRC/csysv.c
+++ b/lapack-netlib/SRC/csysv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csysv_aa.c b/lapack-netlib/SRC/csysv_aa.c
index 065159fd33..3eb5f48033 100644
--- a/lapack-netlib/SRC/csysv_aa.c
+++ b/lapack-netlib/SRC/csysv_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csysv_aa_2stage.c b/lapack-netlib/SRC/csysv_aa_2stage.c
index 0a6827fd3f..50a778026c 100644
--- a/lapack-netlib/SRC/csysv_aa_2stage.c
+++ b/lapack-netlib/SRC/csysv_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csysv_rk.c b/lapack-netlib/SRC/csysv_rk.c
index 4e731fdf8c..eaecbdd093 100644
--- a/lapack-netlib/SRC/csysv_rk.c
+++ b/lapack-netlib/SRC/csysv_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csysv_rook.c b/lapack-netlib/SRC/csysv_rook.c
index a55218a8a7..97fff6a2a0 100644
--- a/lapack-netlib/SRC/csysv_rook.c
+++ b/lapack-netlib/SRC/csysv_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csysvx.c b/lapack-netlib/SRC/csysvx.c
index 42146a032a..9a846eab6c 100644
--- a/lapack-netlib/SRC/csysvx.c
+++ b/lapack-netlib/SRC/csysvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csysvxx.c b/lapack-netlib/SRC/csysvxx.c
index 5c0269d28f..714bcedfde 100644
--- a/lapack-netlib/SRC/csysvxx.c
+++ b/lapack-netlib/SRC/csysvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csyswapr.c b/lapack-netlib/SRC/csyswapr.c
index 69774cbc08..c61b90b8dc 100644
--- a/lapack-netlib/SRC/csyswapr.c
+++ b/lapack-netlib/SRC/csyswapr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytf2.c b/lapack-netlib/SRC/csytf2.c
index eb6eeb4d01..2a7365d114 100644
--- a/lapack-netlib/SRC/csytf2.c
+++ b/lapack-netlib/SRC/csytf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytf2_rk.c b/lapack-netlib/SRC/csytf2_rk.c
index fc5beefa89..018e64bdf8 100644
--- a/lapack-netlib/SRC/csytf2_rk.c
+++ b/lapack-netlib/SRC/csytf2_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytf2_rook.c b/lapack-netlib/SRC/csytf2_rook.c
index 9fab25bb3e..08de556d68 100644
--- a/lapack-netlib/SRC/csytf2_rook.c
+++ b/lapack-netlib/SRC/csytf2_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytrf.c b/lapack-netlib/SRC/csytrf.c
index 56aef71daa..42d0d5ba5d 100644
--- a/lapack-netlib/SRC/csytrf.c
+++ b/lapack-netlib/SRC/csytrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytrf_aa.c b/lapack-netlib/SRC/csytrf_aa.c
index 986295a520..1e7d234420 100644
--- a/lapack-netlib/SRC/csytrf_aa.c
+++ b/lapack-netlib/SRC/csytrf_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytrf_aa_2stage.c b/lapack-netlib/SRC/csytrf_aa_2stage.c
index 52f595dba1..3407f07869 100644
--- a/lapack-netlib/SRC/csytrf_aa_2stage.c
+++ b/lapack-netlib/SRC/csytrf_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytrf_rk.c b/lapack-netlib/SRC/csytrf_rk.c
index e26e6f8fa7..4871cfef0b 100644
--- a/lapack-netlib/SRC/csytrf_rk.c
+++ b/lapack-netlib/SRC/csytrf_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytrf_rook.c b/lapack-netlib/SRC/csytrf_rook.c
index fbff30524d..7b6d677acc 100644
--- a/lapack-netlib/SRC/csytrf_rook.c
+++ b/lapack-netlib/SRC/csytrf_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytri.c b/lapack-netlib/SRC/csytri.c
index f7a9ac3fb1..7a21c37652 100644
--- a/lapack-netlib/SRC/csytri.c
+++ b/lapack-netlib/SRC/csytri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytri2.c b/lapack-netlib/SRC/csytri2.c
index d20e8fe1c9..810a94a631 100644
--- a/lapack-netlib/SRC/csytri2.c
+++ b/lapack-netlib/SRC/csytri2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytri2x.c b/lapack-netlib/SRC/csytri2x.c
index 2e0083ccbb..0b08383bad 100644
--- a/lapack-netlib/SRC/csytri2x.c
+++ b/lapack-netlib/SRC/csytri2x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytri_3.c b/lapack-netlib/SRC/csytri_3.c
index 2622d4c450..7939345027 100644
--- a/lapack-netlib/SRC/csytri_3.c
+++ b/lapack-netlib/SRC/csytri_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytri_3x.c b/lapack-netlib/SRC/csytri_3x.c
index 6d543a5a34..f32a69bdc6 100644
--- a/lapack-netlib/SRC/csytri_3x.c
+++ b/lapack-netlib/SRC/csytri_3x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytri_rook.c b/lapack-netlib/SRC/csytri_rook.c
index 9718a082a0..9c482892e3 100644
--- a/lapack-netlib/SRC/csytri_rook.c
+++ b/lapack-netlib/SRC/csytri_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytrs.c b/lapack-netlib/SRC/csytrs.c
index 7a51af61f4..c3b5bc3fb4 100644
--- a/lapack-netlib/SRC/csytrs.c
+++ b/lapack-netlib/SRC/csytrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytrs2.c b/lapack-netlib/SRC/csytrs2.c
index 8b100db3be..b34cba7012 100644
--- a/lapack-netlib/SRC/csytrs2.c
+++ b/lapack-netlib/SRC/csytrs2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytrs_3.c b/lapack-netlib/SRC/csytrs_3.c
index 739718c1ce..eaa441dfaf 100644
--- a/lapack-netlib/SRC/csytrs_3.c
+++ b/lapack-netlib/SRC/csytrs_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytrs_aa.c b/lapack-netlib/SRC/csytrs_aa.c
index 719a494a69..cdb90e6559 100644
--- a/lapack-netlib/SRC/csytrs_aa.c
+++ b/lapack-netlib/SRC/csytrs_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytrs_aa_2stage.c b/lapack-netlib/SRC/csytrs_aa_2stage.c
index fedd0e4688..1a3f3bd19b 100644
--- a/lapack-netlib/SRC/csytrs_aa_2stage.c
+++ b/lapack-netlib/SRC/csytrs_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/csytrs_rook.c b/lapack-netlib/SRC/csytrs_rook.c
index f80623ef24..a172f143d3 100644
--- a/lapack-netlib/SRC/csytrs_rook.c
+++ b/lapack-netlib/SRC/csytrs_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctbcon.c b/lapack-netlib/SRC/ctbcon.c
index effcb30a06..77c8b2c914 100644
--- a/lapack-netlib/SRC/ctbcon.c
+++ b/lapack-netlib/SRC/ctbcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctbrfs.c b/lapack-netlib/SRC/ctbrfs.c
index 08616fb372..2f44a336a6 100644
--- a/lapack-netlib/SRC/ctbrfs.c
+++ b/lapack-netlib/SRC/ctbrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctbtrs.c b/lapack-netlib/SRC/ctbtrs.c
index 560c1efef4..215fce1516 100644
--- a/lapack-netlib/SRC/ctbtrs.c
+++ b/lapack-netlib/SRC/ctbtrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctfsm.c b/lapack-netlib/SRC/ctfsm.c
index 695dbcff04..7d8413e3fc 100644
--- a/lapack-netlib/SRC/ctfsm.c
+++ b/lapack-netlib/SRC/ctfsm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctftri.c b/lapack-netlib/SRC/ctftri.c
index adef1cab9f..1bad044db3 100644
--- a/lapack-netlib/SRC/ctftri.c
+++ b/lapack-netlib/SRC/ctftri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctfttp.c b/lapack-netlib/SRC/ctfttp.c
index 11e5be640b..7b37de986f 100644
--- a/lapack-netlib/SRC/ctfttp.c
+++ b/lapack-netlib/SRC/ctfttp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctfttr.c b/lapack-netlib/SRC/ctfttr.c
index 9afa0ef872..8143db540c 100644
--- a/lapack-netlib/SRC/ctfttr.c
+++ b/lapack-netlib/SRC/ctfttr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctgevc.c b/lapack-netlib/SRC/ctgevc.c
index fa36f7e9cf..157d2e6e89 100644
--- a/lapack-netlib/SRC/ctgevc.c
+++ b/lapack-netlib/SRC/ctgevc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctgex2.c b/lapack-netlib/SRC/ctgex2.c
index bfd6afea04..7ab23e706c 100644
--- a/lapack-netlib/SRC/ctgex2.c
+++ b/lapack-netlib/SRC/ctgex2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctgexc.c b/lapack-netlib/SRC/ctgexc.c
index 75ca678601..784b53c782 100644
--- a/lapack-netlib/SRC/ctgexc.c
+++ b/lapack-netlib/SRC/ctgexc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctgsen.c b/lapack-netlib/SRC/ctgsen.c
index f5c3f6a9f3..3e356fc66e 100644
--- a/lapack-netlib/SRC/ctgsen.c
+++ b/lapack-netlib/SRC/ctgsen.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctgsja.c b/lapack-netlib/SRC/ctgsja.c
index c968c9e7fc..bc02dee491 100644
--- a/lapack-netlib/SRC/ctgsja.c
+++ b/lapack-netlib/SRC/ctgsja.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctgsna.c b/lapack-netlib/SRC/ctgsna.c
index f11f2cd568..34f2d7717d 100644
--- a/lapack-netlib/SRC/ctgsna.c
+++ b/lapack-netlib/SRC/ctgsna.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctgsy2.c b/lapack-netlib/SRC/ctgsy2.c
index f3089d44b9..e28957b0a8 100644
--- a/lapack-netlib/SRC/ctgsy2.c
+++ b/lapack-netlib/SRC/ctgsy2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctgsyl.c b/lapack-netlib/SRC/ctgsyl.c
index 0fb5e88ca4..6e7bbdab55 100644
--- a/lapack-netlib/SRC/ctgsyl.c
+++ b/lapack-netlib/SRC/ctgsyl.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctpcon.c b/lapack-netlib/SRC/ctpcon.c
index 0db65c2fe3..b918f9b5b6 100644
--- a/lapack-netlib/SRC/ctpcon.c
+++ b/lapack-netlib/SRC/ctpcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctplqt.c b/lapack-netlib/SRC/ctplqt.c
index 2fb820e754..a94b1748c2 100644
--- a/lapack-netlib/SRC/ctplqt.c
+++ b/lapack-netlib/SRC/ctplqt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctplqt2.c b/lapack-netlib/SRC/ctplqt2.c
index 78eaea4874..8537afeaff 100644
--- a/lapack-netlib/SRC/ctplqt2.c
+++ b/lapack-netlib/SRC/ctplqt2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctpmlqt.c b/lapack-netlib/SRC/ctpmlqt.c
index abd33f4ba7..aaa8b4a05d 100644
--- a/lapack-netlib/SRC/ctpmlqt.c
+++ b/lapack-netlib/SRC/ctpmlqt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctpmqrt.c b/lapack-netlib/SRC/ctpmqrt.c
index a1f04291f6..7609330968 100644
--- a/lapack-netlib/SRC/ctpmqrt.c
+++ b/lapack-netlib/SRC/ctpmqrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctpqrt.c b/lapack-netlib/SRC/ctpqrt.c
index 63541ba53e..dcf92a64e1 100644
--- a/lapack-netlib/SRC/ctpqrt.c
+++ b/lapack-netlib/SRC/ctpqrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctpqrt2.c b/lapack-netlib/SRC/ctpqrt2.c
index 39110b7b01..d9196e943b 100644
--- a/lapack-netlib/SRC/ctpqrt2.c
+++ b/lapack-netlib/SRC/ctpqrt2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctprfb.c b/lapack-netlib/SRC/ctprfb.c
index 25a042da77..a9284c00d7 100644
--- a/lapack-netlib/SRC/ctprfb.c
+++ b/lapack-netlib/SRC/ctprfb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctprfs.c b/lapack-netlib/SRC/ctprfs.c
index f125c87e1c..fc9112e3e9 100644
--- a/lapack-netlib/SRC/ctprfs.c
+++ b/lapack-netlib/SRC/ctprfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctptri.c b/lapack-netlib/SRC/ctptri.c
index c24e75804a..8f7548cc65 100644
--- a/lapack-netlib/SRC/ctptri.c
+++ b/lapack-netlib/SRC/ctptri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctptrs.c b/lapack-netlib/SRC/ctptrs.c
index fd1d988043..6aa7c04b7c 100644
--- a/lapack-netlib/SRC/ctptrs.c
+++ b/lapack-netlib/SRC/ctptrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctpttf.c b/lapack-netlib/SRC/ctpttf.c
index 6672d195ce..4d6a7c54c8 100644
--- a/lapack-netlib/SRC/ctpttf.c
+++ b/lapack-netlib/SRC/ctpttf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctpttr.c b/lapack-netlib/SRC/ctpttr.c
index b911d65f7e..6ddcb6297e 100644
--- a/lapack-netlib/SRC/ctpttr.c
+++ b/lapack-netlib/SRC/ctpttr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctrcon.c b/lapack-netlib/SRC/ctrcon.c
index b21fdbcb4d..852913d088 100644
--- a/lapack-netlib/SRC/ctrcon.c
+++ b/lapack-netlib/SRC/ctrcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctrevc.c b/lapack-netlib/SRC/ctrevc.c
index 72d6c461c7..9336764e23 100644
--- a/lapack-netlib/SRC/ctrevc.c
+++ b/lapack-netlib/SRC/ctrevc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctrevc3.c b/lapack-netlib/SRC/ctrevc3.c
index 5c71dfb218..f502687137 100644
--- a/lapack-netlib/SRC/ctrevc3.c
+++ b/lapack-netlib/SRC/ctrevc3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctrexc.c b/lapack-netlib/SRC/ctrexc.c
index c940943492..359b3284fa 100644
--- a/lapack-netlib/SRC/ctrexc.c
+++ b/lapack-netlib/SRC/ctrexc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctrrfs.c b/lapack-netlib/SRC/ctrrfs.c
index a672a1647f..df2b362c14 100644
--- a/lapack-netlib/SRC/ctrrfs.c
+++ b/lapack-netlib/SRC/ctrrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctrsen.c b/lapack-netlib/SRC/ctrsen.c
index ca1dc34914..5f6501ad56 100644
--- a/lapack-netlib/SRC/ctrsen.c
+++ b/lapack-netlib/SRC/ctrsen.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctrsna.c b/lapack-netlib/SRC/ctrsna.c
index 763072c35d..79cc3edbbd 100644
--- a/lapack-netlib/SRC/ctrsna.c
+++ b/lapack-netlib/SRC/ctrsna.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctrsyl.c b/lapack-netlib/SRC/ctrsyl.c
index 1987a27cb5..8e5ffad1b7 100644
--- a/lapack-netlib/SRC/ctrsyl.c
+++ b/lapack-netlib/SRC/ctrsyl.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctrsyl3.c b/lapack-netlib/SRC/ctrsyl3.c
index d1ee7aa163..e175c648e0 100644
--- a/lapack-netlib/SRC/ctrsyl3.c
+++ b/lapack-netlib/SRC/ctrsyl3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -263,7 +263,7 @@ static int my_expfunc(float *x) {int e; (void)frexpf(*x,&e); return e;}
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctrti2.c b/lapack-netlib/SRC/ctrti2.c
index 6622f870f7..145f2f5991 100644
--- a/lapack-netlib/SRC/ctrti2.c
+++ b/lapack-netlib/SRC/ctrti2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctrtri.c b/lapack-netlib/SRC/ctrtri.c
index 7b4b9191c2..ade3ce9c78 100644
--- a/lapack-netlib/SRC/ctrtri.c
+++ b/lapack-netlib/SRC/ctrtri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctrtrs.c b/lapack-netlib/SRC/ctrtrs.c
index 024369220f..c7fdfc3471 100644
--- a/lapack-netlib/SRC/ctrtrs.c
+++ b/lapack-netlib/SRC/ctrtrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctrttf.c b/lapack-netlib/SRC/ctrttf.c
index 0f735e92e0..1128ed548f 100644
--- a/lapack-netlib/SRC/ctrttf.c
+++ b/lapack-netlib/SRC/ctrttf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctrttp.c b/lapack-netlib/SRC/ctrttp.c
index b6487a9438..116a080ec8 100644
--- a/lapack-netlib/SRC/ctrttp.c
+++ b/lapack-netlib/SRC/ctrttp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ctzrzf.c b/lapack-netlib/SRC/ctzrzf.c
index 89e13e78ce..453043c6b8 100644
--- a/lapack-netlib/SRC/ctzrzf.c
+++ b/lapack-netlib/SRC/ctzrzf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunbdb.c b/lapack-netlib/SRC/cunbdb.c
index 0e4473348a..78409b6495 100644
--- a/lapack-netlib/SRC/cunbdb.c
+++ b/lapack-netlib/SRC/cunbdb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunbdb1.c b/lapack-netlib/SRC/cunbdb1.c
index 124443921a..6039b6dd83 100644
--- a/lapack-netlib/SRC/cunbdb1.c
+++ b/lapack-netlib/SRC/cunbdb1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunbdb2.c b/lapack-netlib/SRC/cunbdb2.c
index 982e05efac..ea0ab9659d 100644
--- a/lapack-netlib/SRC/cunbdb2.c
+++ b/lapack-netlib/SRC/cunbdb2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunbdb3.c b/lapack-netlib/SRC/cunbdb3.c
index ebff11d710..319cfaf87f 100644
--- a/lapack-netlib/SRC/cunbdb3.c
+++ b/lapack-netlib/SRC/cunbdb3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunbdb4.c b/lapack-netlib/SRC/cunbdb4.c
index d9e1e3df95..0f1612161c 100644
--- a/lapack-netlib/SRC/cunbdb4.c
+++ b/lapack-netlib/SRC/cunbdb4.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunbdb5.c b/lapack-netlib/SRC/cunbdb5.c
index 2ab0644ef3..a317cdd536 100644
--- a/lapack-netlib/SRC/cunbdb5.c
+++ b/lapack-netlib/SRC/cunbdb5.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunbdb6.c b/lapack-netlib/SRC/cunbdb6.c
index 6023d70d49..e233312a1a 100644
--- a/lapack-netlib/SRC/cunbdb6.c
+++ b/lapack-netlib/SRC/cunbdb6.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cuncsd.c b/lapack-netlib/SRC/cuncsd.c
index 30b37d506a..f018e8b2ba 100644
--- a/lapack-netlib/SRC/cuncsd.c
+++ b/lapack-netlib/SRC/cuncsd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cuncsd2by1.c b/lapack-netlib/SRC/cuncsd2by1.c
index 8d4dec5215..02e0c2954b 100644
--- a/lapack-netlib/SRC/cuncsd2by1.c
+++ b/lapack-netlib/SRC/cuncsd2by1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cung2l.c b/lapack-netlib/SRC/cung2l.c
index ab80fd3f81..d088d39964 100644
--- a/lapack-netlib/SRC/cung2l.c
+++ b/lapack-netlib/SRC/cung2l.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cung2r.c b/lapack-netlib/SRC/cung2r.c
index d88e9285bc..d6365f0f29 100644
--- a/lapack-netlib/SRC/cung2r.c
+++ b/lapack-netlib/SRC/cung2r.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cungbr.c b/lapack-netlib/SRC/cungbr.c
index f25d67f48c..0b30a54470 100644
--- a/lapack-netlib/SRC/cungbr.c
+++ b/lapack-netlib/SRC/cungbr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunghr.c b/lapack-netlib/SRC/cunghr.c
index e4c398d94b..7f3de0e8ea 100644
--- a/lapack-netlib/SRC/cunghr.c
+++ b/lapack-netlib/SRC/cunghr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cungl2.c b/lapack-netlib/SRC/cungl2.c
index 310866871e..e437ae11ec 100644
--- a/lapack-netlib/SRC/cungl2.c
+++ b/lapack-netlib/SRC/cungl2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunglq.c b/lapack-netlib/SRC/cunglq.c
index d51e1e5f97..c36b3abf87 100644
--- a/lapack-netlib/SRC/cunglq.c
+++ b/lapack-netlib/SRC/cunglq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cungql.c b/lapack-netlib/SRC/cungql.c
index ab09d8ccfe..b4caf54395 100644
--- a/lapack-netlib/SRC/cungql.c
+++ b/lapack-netlib/SRC/cungql.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cungqr.c b/lapack-netlib/SRC/cungqr.c
index 7da1ebb448..2f8e43c858 100644
--- a/lapack-netlib/SRC/cungqr.c
+++ b/lapack-netlib/SRC/cungqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cungr2.c b/lapack-netlib/SRC/cungr2.c
index 63d99e8547..a7b057ef66 100644
--- a/lapack-netlib/SRC/cungr2.c
+++ b/lapack-netlib/SRC/cungr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cungrq.c b/lapack-netlib/SRC/cungrq.c
index c257eeb8e8..220d1120f7 100644
--- a/lapack-netlib/SRC/cungrq.c
+++ b/lapack-netlib/SRC/cungrq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cungtr.c b/lapack-netlib/SRC/cungtr.c
index f640f9fed5..dfdb11c137 100644
--- a/lapack-netlib/SRC/cungtr.c
+++ b/lapack-netlib/SRC/cungtr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cungtsqr.c b/lapack-netlib/SRC/cungtsqr.c
index 7b8c1f674a..07c4713b52 100644
--- a/lapack-netlib/SRC/cungtsqr.c
+++ b/lapack-netlib/SRC/cungtsqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cungtsqr_row.c b/lapack-netlib/SRC/cungtsqr_row.c
index 02221c7c49..f91f27ff1d 100644
--- a/lapack-netlib/SRC/cungtsqr_row.c
+++ b/lapack-netlib/SRC/cungtsqr_row.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunhr_col.c b/lapack-netlib/SRC/cunhr_col.c
index f067559532..1ae2f7f440 100644
--- a/lapack-netlib/SRC/cunhr_col.c
+++ b/lapack-netlib/SRC/cunhr_col.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunm22.c b/lapack-netlib/SRC/cunm22.c
index 91ae37fb7e..ff6ded41fa 100644
--- a/lapack-netlib/SRC/cunm22.c
+++ b/lapack-netlib/SRC/cunm22.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunm2l.c b/lapack-netlib/SRC/cunm2l.c
index 004757b924..b4c9fc4288 100644
--- a/lapack-netlib/SRC/cunm2l.c
+++ b/lapack-netlib/SRC/cunm2l.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunm2r.c b/lapack-netlib/SRC/cunm2r.c
index 0118b2da14..184d488b5c 100644
--- a/lapack-netlib/SRC/cunm2r.c
+++ b/lapack-netlib/SRC/cunm2r.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunmbr.c b/lapack-netlib/SRC/cunmbr.c
index 34c478e457..9cb9537367 100644
--- a/lapack-netlib/SRC/cunmbr.c
+++ b/lapack-netlib/SRC/cunmbr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunmhr.c b/lapack-netlib/SRC/cunmhr.c
index c106711142..9bd57a2818 100644
--- a/lapack-netlib/SRC/cunmhr.c
+++ b/lapack-netlib/SRC/cunmhr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunml2.c b/lapack-netlib/SRC/cunml2.c
index 9e7c39b336..244d1f8201 100644
--- a/lapack-netlib/SRC/cunml2.c
+++ b/lapack-netlib/SRC/cunml2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunmlq.c b/lapack-netlib/SRC/cunmlq.c
index 573d946281..93c9f14d4c 100644
--- a/lapack-netlib/SRC/cunmlq.c
+++ b/lapack-netlib/SRC/cunmlq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunmql.c b/lapack-netlib/SRC/cunmql.c
index 1b6e0b2940..9bf7fc2826 100644
--- a/lapack-netlib/SRC/cunmql.c
+++ b/lapack-netlib/SRC/cunmql.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunmqr.c b/lapack-netlib/SRC/cunmqr.c
index c823aec11a..82653cf2b8 100644
--- a/lapack-netlib/SRC/cunmqr.c
+++ b/lapack-netlib/SRC/cunmqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunmr2.c b/lapack-netlib/SRC/cunmr2.c
index dc9afb06ae..b3a40daa37 100644
--- a/lapack-netlib/SRC/cunmr2.c
+++ b/lapack-netlib/SRC/cunmr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunmr3.c b/lapack-netlib/SRC/cunmr3.c
index a6170360c9..69026f0588 100644
--- a/lapack-netlib/SRC/cunmr3.c
+++ b/lapack-netlib/SRC/cunmr3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunmrq.c b/lapack-netlib/SRC/cunmrq.c
index 9722422321..c981c78700 100644
--- a/lapack-netlib/SRC/cunmrq.c
+++ b/lapack-netlib/SRC/cunmrq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunmrz.c b/lapack-netlib/SRC/cunmrz.c
index fd800099b8..d89c7ccd0b 100644
--- a/lapack-netlib/SRC/cunmrz.c
+++ b/lapack-netlib/SRC/cunmrz.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cunmtr.c b/lapack-netlib/SRC/cunmtr.c
index d741e1d244..8b01c0cd29 100644
--- a/lapack-netlib/SRC/cunmtr.c
+++ b/lapack-netlib/SRC/cunmtr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cupgtr.c b/lapack-netlib/SRC/cupgtr.c
index 208d309915..72b1a07f97 100644
--- a/lapack-netlib/SRC/cupgtr.c
+++ b/lapack-netlib/SRC/cupgtr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/cupmtr.c b/lapack-netlib/SRC/cupmtr.c
index 6fc539768e..d58f36415b 100644
--- a/lapack-netlib/SRC/cupmtr.c
+++ b/lapack-netlib/SRC/cupmtr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dbbcsd.c b/lapack-netlib/SRC/dbbcsd.c
index efc6969250..1f354d2b01 100644
--- a/lapack-netlib/SRC/dbbcsd.c
+++ b/lapack-netlib/SRC/dbbcsd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dbdsdc.c b/lapack-netlib/SRC/dbdsdc.c
index 5c361289a6..f4fa7b4e8a 100644
--- a/lapack-netlib/SRC/dbdsdc.c
+++ b/lapack-netlib/SRC/dbdsdc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dbdsqr.c b/lapack-netlib/SRC/dbdsqr.c
index a79cf8585a..65e30e2ad0 100644
--- a/lapack-netlib/SRC/dbdsqr.c
+++ b/lapack-netlib/SRC/dbdsqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dbdsvdx.c b/lapack-netlib/SRC/dbdsvdx.c
index 5ed8353bad..74bd33f448 100644
--- a/lapack-netlib/SRC/dbdsvdx.c
+++ b/lapack-netlib/SRC/dbdsvdx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dcombssq.c b/lapack-netlib/SRC/dcombssq.c
index d3bb7ac7f7..d833ab6603 100644
--- a/lapack-netlib/SRC/dcombssq.c
+++ b/lapack-netlib/SRC/dcombssq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ddisna.c b/lapack-netlib/SRC/ddisna.c
index c656acc67c..a59c1d4f9c 100644
--- a/lapack-netlib/SRC/ddisna.c
+++ b/lapack-netlib/SRC/ddisna.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgbbrd.c b/lapack-netlib/SRC/dgbbrd.c
index e4375607f6..2bad6bd401 100644
--- a/lapack-netlib/SRC/dgbbrd.c
+++ b/lapack-netlib/SRC/dgbbrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgbcon.c b/lapack-netlib/SRC/dgbcon.c
index 19d0c3938f..b04ad3f921 100644
--- a/lapack-netlib/SRC/dgbcon.c
+++ b/lapack-netlib/SRC/dgbcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgbequ.c b/lapack-netlib/SRC/dgbequ.c
index 5801abd8a1..c1d775e26f 100644
--- a/lapack-netlib/SRC/dgbequ.c
+++ b/lapack-netlib/SRC/dgbequ.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgbequb.c b/lapack-netlib/SRC/dgbequb.c
index f7f8adca55..c405c0b74a 100644
--- a/lapack-netlib/SRC/dgbequb.c
+++ b/lapack-netlib/SRC/dgbequb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgbrfs.c b/lapack-netlib/SRC/dgbrfs.c
index 6adfe7428b..e403ce4f25 100644
--- a/lapack-netlib/SRC/dgbrfs.c
+++ b/lapack-netlib/SRC/dgbrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgbrfsx.c b/lapack-netlib/SRC/dgbrfsx.c
index e088a7892a..dbc4ff951c 100644
--- a/lapack-netlib/SRC/dgbrfsx.c
+++ b/lapack-netlib/SRC/dgbrfsx.c
@@ -54,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -257,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgbsv.c b/lapack-netlib/SRC/dgbsv.c
index 80d3abdc7e..42aff65c20 100644
--- a/lapack-netlib/SRC/dgbsv.c
+++ b/lapack-netlib/SRC/dgbsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgbsvx.c b/lapack-netlib/SRC/dgbsvx.c
index d3bcb47376..6386993867 100644
--- a/lapack-netlib/SRC/dgbsvx.c
+++ b/lapack-netlib/SRC/dgbsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgbsvx.f b/lapack-netlib/SRC/dgbsvx.f
index 030f28f0a6..0ee5eecb31 100644
--- a/lapack-netlib/SRC/dgbsvx.f
+++ b/lapack-netlib/SRC/dgbsvx.f
@@ -316,7 +316,7 @@
*>
*> \param[out] WORK
*> \verbatim
-*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,3*N))
*> On exit, WORK(1) contains the reciprocal pivot growth
*> factor norm(A)/norm(U). The "max absolute element" norm is
*> used. If WORK(1) is much less than 1, then the stability
diff --git a/lapack-netlib/SRC/dgbsvxx.c b/lapack-netlib/SRC/dgbsvxx.c
index 2e130bf2cd..b9712b4ef4 100644
--- a/lapack-netlib/SRC/dgbsvxx.c
+++ b/lapack-netlib/SRC/dgbsvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgbtf2.c b/lapack-netlib/SRC/dgbtf2.c
index e171be8b37..95bae68191 100644
--- a/lapack-netlib/SRC/dgbtf2.c
+++ b/lapack-netlib/SRC/dgbtf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgbtrf.c b/lapack-netlib/SRC/dgbtrf.c
index 47b5a03656..f485710920 100644
--- a/lapack-netlib/SRC/dgbtrf.c
+++ b/lapack-netlib/SRC/dgbtrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgbtrs.c b/lapack-netlib/SRC/dgbtrs.c
index 57468ed013..5015d0caa8 100644
--- a/lapack-netlib/SRC/dgbtrs.c
+++ b/lapack-netlib/SRC/dgbtrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgebak.c b/lapack-netlib/SRC/dgebak.c
index f412bfe920..bf93c40960 100644
--- a/lapack-netlib/SRC/dgebak.c
+++ b/lapack-netlib/SRC/dgebak.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgebal.c b/lapack-netlib/SRC/dgebal.c
index 869c3e7de2..600cfa0795 100644
--- a/lapack-netlib/SRC/dgebal.c
+++ b/lapack-netlib/SRC/dgebal.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgebd2.c b/lapack-netlib/SRC/dgebd2.c
index 94496ba240..3f78a865ec 100644
--- a/lapack-netlib/SRC/dgebd2.c
+++ b/lapack-netlib/SRC/dgebd2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgebrd.c b/lapack-netlib/SRC/dgebrd.c
index 1589355e4f..bb669a32b3 100644
--- a/lapack-netlib/SRC/dgebrd.c
+++ b/lapack-netlib/SRC/dgebrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgecon.c b/lapack-netlib/SRC/dgecon.c
index f769191758..332445a7ff 100644
--- a/lapack-netlib/SRC/dgecon.c
+++ b/lapack-netlib/SRC/dgecon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgedmd.c b/lapack-netlib/SRC/dgedmd.c
index 66b4d5da62..174488c51b 100644
--- a/lapack-netlib/SRC/dgedmd.c
+++ b/lapack-netlib/SRC/dgedmd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgedmdq.c b/lapack-netlib/SRC/dgedmdq.c
index a743a31566..8e11366b55 100644
--- a/lapack-netlib/SRC/dgedmdq.c
+++ b/lapack-netlib/SRC/dgedmdq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeequ.c b/lapack-netlib/SRC/dgeequ.c
index 90e98664f1..620c0c1c14 100644
--- a/lapack-netlib/SRC/dgeequ.c
+++ b/lapack-netlib/SRC/dgeequ.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeequb.c b/lapack-netlib/SRC/dgeequb.c
index e798545406..c7d1be03c1 100644
--- a/lapack-netlib/SRC/dgeequb.c
+++ b/lapack-netlib/SRC/dgeequb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgees.c b/lapack-netlib/SRC/dgees.c
index 4c99462276..b97c66575f 100644
--- a/lapack-netlib/SRC/dgees.c
+++ b/lapack-netlib/SRC/dgees.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeesx.c b/lapack-netlib/SRC/dgeesx.c
index 1394a79530..5fa122ab6b 100644
--- a/lapack-netlib/SRC/dgeesx.c
+++ b/lapack-netlib/SRC/dgeesx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeev.c b/lapack-netlib/SRC/dgeev.c
index 5afca3c424..fd8b654ffa 100644
--- a/lapack-netlib/SRC/dgeev.c
+++ b/lapack-netlib/SRC/dgeev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeevx.c b/lapack-netlib/SRC/dgeevx.c
index 03010fbb6d..60832aa5b1 100644
--- a/lapack-netlib/SRC/dgeevx.c
+++ b/lapack-netlib/SRC/dgeevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgehd2.c b/lapack-netlib/SRC/dgehd2.c
index 9f1f39f56f..8e0883f11f 100644
--- a/lapack-netlib/SRC/dgehd2.c
+++ b/lapack-netlib/SRC/dgehd2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgehrd.c b/lapack-netlib/SRC/dgehrd.c
index 9944187fe3..6a6e3c8c83 100644
--- a/lapack-netlib/SRC/dgehrd.c
+++ b/lapack-netlib/SRC/dgehrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgejsv.c b/lapack-netlib/SRC/dgejsv.c
index 73b43e471d..e815e53935 100644
--- a/lapack-netlib/SRC/dgejsv.c
+++ b/lapack-netlib/SRC/dgejsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgelq.c b/lapack-netlib/SRC/dgelq.c
index 013cc57b2b..39f5a4714d 100644
--- a/lapack-netlib/SRC/dgelq.c
+++ b/lapack-netlib/SRC/dgelq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgelq2.c b/lapack-netlib/SRC/dgelq2.c
index 9d76a14c0e..89551491fe 100644
--- a/lapack-netlib/SRC/dgelq2.c
+++ b/lapack-netlib/SRC/dgelq2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgelqf.c b/lapack-netlib/SRC/dgelqf.c
index 723008a899..8e3f7caa22 100644
--- a/lapack-netlib/SRC/dgelqf.c
+++ b/lapack-netlib/SRC/dgelqf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgelqt.c b/lapack-netlib/SRC/dgelqt.c
index 358b4dd311..8b89f7ce69 100644
--- a/lapack-netlib/SRC/dgelqt.c
+++ b/lapack-netlib/SRC/dgelqt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgelqt3.c b/lapack-netlib/SRC/dgelqt3.c
index a16f2568f1..34dd010c47 100644
--- a/lapack-netlib/SRC/dgelqt3.c
+++ b/lapack-netlib/SRC/dgelqt3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgels.c b/lapack-netlib/SRC/dgels.c
index 4ee0785f95..543ad8ec04 100644
--- a/lapack-netlib/SRC/dgels.c
+++ b/lapack-netlib/SRC/dgels.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgelsd.c b/lapack-netlib/SRC/dgelsd.c
index 5b1694bac5..ad88d1df41 100644
--- a/lapack-netlib/SRC/dgelsd.c
+++ b/lapack-netlib/SRC/dgelsd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgelss.c b/lapack-netlib/SRC/dgelss.c
index e2168b2a66..0a85bdcadb 100644
--- a/lapack-netlib/SRC/dgelss.c
+++ b/lapack-netlib/SRC/dgelss.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgelst.c b/lapack-netlib/SRC/dgelst.c
index 9333bd5dd0..afaeaf7ccb 100644
--- a/lapack-netlib/SRC/dgelst.c
+++ b/lapack-netlib/SRC/dgelst.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgelsy.c b/lapack-netlib/SRC/dgelsy.c
index 5c625f939c..c1a123bc07 100644
--- a/lapack-netlib/SRC/dgelsy.c
+++ b/lapack-netlib/SRC/dgelsy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgemlq.c b/lapack-netlib/SRC/dgemlq.c
index acc56173ac..f3e89dbe0f 100644
--- a/lapack-netlib/SRC/dgemlq.c
+++ b/lapack-netlib/SRC/dgemlq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgemlqt.c b/lapack-netlib/SRC/dgemlqt.c
index e188d3532e..a306fe36fe 100644
--- a/lapack-netlib/SRC/dgemlqt.c
+++ b/lapack-netlib/SRC/dgemlqt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgemqr.c b/lapack-netlib/SRC/dgemqr.c
index a309b328b2..fc4dc8c74a 100644
--- a/lapack-netlib/SRC/dgemqr.c
+++ b/lapack-netlib/SRC/dgemqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgemqrt.c b/lapack-netlib/SRC/dgemqrt.c
index f8f9393852..449c475dfe 100644
--- a/lapack-netlib/SRC/dgemqrt.c
+++ b/lapack-netlib/SRC/dgemqrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeql2.c b/lapack-netlib/SRC/dgeql2.c
index 125ede3602..4cbe6deb71 100644
--- a/lapack-netlib/SRC/dgeql2.c
+++ b/lapack-netlib/SRC/dgeql2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeqlf.c b/lapack-netlib/SRC/dgeqlf.c
index 94853a678c..936552603e 100644
--- a/lapack-netlib/SRC/dgeqlf.c
+++ b/lapack-netlib/SRC/dgeqlf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeqp3.c b/lapack-netlib/SRC/dgeqp3.c
index dd966a50e8..5891cdc91a 100644
--- a/lapack-netlib/SRC/dgeqp3.c
+++ b/lapack-netlib/SRC/dgeqp3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeqp3rk.c b/lapack-netlib/SRC/dgeqp3rk.c
index 17a78dd5ab..219d649bc7 100644
--- a/lapack-netlib/SRC/dgeqp3rk.c
+++ b/lapack-netlib/SRC/dgeqp3rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeqr.c b/lapack-netlib/SRC/dgeqr.c
index dbd0c7e4f8..dbf7cdfb5b 100644
--- a/lapack-netlib/SRC/dgeqr.c
+++ b/lapack-netlib/SRC/dgeqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeqr2.c b/lapack-netlib/SRC/dgeqr2.c
index f80cd2da83..f96cea469f 100644
--- a/lapack-netlib/SRC/dgeqr2.c
+++ b/lapack-netlib/SRC/dgeqr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeqr2p.c b/lapack-netlib/SRC/dgeqr2p.c
index 83f21e8789..0b8f4e93e4 100644
--- a/lapack-netlib/SRC/dgeqr2p.c
+++ b/lapack-netlib/SRC/dgeqr2p.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeqrf.c b/lapack-netlib/SRC/dgeqrf.c
index fc0bb6989f..4b8b059302 100644
--- a/lapack-netlib/SRC/dgeqrf.c
+++ b/lapack-netlib/SRC/dgeqrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeqrfp.c b/lapack-netlib/SRC/dgeqrfp.c
index 5de166b5c9..ae9ee69128 100644
--- a/lapack-netlib/SRC/dgeqrfp.c
+++ b/lapack-netlib/SRC/dgeqrfp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeqrt.c b/lapack-netlib/SRC/dgeqrt.c
index 2c0d8c12eb..7b7d31b0eb 100644
--- a/lapack-netlib/SRC/dgeqrt.c
+++ b/lapack-netlib/SRC/dgeqrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeqrt2.c b/lapack-netlib/SRC/dgeqrt2.c
index 84a9873879..f7760ea977 100644
--- a/lapack-netlib/SRC/dgeqrt2.c
+++ b/lapack-netlib/SRC/dgeqrt2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgeqrt3.c b/lapack-netlib/SRC/dgeqrt3.c
index 997a8e1d1c..7f5964c154 100644
--- a/lapack-netlib/SRC/dgeqrt3.c
+++ b/lapack-netlib/SRC/dgeqrt3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgerfs.c b/lapack-netlib/SRC/dgerfs.c
index a332ec33d2..5d5b7bb071 100644
--- a/lapack-netlib/SRC/dgerfs.c
+++ b/lapack-netlib/SRC/dgerfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgerfsx.c b/lapack-netlib/SRC/dgerfsx.c
index e003bfaa88..4fab4c3fbd 100644
--- a/lapack-netlib/SRC/dgerfsx.c
+++ b/lapack-netlib/SRC/dgerfsx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgerq2.c b/lapack-netlib/SRC/dgerq2.c
index 7778473846..e5d26ce580 100644
--- a/lapack-netlib/SRC/dgerq2.c
+++ b/lapack-netlib/SRC/dgerq2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgerqf.c b/lapack-netlib/SRC/dgerqf.c
index 1eb54dc840..cdee1efa34 100644
--- a/lapack-netlib/SRC/dgerqf.c
+++ b/lapack-netlib/SRC/dgerqf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgesc2.c b/lapack-netlib/SRC/dgesc2.c
index 3e7288bc6a..23f8773d9f 100644
--- a/lapack-netlib/SRC/dgesc2.c
+++ b/lapack-netlib/SRC/dgesc2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgesdd.c b/lapack-netlib/SRC/dgesdd.c
index a84ed5006c..0447320211 100644
--- a/lapack-netlib/SRC/dgesdd.c
+++ b/lapack-netlib/SRC/dgesdd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgesv.c b/lapack-netlib/SRC/dgesv.c
index ad0978250f..b871271d7a 100644
--- a/lapack-netlib/SRC/dgesv.c
+++ b/lapack-netlib/SRC/dgesv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgesvd.c b/lapack-netlib/SRC/dgesvd.c
index 32f136b7dc..f7b3a74c67 100644
--- a/lapack-netlib/SRC/dgesvd.c
+++ b/lapack-netlib/SRC/dgesvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgesvdq.c b/lapack-netlib/SRC/dgesvdq.c
index c7f2001c3a..ec6343e013 100644
--- a/lapack-netlib/SRC/dgesvdq.c
+++ b/lapack-netlib/SRC/dgesvdq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgesvdx.c b/lapack-netlib/SRC/dgesvdx.c
index 3f3a8eb4fe..2a5ad587a9 100644
--- a/lapack-netlib/SRC/dgesvdx.c
+++ b/lapack-netlib/SRC/dgesvdx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgesvj.c b/lapack-netlib/SRC/dgesvj.c
index 88ee26ce6c..c2c89e69dc 100644
--- a/lapack-netlib/SRC/dgesvj.c
+++ b/lapack-netlib/SRC/dgesvj.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgesvx.c b/lapack-netlib/SRC/dgesvx.c
index 646436f891..4ccb854637 100644
--- a/lapack-netlib/SRC/dgesvx.c
+++ b/lapack-netlib/SRC/dgesvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgesvx.f b/lapack-netlib/SRC/dgesvx.f
index 4dc1d83cfe..f787488dca 100644
--- a/lapack-netlib/SRC/dgesvx.f
+++ b/lapack-netlib/SRC/dgesvx.f
@@ -296,7 +296,7 @@
*>
*> \param[out] WORK
*> \verbatim
-*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,4*N))
*> On exit, WORK(1) contains the reciprocal pivot growth
*> factor norm(A)/norm(U). The "max absolute element" norm is
*> used. If WORK(1) is much less than 1, then the stability
diff --git a/lapack-netlib/SRC/dgesvxx.c b/lapack-netlib/SRC/dgesvxx.c
index 6c80d6b6dd..1b470b7db4 100644
--- a/lapack-netlib/SRC/dgesvxx.c
+++ b/lapack-netlib/SRC/dgesvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgetc2.c b/lapack-netlib/SRC/dgetc2.c
index 1c33db5dc5..574f4bb31e 100644
--- a/lapack-netlib/SRC/dgetc2.c
+++ b/lapack-netlib/SRC/dgetc2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgetf2.c b/lapack-netlib/SRC/dgetf2.c
index e0f7dd74cb..595da91d4f 100644
--- a/lapack-netlib/SRC/dgetf2.c
+++ b/lapack-netlib/SRC/dgetf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgetrf.c b/lapack-netlib/SRC/dgetrf.c
index 6e3faef5b9..81f32f046a 100644
--- a/lapack-netlib/SRC/dgetrf.c
+++ b/lapack-netlib/SRC/dgetrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgetrf2.c b/lapack-netlib/SRC/dgetrf2.c
index 802868e7de..2dc95a3abe 100644
--- a/lapack-netlib/SRC/dgetrf2.c
+++ b/lapack-netlib/SRC/dgetrf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgetri.c b/lapack-netlib/SRC/dgetri.c
index 6f5b386f6e..3e7ced5364 100644
--- a/lapack-netlib/SRC/dgetri.c
+++ b/lapack-netlib/SRC/dgetri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgetrs.c b/lapack-netlib/SRC/dgetrs.c
index 50b962b61d..876bb4bfe9 100644
--- a/lapack-netlib/SRC/dgetrs.c
+++ b/lapack-netlib/SRC/dgetrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgetsls.c b/lapack-netlib/SRC/dgetsls.c
index 221c4d5e04..1c4cf686b4 100644
--- a/lapack-netlib/SRC/dgetsls.c
+++ b/lapack-netlib/SRC/dgetsls.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgetsqrhrt.c b/lapack-netlib/SRC/dgetsqrhrt.c
index ae9e16bb92..e4d25d7235 100644
--- a/lapack-netlib/SRC/dgetsqrhrt.c
+++ b/lapack-netlib/SRC/dgetsqrhrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dggbak.c b/lapack-netlib/SRC/dggbak.c
index a81fe75e97..49f0d6e238 100644
--- a/lapack-netlib/SRC/dggbak.c
+++ b/lapack-netlib/SRC/dggbak.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dggbal.c b/lapack-netlib/SRC/dggbal.c
index 422dc2d1eb..151418feab 100644
--- a/lapack-netlib/SRC/dggbal.c
+++ b/lapack-netlib/SRC/dggbal.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgges.c b/lapack-netlib/SRC/dgges.c
index 399d12bc68..a7f24de4a5 100644
--- a/lapack-netlib/SRC/dgges.c
+++ b/lapack-netlib/SRC/dgges.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgges3.c b/lapack-netlib/SRC/dgges3.c
index 89fca03268..8e11393499 100644
--- a/lapack-netlib/SRC/dgges3.c
+++ b/lapack-netlib/SRC/dgges3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dggesx.c b/lapack-netlib/SRC/dggesx.c
index 995b5f01e2..3f5f6cd176 100644
--- a/lapack-netlib/SRC/dggesx.c
+++ b/lapack-netlib/SRC/dggesx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dggev.c b/lapack-netlib/SRC/dggev.c
index 7a8f34bb89..07d4b166c5 100644
--- a/lapack-netlib/SRC/dggev.c
+++ b/lapack-netlib/SRC/dggev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dggev3.c b/lapack-netlib/SRC/dggev3.c
index fa8f27dbfa..ab080dcff8 100644
--- a/lapack-netlib/SRC/dggev3.c
+++ b/lapack-netlib/SRC/dggev3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dggevx.c b/lapack-netlib/SRC/dggevx.c
index 213beaf844..72f4c8bb34 100644
--- a/lapack-netlib/SRC/dggevx.c
+++ b/lapack-netlib/SRC/dggevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dggglm.c b/lapack-netlib/SRC/dggglm.c
index 1299b34412..75913c4972 100644
--- a/lapack-netlib/SRC/dggglm.c
+++ b/lapack-netlib/SRC/dggglm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgghd3.c b/lapack-netlib/SRC/dgghd3.c
index c4507b8cbd..5a4df0a0fa 100644
--- a/lapack-netlib/SRC/dgghd3.c
+++ b/lapack-netlib/SRC/dgghd3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgghrd.c b/lapack-netlib/SRC/dgghrd.c
index 03879f33e6..2fc015905f 100644
--- a/lapack-netlib/SRC/dgghrd.c
+++ b/lapack-netlib/SRC/dgghrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgglse.c b/lapack-netlib/SRC/dgglse.c
index e9b5550735..17bc5c94ad 100644
--- a/lapack-netlib/SRC/dgglse.c
+++ b/lapack-netlib/SRC/dgglse.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dggqrf.c b/lapack-netlib/SRC/dggqrf.c
index 535db1cce3..42fe5759eb 100644
--- a/lapack-netlib/SRC/dggqrf.c
+++ b/lapack-netlib/SRC/dggqrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dggrqf.c b/lapack-netlib/SRC/dggrqf.c
index 9b764d7b86..3cf0e38564 100644
--- a/lapack-netlib/SRC/dggrqf.c
+++ b/lapack-netlib/SRC/dggrqf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dggsvd3.c b/lapack-netlib/SRC/dggsvd3.c
index 347d0e08ab..bd68d4f149 100644
--- a/lapack-netlib/SRC/dggsvd3.c
+++ b/lapack-netlib/SRC/dggsvd3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dggsvp3.c b/lapack-netlib/SRC/dggsvp3.c
index b07984e115..ab4f1ae054 100644
--- a/lapack-netlib/SRC/dggsvp3.c
+++ b/lapack-netlib/SRC/dggsvp3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgsvj0.c b/lapack-netlib/SRC/dgsvj0.c
index 4dc5985781..283751f66c 100644
--- a/lapack-netlib/SRC/dgsvj0.c
+++ b/lapack-netlib/SRC/dgsvj0.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgsvj1.c b/lapack-netlib/SRC/dgsvj1.c
index b191834ed9..463a26105a 100644
--- a/lapack-netlib/SRC/dgsvj1.c
+++ b/lapack-netlib/SRC/dgsvj1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgtcon.c b/lapack-netlib/SRC/dgtcon.c
index 1244943e8c..9af5a88802 100644
--- a/lapack-netlib/SRC/dgtcon.c
+++ b/lapack-netlib/SRC/dgtcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgtrfs.c b/lapack-netlib/SRC/dgtrfs.c
index 81add9aa0c..4354a75fbe 100644
--- a/lapack-netlib/SRC/dgtrfs.c
+++ b/lapack-netlib/SRC/dgtrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgtsv.c b/lapack-netlib/SRC/dgtsv.c
index c608f1c077..ce667e16e8 100644
--- a/lapack-netlib/SRC/dgtsv.c
+++ b/lapack-netlib/SRC/dgtsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgtsvx.c b/lapack-netlib/SRC/dgtsvx.c
index d6aaf1e17a..043a1c1037 100644
--- a/lapack-netlib/SRC/dgtsvx.c
+++ b/lapack-netlib/SRC/dgtsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgttrf.c b/lapack-netlib/SRC/dgttrf.c
index d4a9ebf134..fb16e76442 100644
--- a/lapack-netlib/SRC/dgttrf.c
+++ b/lapack-netlib/SRC/dgttrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgttrs.c b/lapack-netlib/SRC/dgttrs.c
index 818bc0e09e..325b39527d 100644
--- a/lapack-netlib/SRC/dgttrs.c
+++ b/lapack-netlib/SRC/dgttrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dgtts2.c b/lapack-netlib/SRC/dgtts2.c
index 7ac39f7065..663d3b31a5 100644
--- a/lapack-netlib/SRC/dgtts2.c
+++ b/lapack-netlib/SRC/dgtts2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dhgeqz.c b/lapack-netlib/SRC/dhgeqz.c
index e24783316e..87fcc7c592 100644
--- a/lapack-netlib/SRC/dhgeqz.c
+++ b/lapack-netlib/SRC/dhgeqz.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dhsein.c b/lapack-netlib/SRC/dhsein.c
index 299fe7d547..1c3ce19d56 100644
--- a/lapack-netlib/SRC/dhsein.c
+++ b/lapack-netlib/SRC/dhsein.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dhseqr.c b/lapack-netlib/SRC/dhseqr.c
index 2c3f9d9ce1..85a6c3f730 100644
--- a/lapack-netlib/SRC/dhseqr.c
+++ b/lapack-netlib/SRC/dhseqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/disnan.c b/lapack-netlib/SRC/disnan.c
index 4342200908..4480c00bca 100644
--- a/lapack-netlib/SRC/disnan.c
+++ b/lapack-netlib/SRC/disnan.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_gbamv.c b/lapack-netlib/SRC/dla_gbamv.c
index 87d6e36bc9..17ffdc4e7b 100644
--- a/lapack-netlib/SRC/dla_gbamv.c
+++ b/lapack-netlib/SRC/dla_gbamv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_gbrcond.c b/lapack-netlib/SRC/dla_gbrcond.c
index 777b3ebd6a..919ef90bd5 100644
--- a/lapack-netlib/SRC/dla_gbrcond.c
+++ b/lapack-netlib/SRC/dla_gbrcond.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_gbrfsx_extended.c b/lapack-netlib/SRC/dla_gbrfsx_extended.c
index 6fba8a5de9..1caa723579 100644
--- a/lapack-netlib/SRC/dla_gbrfsx_extended.c
+++ b/lapack-netlib/SRC/dla_gbrfsx_extended.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_gbrpvgrw.c b/lapack-netlib/SRC/dla_gbrpvgrw.c
index 460975e702..2e92711ec1 100644
--- a/lapack-netlib/SRC/dla_gbrpvgrw.c
+++ b/lapack-netlib/SRC/dla_gbrpvgrw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_geamv.c b/lapack-netlib/SRC/dla_geamv.c
index c522120900..6d9929d492 100644
--- a/lapack-netlib/SRC/dla_geamv.c
+++ b/lapack-netlib/SRC/dla_geamv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_gercond.c b/lapack-netlib/SRC/dla_gercond.c
index 3a6fa8eca7..6fbc7d4b4e 100644
--- a/lapack-netlib/SRC/dla_gercond.c
+++ b/lapack-netlib/SRC/dla_gercond.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_gerfsx_extended.c b/lapack-netlib/SRC/dla_gerfsx_extended.c
index 96959334e4..ad528f4758 100644
--- a/lapack-netlib/SRC/dla_gerfsx_extended.c
+++ b/lapack-netlib/SRC/dla_gerfsx_extended.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_gerpvgrw.c b/lapack-netlib/SRC/dla_gerpvgrw.c
index de3601d769..aa119c0e5c 100644
--- a/lapack-netlib/SRC/dla_gerpvgrw.c
+++ b/lapack-netlib/SRC/dla_gerpvgrw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_lin_berr.c b/lapack-netlib/SRC/dla_lin_berr.c
index 63fba703a8..cb4208dfbf 100644
--- a/lapack-netlib/SRC/dla_lin_berr.c
+++ b/lapack-netlib/SRC/dla_lin_berr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_porcond.c b/lapack-netlib/SRC/dla_porcond.c
index 75e3f7f7a8..a058d60b78 100644
--- a/lapack-netlib/SRC/dla_porcond.c
+++ b/lapack-netlib/SRC/dla_porcond.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_porfsx_extended.c b/lapack-netlib/SRC/dla_porfsx_extended.c
index 482ff9cf65..e84a27343e 100644
--- a/lapack-netlib/SRC/dla_porfsx_extended.c
+++ b/lapack-netlib/SRC/dla_porfsx_extended.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_porpvgrw.c b/lapack-netlib/SRC/dla_porpvgrw.c
index 2ab26d1d97..1bfbe5be3c 100644
--- a/lapack-netlib/SRC/dla_porpvgrw.c
+++ b/lapack-netlib/SRC/dla_porpvgrw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_syamv.c b/lapack-netlib/SRC/dla_syamv.c
index c696c3fab9..27d30bf533 100644
--- a/lapack-netlib/SRC/dla_syamv.c
+++ b/lapack-netlib/SRC/dla_syamv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_syrcond.c b/lapack-netlib/SRC/dla_syrcond.c
index 9466eb0f29..6478edd92f 100644
--- a/lapack-netlib/SRC/dla_syrcond.c
+++ b/lapack-netlib/SRC/dla_syrcond.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_syrfsx_extended.c b/lapack-netlib/SRC/dla_syrfsx_extended.c
index ff90972d1d..b517ea2465 100644
--- a/lapack-netlib/SRC/dla_syrfsx_extended.c
+++ b/lapack-netlib/SRC/dla_syrfsx_extended.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_syrpvgrw.c b/lapack-netlib/SRC/dla_syrpvgrw.c
index d27128b7e4..4556fbaafb 100644
--- a/lapack-netlib/SRC/dla_syrpvgrw.c
+++ b/lapack-netlib/SRC/dla_syrpvgrw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dla_wwaddw.c b/lapack-netlib/SRC/dla_wwaddw.c
index bdc0ff26b6..007601bea5 100644
--- a/lapack-netlib/SRC/dla_wwaddw.c
+++ b/lapack-netlib/SRC/dla_wwaddw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlabad.c b/lapack-netlib/SRC/dlabad.c
index f9ad54cae2..f84fc9059c 100644
--- a/lapack-netlib/SRC/dlabad.c
+++ b/lapack-netlib/SRC/dlabad.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlabrd.c b/lapack-netlib/SRC/dlabrd.c
index 4697defb24..80cd31b299 100644
--- a/lapack-netlib/SRC/dlabrd.c
+++ b/lapack-netlib/SRC/dlabrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlacn2.c b/lapack-netlib/SRC/dlacn2.c
index d354699f08..bbeabdd11a 100644
--- a/lapack-netlib/SRC/dlacn2.c
+++ b/lapack-netlib/SRC/dlacn2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlacon.c b/lapack-netlib/SRC/dlacon.c
index 69bb8261b4..fcbb3ea320 100644
--- a/lapack-netlib/SRC/dlacon.c
+++ b/lapack-netlib/SRC/dlacon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlacpy.c b/lapack-netlib/SRC/dlacpy.c
index b123a705a7..4e908c1731 100644
--- a/lapack-netlib/SRC/dlacpy.c
+++ b/lapack-netlib/SRC/dlacpy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dladiv.c b/lapack-netlib/SRC/dladiv.c
index 158cf1a630..ad5ce654b6 100644
--- a/lapack-netlib/SRC/dladiv.c
+++ b/lapack-netlib/SRC/dladiv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlae2.c b/lapack-netlib/SRC/dlae2.c
index b5784baea9..2db6b70191 100644
--- a/lapack-netlib/SRC/dlae2.c
+++ b/lapack-netlib/SRC/dlae2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaebz.c b/lapack-netlib/SRC/dlaebz.c
index 801e1b4021..e2b6bbd6e7 100644
--- a/lapack-netlib/SRC/dlaebz.c
+++ b/lapack-netlib/SRC/dlaebz.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaed0.c b/lapack-netlib/SRC/dlaed0.c
index ccd364205e..474189f2b3 100644
--- a/lapack-netlib/SRC/dlaed0.c
+++ b/lapack-netlib/SRC/dlaed0.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaed1.c b/lapack-netlib/SRC/dlaed1.c
index 64d2342eb2..83ac2cfefb 100644
--- a/lapack-netlib/SRC/dlaed1.c
+++ b/lapack-netlib/SRC/dlaed1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaed2.c b/lapack-netlib/SRC/dlaed2.c
index bdaf0e127d..fcf9f270b2 100644
--- a/lapack-netlib/SRC/dlaed2.c
+++ b/lapack-netlib/SRC/dlaed2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaed3.c b/lapack-netlib/SRC/dlaed3.c
index b4fe8ce6cb..ea25100f33 100644
--- a/lapack-netlib/SRC/dlaed3.c
+++ b/lapack-netlib/SRC/dlaed3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaed4.c b/lapack-netlib/SRC/dlaed4.c
index 13a4006565..f2939ff603 100644
--- a/lapack-netlib/SRC/dlaed4.c
+++ b/lapack-netlib/SRC/dlaed4.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaed5.c b/lapack-netlib/SRC/dlaed5.c
index 4b76eec7ba..4d0a3621c6 100644
--- a/lapack-netlib/SRC/dlaed5.c
+++ b/lapack-netlib/SRC/dlaed5.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaed6.c b/lapack-netlib/SRC/dlaed6.c
index 2e0ea1d331..1e2e873290 100644
--- a/lapack-netlib/SRC/dlaed6.c
+++ b/lapack-netlib/SRC/dlaed6.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaed7.c b/lapack-netlib/SRC/dlaed7.c
index 6826f29a59..546a9de896 100644
--- a/lapack-netlib/SRC/dlaed7.c
+++ b/lapack-netlib/SRC/dlaed7.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaed8.c b/lapack-netlib/SRC/dlaed8.c
index e18ae05e00..c49e006428 100644
--- a/lapack-netlib/SRC/dlaed8.c
+++ b/lapack-netlib/SRC/dlaed8.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaed9.c b/lapack-netlib/SRC/dlaed9.c
index a2ccbd483f..3b598ca49f 100644
--- a/lapack-netlib/SRC/dlaed9.c
+++ b/lapack-netlib/SRC/dlaed9.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaeda.c b/lapack-netlib/SRC/dlaeda.c
index fc992d8799..3811444133 100644
--- a/lapack-netlib/SRC/dlaeda.c
+++ b/lapack-netlib/SRC/dlaeda.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaein.c b/lapack-netlib/SRC/dlaein.c
index 009df2142b..4ea91f0358 100644
--- a/lapack-netlib/SRC/dlaein.c
+++ b/lapack-netlib/SRC/dlaein.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaev2.c b/lapack-netlib/SRC/dlaev2.c
index 685a62fa8f..b19c9b8557 100644
--- a/lapack-netlib/SRC/dlaev2.c
+++ b/lapack-netlib/SRC/dlaev2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaexc.c b/lapack-netlib/SRC/dlaexc.c
index be0c45dd9d..7c70c71152 100644
--- a/lapack-netlib/SRC/dlaexc.c
+++ b/lapack-netlib/SRC/dlaexc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlag2.c b/lapack-netlib/SRC/dlag2.c
index bddbf647bc..846ba21e86 100644
--- a/lapack-netlib/SRC/dlag2.c
+++ b/lapack-netlib/SRC/dlag2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlag2s.c b/lapack-netlib/SRC/dlag2s.c
index 83f47eab7d..20dfc04601 100644
--- a/lapack-netlib/SRC/dlag2s.c
+++ b/lapack-netlib/SRC/dlag2s.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlags2.c b/lapack-netlib/SRC/dlags2.c
index 023660b914..4a74eb6332 100644
--- a/lapack-netlib/SRC/dlags2.c
+++ b/lapack-netlib/SRC/dlags2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlagtf.c b/lapack-netlib/SRC/dlagtf.c
index 1d55872e48..3107985be3 100644
--- a/lapack-netlib/SRC/dlagtf.c
+++ b/lapack-netlib/SRC/dlagtf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlagtm.c b/lapack-netlib/SRC/dlagtm.c
index 7bce48edd4..f99cacf160 100644
--- a/lapack-netlib/SRC/dlagtm.c
+++ b/lapack-netlib/SRC/dlagtm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlagts.c b/lapack-netlib/SRC/dlagts.c
index 31cac23064..d3b3ff24af 100644
--- a/lapack-netlib/SRC/dlagts.c
+++ b/lapack-netlib/SRC/dlagts.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlagv2.c b/lapack-netlib/SRC/dlagv2.c
index e89877f5e5..a438424020 100644
--- a/lapack-netlib/SRC/dlagv2.c
+++ b/lapack-netlib/SRC/dlagv2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlahqr.c b/lapack-netlib/SRC/dlahqr.c
index 6b78231cc5..8ed61ecc85 100644
--- a/lapack-netlib/SRC/dlahqr.c
+++ b/lapack-netlib/SRC/dlahqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlahr2.c b/lapack-netlib/SRC/dlahr2.c
index c4593e671f..f56e68e605 100644
--- a/lapack-netlib/SRC/dlahr2.c
+++ b/lapack-netlib/SRC/dlahr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaic1.c b/lapack-netlib/SRC/dlaic1.c
index 5aff47ddaf..a54817fb87 100644
--- a/lapack-netlib/SRC/dlaic1.c
+++ b/lapack-netlib/SRC/dlaic1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaisnan.c b/lapack-netlib/SRC/dlaisnan.c
index 055034c5a5..cf69169e0a 100644
--- a/lapack-netlib/SRC/dlaisnan.c
+++ b/lapack-netlib/SRC/dlaisnan.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaln2.c b/lapack-netlib/SRC/dlaln2.c
index 9964063b83..09bea80eab 100644
--- a/lapack-netlib/SRC/dlaln2.c
+++ b/lapack-netlib/SRC/dlaln2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlals0.c b/lapack-netlib/SRC/dlals0.c
index 3fb8b931e9..0b0617e87c 100644
--- a/lapack-netlib/SRC/dlals0.c
+++ b/lapack-netlib/SRC/dlals0.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlalsa.c b/lapack-netlib/SRC/dlalsa.c
index 2d20aaf8fa..eb2d7db0bb 100644
--- a/lapack-netlib/SRC/dlalsa.c
+++ b/lapack-netlib/SRC/dlalsa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlalsd.c b/lapack-netlib/SRC/dlalsd.c
index 6be6155b72..938ae4d195 100644
--- a/lapack-netlib/SRC/dlalsd.c
+++ b/lapack-netlib/SRC/dlalsd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlamrg.c b/lapack-netlib/SRC/dlamrg.c
index 87eab4d7f6..52979212e5 100644
--- a/lapack-netlib/SRC/dlamrg.c
+++ b/lapack-netlib/SRC/dlamrg.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlamswlq.c b/lapack-netlib/SRC/dlamswlq.c
index 5d63419ece..4998f8f4c4 100644
--- a/lapack-netlib/SRC/dlamswlq.c
+++ b/lapack-netlib/SRC/dlamswlq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlamtsqr.c b/lapack-netlib/SRC/dlamtsqr.c
index ab6e329ae7..8929805483 100644
--- a/lapack-netlib/SRC/dlamtsqr.c
+++ b/lapack-netlib/SRC/dlamtsqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaneg.c b/lapack-netlib/SRC/dlaneg.c
index 7565a97362..3fffa13de3 100644
--- a/lapack-netlib/SRC/dlaneg.c
+++ b/lapack-netlib/SRC/dlaneg.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlangb.c b/lapack-netlib/SRC/dlangb.c
index 5503198fa7..c4c6a27465 100644
--- a/lapack-netlib/SRC/dlangb.c
+++ b/lapack-netlib/SRC/dlangb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlange.c b/lapack-netlib/SRC/dlange.c
index 70b743c64c..5ad00d06cf 100644
--- a/lapack-netlib/SRC/dlange.c
+++ b/lapack-netlib/SRC/dlange.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlangt.c b/lapack-netlib/SRC/dlangt.c
index 2dd791d906..6840dd1bdc 100644
--- a/lapack-netlib/SRC/dlangt.c
+++ b/lapack-netlib/SRC/dlangt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlanhs.c b/lapack-netlib/SRC/dlanhs.c
index a1ddef031a..69eab9d496 100644
--- a/lapack-netlib/SRC/dlanhs.c
+++ b/lapack-netlib/SRC/dlanhs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlansb.c b/lapack-netlib/SRC/dlansb.c
index 787679ef93..34e51dd78c 100644
--- a/lapack-netlib/SRC/dlansb.c
+++ b/lapack-netlib/SRC/dlansb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlansf.c b/lapack-netlib/SRC/dlansf.c
index 7563b7be98..e5456cdce9 100644
--- a/lapack-netlib/SRC/dlansf.c
+++ b/lapack-netlib/SRC/dlansf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlansp.c b/lapack-netlib/SRC/dlansp.c
index fcf0e02d2c..14a0a930e6 100644
--- a/lapack-netlib/SRC/dlansp.c
+++ b/lapack-netlib/SRC/dlansp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlanst.c b/lapack-netlib/SRC/dlanst.c
index b31ca3fdca..e1e89c49bc 100644
--- a/lapack-netlib/SRC/dlanst.c
+++ b/lapack-netlib/SRC/dlanst.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlansy.c b/lapack-netlib/SRC/dlansy.c
index d001d86206..a0bcb9e017 100644
--- a/lapack-netlib/SRC/dlansy.c
+++ b/lapack-netlib/SRC/dlansy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlantb.c b/lapack-netlib/SRC/dlantb.c
index 9c7c50f906..6d1fdf06e7 100644
--- a/lapack-netlib/SRC/dlantb.c
+++ b/lapack-netlib/SRC/dlantb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlantp.c b/lapack-netlib/SRC/dlantp.c
index 1733bd85ff..fb57d31056 100644
--- a/lapack-netlib/SRC/dlantp.c
+++ b/lapack-netlib/SRC/dlantp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlantr.c b/lapack-netlib/SRC/dlantr.c
index 20a40dc57d..bc8a0e3292 100644
--- a/lapack-netlib/SRC/dlantr.c
+++ b/lapack-netlib/SRC/dlantr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlanv2.c b/lapack-netlib/SRC/dlanv2.c
index b0254077c1..d71742bcb6 100644
--- a/lapack-netlib/SRC/dlanv2.c
+++ b/lapack-netlib/SRC/dlanv2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaorhr_col_getrfnp.c b/lapack-netlib/SRC/dlaorhr_col_getrfnp.c
index e716a0efae..331bf375a2 100644
--- a/lapack-netlib/SRC/dlaorhr_col_getrfnp.c
+++ b/lapack-netlib/SRC/dlaorhr_col_getrfnp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaorhr_col_getrfnp2.c b/lapack-netlib/SRC/dlaorhr_col_getrfnp2.c
index fe828f6d52..09f5a5f51f 100644
--- a/lapack-netlib/SRC/dlaorhr_col_getrfnp2.c
+++ b/lapack-netlib/SRC/dlaorhr_col_getrfnp2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlapll.c b/lapack-netlib/SRC/dlapll.c
index e3d2c80b20..ddf6dde583 100644
--- a/lapack-netlib/SRC/dlapll.c
+++ b/lapack-netlib/SRC/dlapll.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlapmr.c b/lapack-netlib/SRC/dlapmr.c
index c4c4e169bb..1c2240305f 100644
--- a/lapack-netlib/SRC/dlapmr.c
+++ b/lapack-netlib/SRC/dlapmr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlapmt.c b/lapack-netlib/SRC/dlapmt.c
index 6c01575d46..9cd691f585 100644
--- a/lapack-netlib/SRC/dlapmt.c
+++ b/lapack-netlib/SRC/dlapmt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlapy2.c b/lapack-netlib/SRC/dlapy2.c
index 9ffc8a45cd..1a82360636 100644
--- a/lapack-netlib/SRC/dlapy2.c
+++ b/lapack-netlib/SRC/dlapy2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlapy3.c b/lapack-netlib/SRC/dlapy3.c
index fa8b218e83..d87851cdc5 100644
--- a/lapack-netlib/SRC/dlapy3.c
+++ b/lapack-netlib/SRC/dlapy3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqgb.c b/lapack-netlib/SRC/dlaqgb.c
index 6814ef7506..6d10fc48f4 100644
--- a/lapack-netlib/SRC/dlaqgb.c
+++ b/lapack-netlib/SRC/dlaqgb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqge.c b/lapack-netlib/SRC/dlaqge.c
index 2191d75191..9725d15128 100644
--- a/lapack-netlib/SRC/dlaqge.c
+++ b/lapack-netlib/SRC/dlaqge.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqp2.c b/lapack-netlib/SRC/dlaqp2.c
index 00fbc59373..0841318163 100644
--- a/lapack-netlib/SRC/dlaqp2.c
+++ b/lapack-netlib/SRC/dlaqp2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqp2rk.c b/lapack-netlib/SRC/dlaqp2rk.c
index de216ad97d..42f26317ce 100644
--- a/lapack-netlib/SRC/dlaqp2rk.c
+++ b/lapack-netlib/SRC/dlaqp2rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqp3rk.c b/lapack-netlib/SRC/dlaqp3rk.c
index e8c61c2571..e4c1b3b4b0 100644
--- a/lapack-netlib/SRC/dlaqp3rk.c
+++ b/lapack-netlib/SRC/dlaqp3rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqps.c b/lapack-netlib/SRC/dlaqps.c
index f8944618bd..fbf1ccc1bb 100644
--- a/lapack-netlib/SRC/dlaqps.c
+++ b/lapack-netlib/SRC/dlaqps.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqr0.c b/lapack-netlib/SRC/dlaqr0.c
index 5b3ae77794..8d29a06f84 100644
--- a/lapack-netlib/SRC/dlaqr0.c
+++ b/lapack-netlib/SRC/dlaqr0.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqr1.c b/lapack-netlib/SRC/dlaqr1.c
index b878f8c31a..a6b9302ca6 100644
--- a/lapack-netlib/SRC/dlaqr1.c
+++ b/lapack-netlib/SRC/dlaqr1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqr2.c b/lapack-netlib/SRC/dlaqr2.c
index 783a1e5d3e..a6d30436c7 100644
--- a/lapack-netlib/SRC/dlaqr2.c
+++ b/lapack-netlib/SRC/dlaqr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqr3.c b/lapack-netlib/SRC/dlaqr3.c
index f88c8cb2c2..2babd45a62 100644
--- a/lapack-netlib/SRC/dlaqr3.c
+++ b/lapack-netlib/SRC/dlaqr3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqr4.c b/lapack-netlib/SRC/dlaqr4.c
index f267f5aaef..c6244a4d79 100644
--- a/lapack-netlib/SRC/dlaqr4.c
+++ b/lapack-netlib/SRC/dlaqr4.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqr5.c b/lapack-netlib/SRC/dlaqr5.c
index 939c4378e4..4bff71ce71 100644
--- a/lapack-netlib/SRC/dlaqr5.c
+++ b/lapack-netlib/SRC/dlaqr5.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqsb.c b/lapack-netlib/SRC/dlaqsb.c
index 55eb4420e4..1c59b31037 100644
--- a/lapack-netlib/SRC/dlaqsb.c
+++ b/lapack-netlib/SRC/dlaqsb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqsp.c b/lapack-netlib/SRC/dlaqsp.c
index ad7861aa36..c442122091 100644
--- a/lapack-netlib/SRC/dlaqsp.c
+++ b/lapack-netlib/SRC/dlaqsp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqsy.c b/lapack-netlib/SRC/dlaqsy.c
index 8c144b04fa..eb7d22d792 100644
--- a/lapack-netlib/SRC/dlaqsy.c
+++ b/lapack-netlib/SRC/dlaqsy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqtr.c b/lapack-netlib/SRC/dlaqtr.c
index 1a91df0921..c44a307dd2 100644
--- a/lapack-netlib/SRC/dlaqtr.c
+++ b/lapack-netlib/SRC/dlaqtr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqz0.c b/lapack-netlib/SRC/dlaqz0.c
index d05923a46d..6d7e7d5340 100644
--- a/lapack-netlib/SRC/dlaqz0.c
+++ b/lapack-netlib/SRC/dlaqz0.c
@@ -18,8 +18,28 @@
#ifdef I
#undef I
#endif
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
-typedef int integer;
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +53,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +256,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqz1.c b/lapack-netlib/SRC/dlaqz1.c
index d05923a46d..7856e080ff 100644
--- a/lapack-netlib/SRC/dlaqz1.c
+++ b/lapack-netlib/SRC/dlaqz1.c
@@ -19,7 +19,28 @@
#undef I
#endif
-typedef int integer;
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
+
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqz2.c b/lapack-netlib/SRC/dlaqz2.c
index d05923a46d..7856e080ff 100644
--- a/lapack-netlib/SRC/dlaqz2.c
+++ b/lapack-netlib/SRC/dlaqz2.c
@@ -19,7 +19,28 @@
#undef I
#endif
-typedef int integer;
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
+
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqz3.c b/lapack-netlib/SRC/dlaqz3.c
index d05923a46d..7856e080ff 100644
--- a/lapack-netlib/SRC/dlaqz3.c
+++ b/lapack-netlib/SRC/dlaqz3.c
@@ -19,7 +19,28 @@
#undef I
#endif
-typedef int integer;
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
+
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaqz4.c b/lapack-netlib/SRC/dlaqz4.c
index d05923a46d..7856e080ff 100644
--- a/lapack-netlib/SRC/dlaqz4.c
+++ b/lapack-netlib/SRC/dlaqz4.c
@@ -19,7 +19,28 @@
#undef I
#endif
-typedef int integer;
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
+
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlar1v.c b/lapack-netlib/SRC/dlar1v.c
index 221c7f8c4b..d2d07f8ddf 100644
--- a/lapack-netlib/SRC/dlar1v.c
+++ b/lapack-netlib/SRC/dlar1v.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlar2v.c b/lapack-netlib/SRC/dlar2v.c
index d7096f0098..31312ba4b2 100644
--- a/lapack-netlib/SRC/dlar2v.c
+++ b/lapack-netlib/SRC/dlar2v.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarf.c b/lapack-netlib/SRC/dlarf.c
index 5bb376a820..910ae8d784 100644
--- a/lapack-netlib/SRC/dlarf.c
+++ b/lapack-netlib/SRC/dlarf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarfb.c b/lapack-netlib/SRC/dlarfb.c
index b04824a319..51f4599bc7 100644
--- a/lapack-netlib/SRC/dlarfb.c
+++ b/lapack-netlib/SRC/dlarfb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarfb_gett.c b/lapack-netlib/SRC/dlarfb_gett.c
index 232d12b23f..8ff3e8bc0b 100644
--- a/lapack-netlib/SRC/dlarfb_gett.c
+++ b/lapack-netlib/SRC/dlarfb_gett.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarfg.c b/lapack-netlib/SRC/dlarfg.c
index 24995a5e1c..d115b6085e 100644
--- a/lapack-netlib/SRC/dlarfg.c
+++ b/lapack-netlib/SRC/dlarfg.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarfgp.c b/lapack-netlib/SRC/dlarfgp.c
index 04073a5592..c636cfd457 100644
--- a/lapack-netlib/SRC/dlarfgp.c
+++ b/lapack-netlib/SRC/dlarfgp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarft.c b/lapack-netlib/SRC/dlarft.c
index b5e2c542cd..65ce8807fc 100644
--- a/lapack-netlib/SRC/dlarft.c
+++ b/lapack-netlib/SRC/dlarft.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarfx.c b/lapack-netlib/SRC/dlarfx.c
index 1d5400d10f..6adaeefea3 100644
--- a/lapack-netlib/SRC/dlarfx.c
+++ b/lapack-netlib/SRC/dlarfx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarfy.c b/lapack-netlib/SRC/dlarfy.c
index 3101bd5dd7..c8011ee8e3 100644
--- a/lapack-netlib/SRC/dlarfy.c
+++ b/lapack-netlib/SRC/dlarfy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlargv.c b/lapack-netlib/SRC/dlargv.c
index 944e3e241f..b9402db4e4 100644
--- a/lapack-netlib/SRC/dlargv.c
+++ b/lapack-netlib/SRC/dlargv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarmm.c b/lapack-netlib/SRC/dlarmm.c
index eec5d143a5..45f16c25c1 100644
--- a/lapack-netlib/SRC/dlarmm.c
+++ b/lapack-netlib/SRC/dlarmm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -263,7 +263,7 @@ static int my_expfunc(double *x) {int e; (void)frexp(*x,&e); return e;}
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarnv.c b/lapack-netlib/SRC/dlarnv.c
index c5f3ca408d..2fd62d1ddd 100644
--- a/lapack-netlib/SRC/dlarnv.c
+++ b/lapack-netlib/SRC/dlarnv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarra.c b/lapack-netlib/SRC/dlarra.c
index 9b41fec620..13842b3674 100644
--- a/lapack-netlib/SRC/dlarra.c
+++ b/lapack-netlib/SRC/dlarra.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarrb.c b/lapack-netlib/SRC/dlarrb.c
index cdf261b4c1..7fb9dda4eb 100644
--- a/lapack-netlib/SRC/dlarrb.c
+++ b/lapack-netlib/SRC/dlarrb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarrc.c b/lapack-netlib/SRC/dlarrc.c
index c2e3c4054c..b5d9d5e044 100644
--- a/lapack-netlib/SRC/dlarrc.c
+++ b/lapack-netlib/SRC/dlarrc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarrd.c b/lapack-netlib/SRC/dlarrd.c
index 89c51279f4..67d0c95134 100644
--- a/lapack-netlib/SRC/dlarrd.c
+++ b/lapack-netlib/SRC/dlarrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarre.c b/lapack-netlib/SRC/dlarre.c
index 367cf1d0bb..0b2f4d9b1c 100644
--- a/lapack-netlib/SRC/dlarre.c
+++ b/lapack-netlib/SRC/dlarre.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarrf.c b/lapack-netlib/SRC/dlarrf.c
index 82e631d54b..cf637e2b1c 100644
--- a/lapack-netlib/SRC/dlarrf.c
+++ b/lapack-netlib/SRC/dlarrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarrj.c b/lapack-netlib/SRC/dlarrj.c
index 1a45ffda66..e8c5ede0f3 100644
--- a/lapack-netlib/SRC/dlarrj.c
+++ b/lapack-netlib/SRC/dlarrj.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarrk.c b/lapack-netlib/SRC/dlarrk.c
index 73258f5ebd..b12b1c080a 100644
--- a/lapack-netlib/SRC/dlarrk.c
+++ b/lapack-netlib/SRC/dlarrk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarrr.c b/lapack-netlib/SRC/dlarrr.c
index f27afc8624..253e880d90 100644
--- a/lapack-netlib/SRC/dlarrr.c
+++ b/lapack-netlib/SRC/dlarrr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarrv.c b/lapack-netlib/SRC/dlarrv.c
index d9d6725542..b3cbffb80f 100644
--- a/lapack-netlib/SRC/dlarrv.c
+++ b/lapack-netlib/SRC/dlarrv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarscl2.c b/lapack-netlib/SRC/dlarscl2.c
index 5a34dfaf07..b42564371b 100644
--- a/lapack-netlib/SRC/dlarscl2.c
+++ b/lapack-netlib/SRC/dlarscl2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlartg.c b/lapack-netlib/SRC/dlartg.c
index c4e3889b1e..1062abf72a 100644
--- a/lapack-netlib/SRC/dlartg.c
+++ b/lapack-netlib/SRC/dlartg.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlartgp.c b/lapack-netlib/SRC/dlartgp.c
index 6bdb30f957..97451769f2 100644
--- a/lapack-netlib/SRC/dlartgp.c
+++ b/lapack-netlib/SRC/dlartgp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlartgs.c b/lapack-netlib/SRC/dlartgs.c
index e995262759..8d903a2890 100644
--- a/lapack-netlib/SRC/dlartgs.c
+++ b/lapack-netlib/SRC/dlartgs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlartv.c b/lapack-netlib/SRC/dlartv.c
index e5dc6e61b8..040e39bb97 100644
--- a/lapack-netlib/SRC/dlartv.c
+++ b/lapack-netlib/SRC/dlartv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaruv.c b/lapack-netlib/SRC/dlaruv.c
index c6a996a4b8..2776b844de 100644
--- a/lapack-netlib/SRC/dlaruv.c
+++ b/lapack-netlib/SRC/dlaruv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarz.c b/lapack-netlib/SRC/dlarz.c
index 611daefd82..2d8910b277 100644
--- a/lapack-netlib/SRC/dlarz.c
+++ b/lapack-netlib/SRC/dlarz.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarzb.c b/lapack-netlib/SRC/dlarzb.c
index 61ca619927..0b076a5bbb 100644
--- a/lapack-netlib/SRC/dlarzb.c
+++ b/lapack-netlib/SRC/dlarzb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlarzt.c b/lapack-netlib/SRC/dlarzt.c
index fd508cb5d1..cd798dbc68 100644
--- a/lapack-netlib/SRC/dlarzt.c
+++ b/lapack-netlib/SRC/dlarzt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlas2.c b/lapack-netlib/SRC/dlas2.c
index 4090a4da76..af3f682199 100644
--- a/lapack-netlib/SRC/dlas2.c
+++ b/lapack-netlib/SRC/dlas2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlascl.c b/lapack-netlib/SRC/dlascl.c
index 87d6903b72..28af8c810b 100644
--- a/lapack-netlib/SRC/dlascl.c
+++ b/lapack-netlib/SRC/dlascl.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlascl2.c b/lapack-netlib/SRC/dlascl2.c
index b677a534ec..8b89b010cb 100644
--- a/lapack-netlib/SRC/dlascl2.c
+++ b/lapack-netlib/SRC/dlascl2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasd0.c b/lapack-netlib/SRC/dlasd0.c
index fdc8be7d46..d600d7cd0d 100644
--- a/lapack-netlib/SRC/dlasd0.c
+++ b/lapack-netlib/SRC/dlasd0.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasd1.c b/lapack-netlib/SRC/dlasd1.c
index c45c2fe7d9..f66d89d1e9 100644
--- a/lapack-netlib/SRC/dlasd1.c
+++ b/lapack-netlib/SRC/dlasd1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasd2.c b/lapack-netlib/SRC/dlasd2.c
index 457957a061..ee5b9b0b5b 100644
--- a/lapack-netlib/SRC/dlasd2.c
+++ b/lapack-netlib/SRC/dlasd2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasd3.c b/lapack-netlib/SRC/dlasd3.c
index d4b7472957..9003b6e3ec 100644
--- a/lapack-netlib/SRC/dlasd3.c
+++ b/lapack-netlib/SRC/dlasd3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasd4.c b/lapack-netlib/SRC/dlasd4.c
index a19c9d997b..6d7829c309 100644
--- a/lapack-netlib/SRC/dlasd4.c
+++ b/lapack-netlib/SRC/dlasd4.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasd5.c b/lapack-netlib/SRC/dlasd5.c
index aad2836af2..3dba309898 100644
--- a/lapack-netlib/SRC/dlasd5.c
+++ b/lapack-netlib/SRC/dlasd5.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasd6.c b/lapack-netlib/SRC/dlasd6.c
index 46b1c968ef..a9294f331b 100644
--- a/lapack-netlib/SRC/dlasd6.c
+++ b/lapack-netlib/SRC/dlasd6.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasd7.c b/lapack-netlib/SRC/dlasd7.c
index 6ff2e9f111..ac2ef6785b 100644
--- a/lapack-netlib/SRC/dlasd7.c
+++ b/lapack-netlib/SRC/dlasd7.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasd8.c b/lapack-netlib/SRC/dlasd8.c
index e3e771c946..63e87febc4 100644
--- a/lapack-netlib/SRC/dlasd8.c
+++ b/lapack-netlib/SRC/dlasd8.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasda.c b/lapack-netlib/SRC/dlasda.c
index f9993150da..8eea06c578 100644
--- a/lapack-netlib/SRC/dlasda.c
+++ b/lapack-netlib/SRC/dlasda.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasdq.c b/lapack-netlib/SRC/dlasdq.c
index 054dabbacc..4201b593a0 100644
--- a/lapack-netlib/SRC/dlasdq.c
+++ b/lapack-netlib/SRC/dlasdq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasdt.c b/lapack-netlib/SRC/dlasdt.c
index d651ab090c..cbf4dd8ec5 100644
--- a/lapack-netlib/SRC/dlasdt.c
+++ b/lapack-netlib/SRC/dlasdt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaset.c b/lapack-netlib/SRC/dlaset.c
index 7777c30598..f8d470a9d4 100644
--- a/lapack-netlib/SRC/dlaset.c
+++ b/lapack-netlib/SRC/dlaset.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasq1.c b/lapack-netlib/SRC/dlasq1.c
index d77f5653e9..9618f8518b 100644
--- a/lapack-netlib/SRC/dlasq1.c
+++ b/lapack-netlib/SRC/dlasq1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasq2.c b/lapack-netlib/SRC/dlasq2.c
index 4958580f27..0685a0ad87 100644
--- a/lapack-netlib/SRC/dlasq2.c
+++ b/lapack-netlib/SRC/dlasq2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasq3.c b/lapack-netlib/SRC/dlasq3.c
index cb65b63e77..c2950da115 100644
--- a/lapack-netlib/SRC/dlasq3.c
+++ b/lapack-netlib/SRC/dlasq3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasq4.c b/lapack-netlib/SRC/dlasq4.c
index ce0322f0ba..493f1da6d5 100644
--- a/lapack-netlib/SRC/dlasq4.c
+++ b/lapack-netlib/SRC/dlasq4.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasq5.c b/lapack-netlib/SRC/dlasq5.c
index cbf6af7e73..3f0fa9aa8b 100644
--- a/lapack-netlib/SRC/dlasq5.c
+++ b/lapack-netlib/SRC/dlasq5.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasq6.c b/lapack-netlib/SRC/dlasq6.c
index 3dc8252115..161f50a4a7 100644
--- a/lapack-netlib/SRC/dlasq6.c
+++ b/lapack-netlib/SRC/dlasq6.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasr.c b/lapack-netlib/SRC/dlasr.c
index f4fc9cf2ba..797d73e18f 100644
--- a/lapack-netlib/SRC/dlasr.c
+++ b/lapack-netlib/SRC/dlasr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasrt.c b/lapack-netlib/SRC/dlasrt.c
index 2567377092..1f196d7b37 100644
--- a/lapack-netlib/SRC/dlasrt.c
+++ b/lapack-netlib/SRC/dlasrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlassq.c b/lapack-netlib/SRC/dlassq.c
index 53f30d4ecc..ca0a5e8886 100644
--- a/lapack-netlib/SRC/dlassq.c
+++ b/lapack-netlib/SRC/dlassq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasv2.c b/lapack-netlib/SRC/dlasv2.c
index 570f2a1114..96541e1d36 100644
--- a/lapack-netlib/SRC/dlasv2.c
+++ b/lapack-netlib/SRC/dlasv2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaswlq.c b/lapack-netlib/SRC/dlaswlq.c
index 83c2a08708..b1f5052a52 100644
--- a/lapack-netlib/SRC/dlaswlq.c
+++ b/lapack-netlib/SRC/dlaswlq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlaswp.c b/lapack-netlib/SRC/dlaswp.c
index 06ce8e244c..5af84589c8 100644
--- a/lapack-netlib/SRC/dlaswp.c
+++ b/lapack-netlib/SRC/dlaswp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasy2.c b/lapack-netlib/SRC/dlasy2.c
index 8d48d4d4f6..d0b1fdacf8 100644
--- a/lapack-netlib/SRC/dlasy2.c
+++ b/lapack-netlib/SRC/dlasy2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasyf.c b/lapack-netlib/SRC/dlasyf.c
index b63353a0cf..88a38c3018 100644
--- a/lapack-netlib/SRC/dlasyf.c
+++ b/lapack-netlib/SRC/dlasyf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasyf_aa.c b/lapack-netlib/SRC/dlasyf_aa.c
index 2f4d34f3df..ac0a441693 100644
--- a/lapack-netlib/SRC/dlasyf_aa.c
+++ b/lapack-netlib/SRC/dlasyf_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasyf_rk.c b/lapack-netlib/SRC/dlasyf_rk.c
index c38bc94314..13d99c85bc 100644
--- a/lapack-netlib/SRC/dlasyf_rk.c
+++ b/lapack-netlib/SRC/dlasyf_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlasyf_rook.c b/lapack-netlib/SRC/dlasyf_rook.c
index 172e0a7b45..91511ab6fb 100644
--- a/lapack-netlib/SRC/dlasyf_rook.c
+++ b/lapack-netlib/SRC/dlasyf_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlat2s.c b/lapack-netlib/SRC/dlat2s.c
index 27fe21280f..5a9671a8e9 100644
--- a/lapack-netlib/SRC/dlat2s.c
+++ b/lapack-netlib/SRC/dlat2s.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlatbs.c b/lapack-netlib/SRC/dlatbs.c
index 98e64489fb..75d4c3abb9 100644
--- a/lapack-netlib/SRC/dlatbs.c
+++ b/lapack-netlib/SRC/dlatbs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlatdf.c b/lapack-netlib/SRC/dlatdf.c
index ef0d5c9ebb..2bb986e1ac 100644
--- a/lapack-netlib/SRC/dlatdf.c
+++ b/lapack-netlib/SRC/dlatdf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlatps.c b/lapack-netlib/SRC/dlatps.c
index 95446856ac..660fa34d85 100644
--- a/lapack-netlib/SRC/dlatps.c
+++ b/lapack-netlib/SRC/dlatps.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlatrd.c b/lapack-netlib/SRC/dlatrd.c
index d1bf854d2c..0d35576f74 100644
--- a/lapack-netlib/SRC/dlatrd.c
+++ b/lapack-netlib/SRC/dlatrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlatrs.c b/lapack-netlib/SRC/dlatrs.c
index 13adcdfedf..b736049ae2 100644
--- a/lapack-netlib/SRC/dlatrs.c
+++ b/lapack-netlib/SRC/dlatrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlatrs3.c b/lapack-netlib/SRC/dlatrs3.c
index 4de1f53c37..c6c68a9023 100644
--- a/lapack-netlib/SRC/dlatrs3.c
+++ b/lapack-netlib/SRC/dlatrs3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -263,7 +263,7 @@ static int my_expfunc(double *x) {int e; (void)frexp(*x,&e); return e;}
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlatrz.c b/lapack-netlib/SRC/dlatrz.c
index 496021ba1a..af3b84f1fa 100644
--- a/lapack-netlib/SRC/dlatrz.c
+++ b/lapack-netlib/SRC/dlatrz.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlatsqr.c b/lapack-netlib/SRC/dlatsqr.c
index 52ab4b6ec7..28f8fa0e12 100644
--- a/lapack-netlib/SRC/dlatsqr.c
+++ b/lapack-netlib/SRC/dlatsqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlauu2.c b/lapack-netlib/SRC/dlauu2.c
index a688bac1d1..5c1c399a23 100644
--- a/lapack-netlib/SRC/dlauu2.c
+++ b/lapack-netlib/SRC/dlauu2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dlauum.c b/lapack-netlib/SRC/dlauum.c
index e94f929ff5..0181e93272 100644
--- a/lapack-netlib/SRC/dlauum.c
+++ b/lapack-netlib/SRC/dlauum.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dopgtr.c b/lapack-netlib/SRC/dopgtr.c
index e59efa17d2..00028a1563 100644
--- a/lapack-netlib/SRC/dopgtr.c
+++ b/lapack-netlib/SRC/dopgtr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dopmtr.c b/lapack-netlib/SRC/dopmtr.c
index 3497632f82..c50ff8f7a4 100644
--- a/lapack-netlib/SRC/dopmtr.c
+++ b/lapack-netlib/SRC/dopmtr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorbdb.c b/lapack-netlib/SRC/dorbdb.c
index b59b35b4f0..2877b38ffe 100644
--- a/lapack-netlib/SRC/dorbdb.c
+++ b/lapack-netlib/SRC/dorbdb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorbdb1.c b/lapack-netlib/SRC/dorbdb1.c
index dbca828dad..28dc9bfed5 100644
--- a/lapack-netlib/SRC/dorbdb1.c
+++ b/lapack-netlib/SRC/dorbdb1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorbdb2.c b/lapack-netlib/SRC/dorbdb2.c
index 3ebea93b26..e2a584cf4a 100644
--- a/lapack-netlib/SRC/dorbdb2.c
+++ b/lapack-netlib/SRC/dorbdb2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorbdb3.c b/lapack-netlib/SRC/dorbdb3.c
index a22ac718f4..03684bc04d 100644
--- a/lapack-netlib/SRC/dorbdb3.c
+++ b/lapack-netlib/SRC/dorbdb3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorbdb4.c b/lapack-netlib/SRC/dorbdb4.c
index d53ff709c6..82ba1da7e7 100644
--- a/lapack-netlib/SRC/dorbdb4.c
+++ b/lapack-netlib/SRC/dorbdb4.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorbdb5.c b/lapack-netlib/SRC/dorbdb5.c
index 891153fccf..bc4d81a30b 100644
--- a/lapack-netlib/SRC/dorbdb5.c
+++ b/lapack-netlib/SRC/dorbdb5.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorbdb6.c b/lapack-netlib/SRC/dorbdb6.c
index 70f1b46386..74efea4646 100644
--- a/lapack-netlib/SRC/dorbdb6.c
+++ b/lapack-netlib/SRC/dorbdb6.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorcsd.c b/lapack-netlib/SRC/dorcsd.c
index a25001fb1a..d6ad241e20 100644
--- a/lapack-netlib/SRC/dorcsd.c
+++ b/lapack-netlib/SRC/dorcsd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorcsd2by1.c b/lapack-netlib/SRC/dorcsd2by1.c
index fc44e083b0..2fedb3593c 100644
--- a/lapack-netlib/SRC/dorcsd2by1.c
+++ b/lapack-netlib/SRC/dorcsd2by1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorg2l.c b/lapack-netlib/SRC/dorg2l.c
index d10fb0023d..0a66821275 100644
--- a/lapack-netlib/SRC/dorg2l.c
+++ b/lapack-netlib/SRC/dorg2l.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorg2r.c b/lapack-netlib/SRC/dorg2r.c
index af2e984523..f1a0181668 100644
--- a/lapack-netlib/SRC/dorg2r.c
+++ b/lapack-netlib/SRC/dorg2r.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorgbr.c b/lapack-netlib/SRC/dorgbr.c
index 35697354bf..bbf22f097f 100644
--- a/lapack-netlib/SRC/dorgbr.c
+++ b/lapack-netlib/SRC/dorgbr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorghr.c b/lapack-netlib/SRC/dorghr.c
index b95d45875e..ad870a4a6f 100644
--- a/lapack-netlib/SRC/dorghr.c
+++ b/lapack-netlib/SRC/dorghr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorgl2.c b/lapack-netlib/SRC/dorgl2.c
index 6059146e61..7c566e8688 100644
--- a/lapack-netlib/SRC/dorgl2.c
+++ b/lapack-netlib/SRC/dorgl2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorglq.c b/lapack-netlib/SRC/dorglq.c
index 09b943728b..ebc9aba109 100644
--- a/lapack-netlib/SRC/dorglq.c
+++ b/lapack-netlib/SRC/dorglq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorgql.c b/lapack-netlib/SRC/dorgql.c
index 374ee65a83..f6652f70a0 100644
--- a/lapack-netlib/SRC/dorgql.c
+++ b/lapack-netlib/SRC/dorgql.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorgqr.c b/lapack-netlib/SRC/dorgqr.c
index 518d410b3d..350727c1ba 100644
--- a/lapack-netlib/SRC/dorgqr.c
+++ b/lapack-netlib/SRC/dorgqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorgr2.c b/lapack-netlib/SRC/dorgr2.c
index afc3fa7ba3..874e40450d 100644
--- a/lapack-netlib/SRC/dorgr2.c
+++ b/lapack-netlib/SRC/dorgr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorgrq.c b/lapack-netlib/SRC/dorgrq.c
index fa3a054b66..ab4d2ff44b 100644
--- a/lapack-netlib/SRC/dorgrq.c
+++ b/lapack-netlib/SRC/dorgrq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorgtr.c b/lapack-netlib/SRC/dorgtr.c
index d2cdcee027..e4dd0cde53 100644
--- a/lapack-netlib/SRC/dorgtr.c
+++ b/lapack-netlib/SRC/dorgtr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorgtsqr.c b/lapack-netlib/SRC/dorgtsqr.c
index e0d43d9f87..1afb88cd0e 100644
--- a/lapack-netlib/SRC/dorgtsqr.c
+++ b/lapack-netlib/SRC/dorgtsqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorgtsqr_row.c b/lapack-netlib/SRC/dorgtsqr_row.c
index 6bb13f718f..e91896e22f 100644
--- a/lapack-netlib/SRC/dorgtsqr_row.c
+++ b/lapack-netlib/SRC/dorgtsqr_row.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorhr_col.c b/lapack-netlib/SRC/dorhr_col.c
index 03f00b7895..4d6106688f 100644
--- a/lapack-netlib/SRC/dorhr_col.c
+++ b/lapack-netlib/SRC/dorhr_col.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorm22.c b/lapack-netlib/SRC/dorm22.c
index 9f3b9bf320..8bf24ec2df 100644
--- a/lapack-netlib/SRC/dorm22.c
+++ b/lapack-netlib/SRC/dorm22.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorm2l.c b/lapack-netlib/SRC/dorm2l.c
index 9d62a36d5f..c05d21b077 100644
--- a/lapack-netlib/SRC/dorm2l.c
+++ b/lapack-netlib/SRC/dorm2l.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorm2r.c b/lapack-netlib/SRC/dorm2r.c
index 7ad7af7df9..126a1b2fb0 100644
--- a/lapack-netlib/SRC/dorm2r.c
+++ b/lapack-netlib/SRC/dorm2r.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dormbr.c b/lapack-netlib/SRC/dormbr.c
index ba3a607dad..0533ab8a52 100644
--- a/lapack-netlib/SRC/dormbr.c
+++ b/lapack-netlib/SRC/dormbr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dormhr.c b/lapack-netlib/SRC/dormhr.c
index 25f949cb99..10eaf15046 100644
--- a/lapack-netlib/SRC/dormhr.c
+++ b/lapack-netlib/SRC/dormhr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dorml2.c b/lapack-netlib/SRC/dorml2.c
index a9882d6270..c60d9cb620 100644
--- a/lapack-netlib/SRC/dorml2.c
+++ b/lapack-netlib/SRC/dorml2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dormlq.c b/lapack-netlib/SRC/dormlq.c
index ac319e054e..e13d283683 100644
--- a/lapack-netlib/SRC/dormlq.c
+++ b/lapack-netlib/SRC/dormlq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dormql.c b/lapack-netlib/SRC/dormql.c
index 3d421e212b..9f7b05a720 100644
--- a/lapack-netlib/SRC/dormql.c
+++ b/lapack-netlib/SRC/dormql.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dormqr.c b/lapack-netlib/SRC/dormqr.c
index 45281d7768..dedb255943 100644
--- a/lapack-netlib/SRC/dormqr.c
+++ b/lapack-netlib/SRC/dormqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dormr2.c b/lapack-netlib/SRC/dormr2.c
index dbb930ac03..e1a9ce61cf 100644
--- a/lapack-netlib/SRC/dormr2.c
+++ b/lapack-netlib/SRC/dormr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dormr3.c b/lapack-netlib/SRC/dormr3.c
index ba19bfd26e..cbccaf9a3b 100644
--- a/lapack-netlib/SRC/dormr3.c
+++ b/lapack-netlib/SRC/dormr3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dormrq.c b/lapack-netlib/SRC/dormrq.c
index 09f8dc535d..6eba4abee6 100644
--- a/lapack-netlib/SRC/dormrq.c
+++ b/lapack-netlib/SRC/dormrq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dormrz.c b/lapack-netlib/SRC/dormrz.c
index ae00e8c9b4..f6d5d7d32b 100644
--- a/lapack-netlib/SRC/dormrz.c
+++ b/lapack-netlib/SRC/dormrz.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dormtr.c b/lapack-netlib/SRC/dormtr.c
index 6d9b2ef796..2c4b225017 100644
--- a/lapack-netlib/SRC/dormtr.c
+++ b/lapack-netlib/SRC/dormtr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpbcon.c b/lapack-netlib/SRC/dpbcon.c
index 09fd9b8621..9187fa6458 100644
--- a/lapack-netlib/SRC/dpbcon.c
+++ b/lapack-netlib/SRC/dpbcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpbequ.c b/lapack-netlib/SRC/dpbequ.c
index 97fc2189a0..a96a9d12cf 100644
--- a/lapack-netlib/SRC/dpbequ.c
+++ b/lapack-netlib/SRC/dpbequ.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpbrfs.c b/lapack-netlib/SRC/dpbrfs.c
index 1878fd5461..2356c31219 100644
--- a/lapack-netlib/SRC/dpbrfs.c
+++ b/lapack-netlib/SRC/dpbrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpbstf.c b/lapack-netlib/SRC/dpbstf.c
index 754af635fb..f7b87adca0 100644
--- a/lapack-netlib/SRC/dpbstf.c
+++ b/lapack-netlib/SRC/dpbstf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpbsv.c b/lapack-netlib/SRC/dpbsv.c
index 48a6609334..67012d5cad 100644
--- a/lapack-netlib/SRC/dpbsv.c
+++ b/lapack-netlib/SRC/dpbsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpbsvx.c b/lapack-netlib/SRC/dpbsvx.c
index 91314848db..8b051fb19e 100644
--- a/lapack-netlib/SRC/dpbsvx.c
+++ b/lapack-netlib/SRC/dpbsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpbtf2.c b/lapack-netlib/SRC/dpbtf2.c
index d7cac9cbf4..79521c9908 100644
--- a/lapack-netlib/SRC/dpbtf2.c
+++ b/lapack-netlib/SRC/dpbtf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpbtrf.c b/lapack-netlib/SRC/dpbtrf.c
index ecb49b8022..f1b90d158c 100644
--- a/lapack-netlib/SRC/dpbtrf.c
+++ b/lapack-netlib/SRC/dpbtrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpbtrs.c b/lapack-netlib/SRC/dpbtrs.c
index 02f96e03f4..0d1b175ab7 100644
--- a/lapack-netlib/SRC/dpbtrs.c
+++ b/lapack-netlib/SRC/dpbtrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpftrf.c b/lapack-netlib/SRC/dpftrf.c
index 1552a222a4..883f3dfe8c 100644
--- a/lapack-netlib/SRC/dpftrf.c
+++ b/lapack-netlib/SRC/dpftrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpftri.c b/lapack-netlib/SRC/dpftri.c
index df7208a889..0924519ed1 100644
--- a/lapack-netlib/SRC/dpftri.c
+++ b/lapack-netlib/SRC/dpftri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpftrs.c b/lapack-netlib/SRC/dpftrs.c
index 4764e86a36..a09b692a0f 100644
--- a/lapack-netlib/SRC/dpftrs.c
+++ b/lapack-netlib/SRC/dpftrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpocon.c b/lapack-netlib/SRC/dpocon.c
index 4699fa3a72..e2b373800d 100644
--- a/lapack-netlib/SRC/dpocon.c
+++ b/lapack-netlib/SRC/dpocon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpoequ.c b/lapack-netlib/SRC/dpoequ.c
index 95635a7c41..7bc4c50bef 100644
--- a/lapack-netlib/SRC/dpoequ.c
+++ b/lapack-netlib/SRC/dpoequ.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpoequb.c b/lapack-netlib/SRC/dpoequb.c
index 87b3fbec48..720002316b 100644
--- a/lapack-netlib/SRC/dpoequb.c
+++ b/lapack-netlib/SRC/dpoequb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dporfs.c b/lapack-netlib/SRC/dporfs.c
index 91ca297f2d..933390c977 100644
--- a/lapack-netlib/SRC/dporfs.c
+++ b/lapack-netlib/SRC/dporfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dporfsx.c b/lapack-netlib/SRC/dporfsx.c
index 63408560e3..ae342a555c 100644
--- a/lapack-netlib/SRC/dporfsx.c
+++ b/lapack-netlib/SRC/dporfsx.c
@@ -54,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -257,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dposv.c b/lapack-netlib/SRC/dposv.c
index 2e6b5019f2..d7c32312e0 100644
--- a/lapack-netlib/SRC/dposv.c
+++ b/lapack-netlib/SRC/dposv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dposvx.c b/lapack-netlib/SRC/dposvx.c
index bd56317d83..3939ad70b7 100644
--- a/lapack-netlib/SRC/dposvx.c
+++ b/lapack-netlib/SRC/dposvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dposvxx.c b/lapack-netlib/SRC/dposvxx.c
index 9e7eeb14df..b46d77a9d4 100644
--- a/lapack-netlib/SRC/dposvxx.c
+++ b/lapack-netlib/SRC/dposvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpotf2.c b/lapack-netlib/SRC/dpotf2.c
index b6a7328412..e5d6750b8f 100644
--- a/lapack-netlib/SRC/dpotf2.c
+++ b/lapack-netlib/SRC/dpotf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpotrf.c b/lapack-netlib/SRC/dpotrf.c
index 2c09fd41ed..2940a266c6 100644
--- a/lapack-netlib/SRC/dpotrf.c
+++ b/lapack-netlib/SRC/dpotrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpotrf2.c b/lapack-netlib/SRC/dpotrf2.c
index 5073fe1ae8..dc93dec034 100644
--- a/lapack-netlib/SRC/dpotrf2.c
+++ b/lapack-netlib/SRC/dpotrf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpotri.c b/lapack-netlib/SRC/dpotri.c
index c11d90d8da..46ec9323ef 100644
--- a/lapack-netlib/SRC/dpotri.c
+++ b/lapack-netlib/SRC/dpotri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpotrs.c b/lapack-netlib/SRC/dpotrs.c
index 97ed17d616..dc1447cedf 100644
--- a/lapack-netlib/SRC/dpotrs.c
+++ b/lapack-netlib/SRC/dpotrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dppcon.c b/lapack-netlib/SRC/dppcon.c
index c81be8bee4..87b263c018 100644
--- a/lapack-netlib/SRC/dppcon.c
+++ b/lapack-netlib/SRC/dppcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dppequ.c b/lapack-netlib/SRC/dppequ.c
index 9700a80bd3..16643e678c 100644
--- a/lapack-netlib/SRC/dppequ.c
+++ b/lapack-netlib/SRC/dppequ.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpprfs.c b/lapack-netlib/SRC/dpprfs.c
index 40e1677cd6..40367b38ba 100644
--- a/lapack-netlib/SRC/dpprfs.c
+++ b/lapack-netlib/SRC/dpprfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dppsv.c b/lapack-netlib/SRC/dppsv.c
index e730dc071b..971a697c7a 100644
--- a/lapack-netlib/SRC/dppsv.c
+++ b/lapack-netlib/SRC/dppsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dppsvx.c b/lapack-netlib/SRC/dppsvx.c
index 3a339ab87b..93d83a6e74 100644
--- a/lapack-netlib/SRC/dppsvx.c
+++ b/lapack-netlib/SRC/dppsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpptrf.c b/lapack-netlib/SRC/dpptrf.c
index 7cfd1b9848..af70cfb930 100644
--- a/lapack-netlib/SRC/dpptrf.c
+++ b/lapack-netlib/SRC/dpptrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpptri.c b/lapack-netlib/SRC/dpptri.c
index be3e43847c..03daeeb66f 100644
--- a/lapack-netlib/SRC/dpptri.c
+++ b/lapack-netlib/SRC/dpptri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpptrs.c b/lapack-netlib/SRC/dpptrs.c
index ae96e067ff..16cc679b48 100644
--- a/lapack-netlib/SRC/dpptrs.c
+++ b/lapack-netlib/SRC/dpptrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpstf2.c b/lapack-netlib/SRC/dpstf2.c
index ff677abefb..fe881088bb 100644
--- a/lapack-netlib/SRC/dpstf2.c
+++ b/lapack-netlib/SRC/dpstf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpstrf.c b/lapack-netlib/SRC/dpstrf.c
index fe83d42325..9dca1638f3 100644
--- a/lapack-netlib/SRC/dpstrf.c
+++ b/lapack-netlib/SRC/dpstrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dptcon.c b/lapack-netlib/SRC/dptcon.c
index f097bdf207..720f950d3b 100644
--- a/lapack-netlib/SRC/dptcon.c
+++ b/lapack-netlib/SRC/dptcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpteqr.c b/lapack-netlib/SRC/dpteqr.c
index a1426dcbb9..a408deaf75 100644
--- a/lapack-netlib/SRC/dpteqr.c
+++ b/lapack-netlib/SRC/dpteqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dptrfs.c b/lapack-netlib/SRC/dptrfs.c
index b1077e93c7..867a290241 100644
--- a/lapack-netlib/SRC/dptrfs.c
+++ b/lapack-netlib/SRC/dptrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dptsv.c b/lapack-netlib/SRC/dptsv.c
index 2afc6ea371..aa48dad05d 100644
--- a/lapack-netlib/SRC/dptsv.c
+++ b/lapack-netlib/SRC/dptsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dptsvx.c b/lapack-netlib/SRC/dptsvx.c
index 9f28238fe1..bcb5d4fb77 100644
--- a/lapack-netlib/SRC/dptsvx.c
+++ b/lapack-netlib/SRC/dptsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpttrf.c b/lapack-netlib/SRC/dpttrf.c
index f3aa48b269..abb348cd20 100644
--- a/lapack-netlib/SRC/dpttrf.c
+++ b/lapack-netlib/SRC/dpttrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dpttrs.c b/lapack-netlib/SRC/dpttrs.c
index 9c49ef9596..9a8dfd66eb 100644
--- a/lapack-netlib/SRC/dpttrs.c
+++ b/lapack-netlib/SRC/dpttrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dptts2.c b/lapack-netlib/SRC/dptts2.c
index e6991be26c..2471b7af27 100644
--- a/lapack-netlib/SRC/dptts2.c
+++ b/lapack-netlib/SRC/dptts2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/drscl.c b/lapack-netlib/SRC/drscl.c
index 653d908748..b3ce58bae7 100644
--- a/lapack-netlib/SRC/drscl.c
+++ b/lapack-netlib/SRC/drscl.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsb2st_kernels.c b/lapack-netlib/SRC/dsb2st_kernels.c
index 2d619ce18f..7ef0cad688 100644
--- a/lapack-netlib/SRC/dsb2st_kernels.c
+++ b/lapack-netlib/SRC/dsb2st_kernels.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsbev.c b/lapack-netlib/SRC/dsbev.c
index 50e54cea66..e72e1a1fe5 100644
--- a/lapack-netlib/SRC/dsbev.c
+++ b/lapack-netlib/SRC/dsbev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsbev_2stage.c b/lapack-netlib/SRC/dsbev_2stage.c
index 563547b6eb..2cd37fed03 100644
--- a/lapack-netlib/SRC/dsbev_2stage.c
+++ b/lapack-netlib/SRC/dsbev_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsbevd.c b/lapack-netlib/SRC/dsbevd.c
index 900bb97185..0173f02224 100644
--- a/lapack-netlib/SRC/dsbevd.c
+++ b/lapack-netlib/SRC/dsbevd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsbevd_2stage.c b/lapack-netlib/SRC/dsbevd_2stage.c
index 7d9617985a..81d2643695 100644
--- a/lapack-netlib/SRC/dsbevd_2stage.c
+++ b/lapack-netlib/SRC/dsbevd_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsbevx.c b/lapack-netlib/SRC/dsbevx.c
index 61e687d3eb..b6af5a846b 100644
--- a/lapack-netlib/SRC/dsbevx.c
+++ b/lapack-netlib/SRC/dsbevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsbevx_2stage.c b/lapack-netlib/SRC/dsbevx_2stage.c
index cea4ec24cc..0be5ca2a4d 100644
--- a/lapack-netlib/SRC/dsbevx_2stage.c
+++ b/lapack-netlib/SRC/dsbevx_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsbgst.c b/lapack-netlib/SRC/dsbgst.c
index ff5565603d..85b6728cc0 100644
--- a/lapack-netlib/SRC/dsbgst.c
+++ b/lapack-netlib/SRC/dsbgst.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsbgv.c b/lapack-netlib/SRC/dsbgv.c
index 149689762e..2dc0ed5715 100644
--- a/lapack-netlib/SRC/dsbgv.c
+++ b/lapack-netlib/SRC/dsbgv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsbgvd.c b/lapack-netlib/SRC/dsbgvd.c
index c8274131f1..14e02dcba9 100644
--- a/lapack-netlib/SRC/dsbgvd.c
+++ b/lapack-netlib/SRC/dsbgvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsbgvx.c b/lapack-netlib/SRC/dsbgvx.c
index d5422073d4..4e14053bae 100644
--- a/lapack-netlib/SRC/dsbgvx.c
+++ b/lapack-netlib/SRC/dsbgvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsbtrd.c b/lapack-netlib/SRC/dsbtrd.c
index 91da67f14a..b2cede3106 100644
--- a/lapack-netlib/SRC/dsbtrd.c
+++ b/lapack-netlib/SRC/dsbtrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsfrk.c b/lapack-netlib/SRC/dsfrk.c
index d31002e1e4..ab2d29a1b0 100644
--- a/lapack-netlib/SRC/dsfrk.c
+++ b/lapack-netlib/SRC/dsfrk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsgesv.c b/lapack-netlib/SRC/dsgesv.c
index 049fd25d84..367a271b0e 100644
--- a/lapack-netlib/SRC/dsgesv.c
+++ b/lapack-netlib/SRC/dsgesv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dspcon.c b/lapack-netlib/SRC/dspcon.c
index 1ae0287878..a5238a7689 100644
--- a/lapack-netlib/SRC/dspcon.c
+++ b/lapack-netlib/SRC/dspcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dspev.c b/lapack-netlib/SRC/dspev.c
index aa0b6bf8c1..03a2fa6678 100644
--- a/lapack-netlib/SRC/dspev.c
+++ b/lapack-netlib/SRC/dspev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dspevd.c b/lapack-netlib/SRC/dspevd.c
index e674f18b0d..8ad1fa09a7 100644
--- a/lapack-netlib/SRC/dspevd.c
+++ b/lapack-netlib/SRC/dspevd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dspevx.c b/lapack-netlib/SRC/dspevx.c
index 92ea4ac6d3..0a96afb4aa 100644
--- a/lapack-netlib/SRC/dspevx.c
+++ b/lapack-netlib/SRC/dspevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dspgst.c b/lapack-netlib/SRC/dspgst.c
index 3fd0c23c17..482ebfcc5a 100644
--- a/lapack-netlib/SRC/dspgst.c
+++ b/lapack-netlib/SRC/dspgst.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dspgv.c b/lapack-netlib/SRC/dspgv.c
index be8b6d3229..e6af4016b2 100644
--- a/lapack-netlib/SRC/dspgv.c
+++ b/lapack-netlib/SRC/dspgv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dspgvd.c b/lapack-netlib/SRC/dspgvd.c
index 3927df7245..298410c145 100644
--- a/lapack-netlib/SRC/dspgvd.c
+++ b/lapack-netlib/SRC/dspgvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dspgvx.c b/lapack-netlib/SRC/dspgvx.c
index b02296c2c8..210390e30a 100644
--- a/lapack-netlib/SRC/dspgvx.c
+++ b/lapack-netlib/SRC/dspgvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsposv.c b/lapack-netlib/SRC/dsposv.c
index 3e0f265336..faa71a702a 100644
--- a/lapack-netlib/SRC/dsposv.c
+++ b/lapack-netlib/SRC/dsposv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsprfs.c b/lapack-netlib/SRC/dsprfs.c
index 520916c6ab..2d54f662e8 100644
--- a/lapack-netlib/SRC/dsprfs.c
+++ b/lapack-netlib/SRC/dsprfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dspsv.c b/lapack-netlib/SRC/dspsv.c
index c98c5229d8..ef323c69f9 100644
--- a/lapack-netlib/SRC/dspsv.c
+++ b/lapack-netlib/SRC/dspsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dspsvx.c b/lapack-netlib/SRC/dspsvx.c
index 41bfe98f8d..7e98571b7d 100644
--- a/lapack-netlib/SRC/dspsvx.c
+++ b/lapack-netlib/SRC/dspsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsptrd.c b/lapack-netlib/SRC/dsptrd.c
index d613b57990..3271da0abd 100644
--- a/lapack-netlib/SRC/dsptrd.c
+++ b/lapack-netlib/SRC/dsptrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsptrf.c b/lapack-netlib/SRC/dsptrf.c
index 6040c539dd..601a320c46 100644
--- a/lapack-netlib/SRC/dsptrf.c
+++ b/lapack-netlib/SRC/dsptrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsptri.c b/lapack-netlib/SRC/dsptri.c
index 2ecb43c469..b0f19e6828 100644
--- a/lapack-netlib/SRC/dsptri.c
+++ b/lapack-netlib/SRC/dsptri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsptrs.c b/lapack-netlib/SRC/dsptrs.c
index c31a7c7966..97c9c1b1d8 100644
--- a/lapack-netlib/SRC/dsptrs.c
+++ b/lapack-netlib/SRC/dsptrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dstebz.c b/lapack-netlib/SRC/dstebz.c
index 608ebe5100..9e01c2ae29 100644
--- a/lapack-netlib/SRC/dstebz.c
+++ b/lapack-netlib/SRC/dstebz.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dstedc.c b/lapack-netlib/SRC/dstedc.c
index cd3ba9a665..202bc3bff2 100644
--- a/lapack-netlib/SRC/dstedc.c
+++ b/lapack-netlib/SRC/dstedc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dstegr.c b/lapack-netlib/SRC/dstegr.c
index d64c439ae4..9a8784cae3 100644
--- a/lapack-netlib/SRC/dstegr.c
+++ b/lapack-netlib/SRC/dstegr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dstein.c b/lapack-netlib/SRC/dstein.c
index a916d8ad17..ced21fa70f 100644
--- a/lapack-netlib/SRC/dstein.c
+++ b/lapack-netlib/SRC/dstein.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dstemr.c b/lapack-netlib/SRC/dstemr.c
index 42b58bf61a..370057b05b 100644
--- a/lapack-netlib/SRC/dstemr.c
+++ b/lapack-netlib/SRC/dstemr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsteqr.c b/lapack-netlib/SRC/dsteqr.c
index d1140bea61..a80ce01d25 100644
--- a/lapack-netlib/SRC/dsteqr.c
+++ b/lapack-netlib/SRC/dsteqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsterf.c b/lapack-netlib/SRC/dsterf.c
index 090c50b61c..236b0044b5 100644
--- a/lapack-netlib/SRC/dsterf.c
+++ b/lapack-netlib/SRC/dsterf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dstev.c b/lapack-netlib/SRC/dstev.c
index 00ab2cfe0b..ac1edf83f4 100644
--- a/lapack-netlib/SRC/dstev.c
+++ b/lapack-netlib/SRC/dstev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dstevd.c b/lapack-netlib/SRC/dstevd.c
index cf2f30eacc..b00505d3f7 100644
--- a/lapack-netlib/SRC/dstevd.c
+++ b/lapack-netlib/SRC/dstevd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dstevr.c b/lapack-netlib/SRC/dstevr.c
index e5fbbdae43..00631d84cb 100644
--- a/lapack-netlib/SRC/dstevr.c
+++ b/lapack-netlib/SRC/dstevr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dstevx.c b/lapack-netlib/SRC/dstevx.c
index 1febd23eb7..24f73ae206 100644
--- a/lapack-netlib/SRC/dstevx.c
+++ b/lapack-netlib/SRC/dstevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsycon.c b/lapack-netlib/SRC/dsycon.c
index 751cd076d4..ae6aefaffc 100644
--- a/lapack-netlib/SRC/dsycon.c
+++ b/lapack-netlib/SRC/dsycon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsycon_3.c b/lapack-netlib/SRC/dsycon_3.c
index 9f9cb0039d..96ecffc682 100644
--- a/lapack-netlib/SRC/dsycon_3.c
+++ b/lapack-netlib/SRC/dsycon_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsycon_rook.c b/lapack-netlib/SRC/dsycon_rook.c
index c339fc39c2..7d78a0775f 100644
--- a/lapack-netlib/SRC/dsycon_rook.c
+++ b/lapack-netlib/SRC/dsycon_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyconv.c b/lapack-netlib/SRC/dsyconv.c
index 192321ef64..4416809780 100644
--- a/lapack-netlib/SRC/dsyconv.c
+++ b/lapack-netlib/SRC/dsyconv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyconvf.c b/lapack-netlib/SRC/dsyconvf.c
index 3947a6b56a..917e466869 100644
--- a/lapack-netlib/SRC/dsyconvf.c
+++ b/lapack-netlib/SRC/dsyconvf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyconvf_rook.c b/lapack-netlib/SRC/dsyconvf_rook.c
index 49b4fcc190..a4e10f0ce1 100644
--- a/lapack-netlib/SRC/dsyconvf_rook.c
+++ b/lapack-netlib/SRC/dsyconvf_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyequb.c b/lapack-netlib/SRC/dsyequb.c
index 84cb498869..19c1052a59 100644
--- a/lapack-netlib/SRC/dsyequb.c
+++ b/lapack-netlib/SRC/dsyequb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyev.c b/lapack-netlib/SRC/dsyev.c
index 50801fc310..d8daa225c8 100644
--- a/lapack-netlib/SRC/dsyev.c
+++ b/lapack-netlib/SRC/dsyev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyev_2stage.c b/lapack-netlib/SRC/dsyev_2stage.c
index 0b9f7283c4..b0cfb49948 100644
--- a/lapack-netlib/SRC/dsyev_2stage.c
+++ b/lapack-netlib/SRC/dsyev_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyevd.c b/lapack-netlib/SRC/dsyevd.c
index 16f71d9b63..9c89a4977d 100644
--- a/lapack-netlib/SRC/dsyevd.c
+++ b/lapack-netlib/SRC/dsyevd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyevd_2stage.c b/lapack-netlib/SRC/dsyevd_2stage.c
index a2fdcc74d0..0f79f9a519 100644
--- a/lapack-netlib/SRC/dsyevd_2stage.c
+++ b/lapack-netlib/SRC/dsyevd_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyevr.c b/lapack-netlib/SRC/dsyevr.c
index 6f55b9f42e..6ed93d469a 100644
--- a/lapack-netlib/SRC/dsyevr.c
+++ b/lapack-netlib/SRC/dsyevr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyevr_2stage.c b/lapack-netlib/SRC/dsyevr_2stage.c
index a706e53f6c..a43e1c2897 100644
--- a/lapack-netlib/SRC/dsyevr_2stage.c
+++ b/lapack-netlib/SRC/dsyevr_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyevx.c b/lapack-netlib/SRC/dsyevx.c
index 83927ddec3..efdcfa6f25 100644
--- a/lapack-netlib/SRC/dsyevx.c
+++ b/lapack-netlib/SRC/dsyevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyevx_2stage.c b/lapack-netlib/SRC/dsyevx_2stage.c
index b73bdddfe7..6e07042ab5 100644
--- a/lapack-netlib/SRC/dsyevx_2stage.c
+++ b/lapack-netlib/SRC/dsyevx_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsygs2.c b/lapack-netlib/SRC/dsygs2.c
index da9ba7b8e8..5feb0a1208 100644
--- a/lapack-netlib/SRC/dsygs2.c
+++ b/lapack-netlib/SRC/dsygs2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsygst.c b/lapack-netlib/SRC/dsygst.c
index b18805b890..6c9cd69695 100644
--- a/lapack-netlib/SRC/dsygst.c
+++ b/lapack-netlib/SRC/dsygst.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsygv.c b/lapack-netlib/SRC/dsygv.c
index 21792c93c2..d1cafff2ff 100644
--- a/lapack-netlib/SRC/dsygv.c
+++ b/lapack-netlib/SRC/dsygv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsygv_2stage.c b/lapack-netlib/SRC/dsygv_2stage.c
index 92e12102ec..d0c60b15a9 100644
--- a/lapack-netlib/SRC/dsygv_2stage.c
+++ b/lapack-netlib/SRC/dsygv_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsygvd.c b/lapack-netlib/SRC/dsygvd.c
index 828399c971..b01f8c9043 100644
--- a/lapack-netlib/SRC/dsygvd.c
+++ b/lapack-netlib/SRC/dsygvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsygvx.c b/lapack-netlib/SRC/dsygvx.c
index e5478eea79..4c482f6b70 100644
--- a/lapack-netlib/SRC/dsygvx.c
+++ b/lapack-netlib/SRC/dsygvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyrfs.c b/lapack-netlib/SRC/dsyrfs.c
index 2503d5f241..27c6751be7 100644
--- a/lapack-netlib/SRC/dsyrfs.c
+++ b/lapack-netlib/SRC/dsyrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyrfsx.c b/lapack-netlib/SRC/dsyrfsx.c
index 05218fe35f..38c70bbfd4 100644
--- a/lapack-netlib/SRC/dsyrfsx.c
+++ b/lapack-netlib/SRC/dsyrfsx.c
@@ -54,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -257,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsysv.c b/lapack-netlib/SRC/dsysv.c
index 802c9c4ccf..181189538d 100644
--- a/lapack-netlib/SRC/dsysv.c
+++ b/lapack-netlib/SRC/dsysv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsysv_aa.c b/lapack-netlib/SRC/dsysv_aa.c
index e01611764f..9b19f3bb28 100644
--- a/lapack-netlib/SRC/dsysv_aa.c
+++ b/lapack-netlib/SRC/dsysv_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsysv_aa_2stage.c b/lapack-netlib/SRC/dsysv_aa_2stage.c
index 16e3dcbc89..5612cb9fc6 100644
--- a/lapack-netlib/SRC/dsysv_aa_2stage.c
+++ b/lapack-netlib/SRC/dsysv_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsysv_rk.c b/lapack-netlib/SRC/dsysv_rk.c
index 76c3fd48b5..d781d3f132 100644
--- a/lapack-netlib/SRC/dsysv_rk.c
+++ b/lapack-netlib/SRC/dsysv_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsysv_rook.c b/lapack-netlib/SRC/dsysv_rook.c
index 7d813426f0..e1de661bd3 100644
--- a/lapack-netlib/SRC/dsysv_rook.c
+++ b/lapack-netlib/SRC/dsysv_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsysvx.c b/lapack-netlib/SRC/dsysvx.c
index da5c5ebe35..da83f99f3c 100644
--- a/lapack-netlib/SRC/dsysvx.c
+++ b/lapack-netlib/SRC/dsysvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsysvxx.c b/lapack-netlib/SRC/dsysvxx.c
index 66978788a3..7ded4a9a10 100644
--- a/lapack-netlib/SRC/dsysvxx.c
+++ b/lapack-netlib/SRC/dsysvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsyswapr.c b/lapack-netlib/SRC/dsyswapr.c
index e239f7858f..ba74d23a75 100644
--- a/lapack-netlib/SRC/dsyswapr.c
+++ b/lapack-netlib/SRC/dsyswapr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytd2.c b/lapack-netlib/SRC/dsytd2.c
index 48c357648a..4b32560830 100644
--- a/lapack-netlib/SRC/dsytd2.c
+++ b/lapack-netlib/SRC/dsytd2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytf2.c b/lapack-netlib/SRC/dsytf2.c
index 421bc62d7e..76401042e3 100644
--- a/lapack-netlib/SRC/dsytf2.c
+++ b/lapack-netlib/SRC/dsytf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytf2_rk.c b/lapack-netlib/SRC/dsytf2_rk.c
index 0cf7a77264..ba30c7ff73 100644
--- a/lapack-netlib/SRC/dsytf2_rk.c
+++ b/lapack-netlib/SRC/dsytf2_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytf2_rook.c b/lapack-netlib/SRC/dsytf2_rook.c
index a6e93428d6..21ba35c5ad 100644
--- a/lapack-netlib/SRC/dsytf2_rook.c
+++ b/lapack-netlib/SRC/dsytf2_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrd.c b/lapack-netlib/SRC/dsytrd.c
index da0310281c..e56ca74738 100644
--- a/lapack-netlib/SRC/dsytrd.c
+++ b/lapack-netlib/SRC/dsytrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrd_2stage.c b/lapack-netlib/SRC/dsytrd_2stage.c
index 100864b635..4063ace549 100644
--- a/lapack-netlib/SRC/dsytrd_2stage.c
+++ b/lapack-netlib/SRC/dsytrd_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrd_sb2st.c b/lapack-netlib/SRC/dsytrd_sb2st.c
index e8f2bf0a55..ed78630d61 100644
--- a/lapack-netlib/SRC/dsytrd_sb2st.c
+++ b/lapack-netlib/SRC/dsytrd_sb2st.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrd_sy2sb.c b/lapack-netlib/SRC/dsytrd_sy2sb.c
index b98cecf64f..8df65bb91f 100644
--- a/lapack-netlib/SRC/dsytrd_sy2sb.c
+++ b/lapack-netlib/SRC/dsytrd_sy2sb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrf.c b/lapack-netlib/SRC/dsytrf.c
index f2078bdb13..309ccabb4f 100644
--- a/lapack-netlib/SRC/dsytrf.c
+++ b/lapack-netlib/SRC/dsytrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrf_aa.c b/lapack-netlib/SRC/dsytrf_aa.c
index 1f56e2f7c6..11739e47e0 100644
--- a/lapack-netlib/SRC/dsytrf_aa.c
+++ b/lapack-netlib/SRC/dsytrf_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrf_aa_2stage.c b/lapack-netlib/SRC/dsytrf_aa_2stage.c
index 24b213c709..9d37b01bf3 100644
--- a/lapack-netlib/SRC/dsytrf_aa_2stage.c
+++ b/lapack-netlib/SRC/dsytrf_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrf_rk.c b/lapack-netlib/SRC/dsytrf_rk.c
index dcb9aeefff..356a444a14 100644
--- a/lapack-netlib/SRC/dsytrf_rk.c
+++ b/lapack-netlib/SRC/dsytrf_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrf_rook.c b/lapack-netlib/SRC/dsytrf_rook.c
index 57f8e4e64e..c19ea9cecb 100644
--- a/lapack-netlib/SRC/dsytrf_rook.c
+++ b/lapack-netlib/SRC/dsytrf_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytri.c b/lapack-netlib/SRC/dsytri.c
index 0311e9e1eb..6bc2972374 100644
--- a/lapack-netlib/SRC/dsytri.c
+++ b/lapack-netlib/SRC/dsytri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytri2.c b/lapack-netlib/SRC/dsytri2.c
index 9f453cc054..1a3288cb68 100644
--- a/lapack-netlib/SRC/dsytri2.c
+++ b/lapack-netlib/SRC/dsytri2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytri2x.c b/lapack-netlib/SRC/dsytri2x.c
index 6bab331f06..72b95139aa 100644
--- a/lapack-netlib/SRC/dsytri2x.c
+++ b/lapack-netlib/SRC/dsytri2x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytri_3.c b/lapack-netlib/SRC/dsytri_3.c
index 8ce325fea9..1a8c65e332 100644
--- a/lapack-netlib/SRC/dsytri_3.c
+++ b/lapack-netlib/SRC/dsytri_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytri_3x.c b/lapack-netlib/SRC/dsytri_3x.c
index 1d7a23f9f6..001bcf233e 100644
--- a/lapack-netlib/SRC/dsytri_3x.c
+++ b/lapack-netlib/SRC/dsytri_3x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytri_rook.c b/lapack-netlib/SRC/dsytri_rook.c
index 16adecc7d6..0633c0164c 100644
--- a/lapack-netlib/SRC/dsytri_rook.c
+++ b/lapack-netlib/SRC/dsytri_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrs.c b/lapack-netlib/SRC/dsytrs.c
index 69903ec36f..c9f6a5d824 100644
--- a/lapack-netlib/SRC/dsytrs.c
+++ b/lapack-netlib/SRC/dsytrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrs2.c b/lapack-netlib/SRC/dsytrs2.c
index 62a8f545ae..e0192fa9ac 100644
--- a/lapack-netlib/SRC/dsytrs2.c
+++ b/lapack-netlib/SRC/dsytrs2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrs_3.c b/lapack-netlib/SRC/dsytrs_3.c
index ee48613c4b..6eaf0dd892 100644
--- a/lapack-netlib/SRC/dsytrs_3.c
+++ b/lapack-netlib/SRC/dsytrs_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrs_aa.c b/lapack-netlib/SRC/dsytrs_aa.c
index bbf2252590..047541025e 100644
--- a/lapack-netlib/SRC/dsytrs_aa.c
+++ b/lapack-netlib/SRC/dsytrs_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrs_aa_2stage.c b/lapack-netlib/SRC/dsytrs_aa_2stage.c
index 3153ef806e..2716671689 100644
--- a/lapack-netlib/SRC/dsytrs_aa_2stage.c
+++ b/lapack-netlib/SRC/dsytrs_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dsytrs_rook.c b/lapack-netlib/SRC/dsytrs_rook.c
index af9b1f43a2..7fe1d3b8b3 100644
--- a/lapack-netlib/SRC/dsytrs_rook.c
+++ b/lapack-netlib/SRC/dsytrs_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtbcon.c b/lapack-netlib/SRC/dtbcon.c
index 0c5807e784..1a3be57e97 100644
--- a/lapack-netlib/SRC/dtbcon.c
+++ b/lapack-netlib/SRC/dtbcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtbrfs.c b/lapack-netlib/SRC/dtbrfs.c
index 19ac8469c1..0cc6aaa9b5 100644
--- a/lapack-netlib/SRC/dtbrfs.c
+++ b/lapack-netlib/SRC/dtbrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtbtrs.c b/lapack-netlib/SRC/dtbtrs.c
index 6da24c48f6..0e2759259a 100644
--- a/lapack-netlib/SRC/dtbtrs.c
+++ b/lapack-netlib/SRC/dtbtrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtfsm.c b/lapack-netlib/SRC/dtfsm.c
index bc37a7ccce..bb49e16a9d 100644
--- a/lapack-netlib/SRC/dtfsm.c
+++ b/lapack-netlib/SRC/dtfsm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtftri.c b/lapack-netlib/SRC/dtftri.c
index 86b63defa4..a2c0fcd35f 100644
--- a/lapack-netlib/SRC/dtftri.c
+++ b/lapack-netlib/SRC/dtftri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtfttp.c b/lapack-netlib/SRC/dtfttp.c
index d1dd7891ea..97ebc6986d 100644
--- a/lapack-netlib/SRC/dtfttp.c
+++ b/lapack-netlib/SRC/dtfttp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtfttr.c b/lapack-netlib/SRC/dtfttr.c
index 1054894830..be710da649 100644
--- a/lapack-netlib/SRC/dtfttr.c
+++ b/lapack-netlib/SRC/dtfttr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtgevc.c b/lapack-netlib/SRC/dtgevc.c
index 66b43dacac..a4754f1836 100644
--- a/lapack-netlib/SRC/dtgevc.c
+++ b/lapack-netlib/SRC/dtgevc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtgex2.c b/lapack-netlib/SRC/dtgex2.c
index f4a077d355..2a6060225d 100644
--- a/lapack-netlib/SRC/dtgex2.c
+++ b/lapack-netlib/SRC/dtgex2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtgexc.c b/lapack-netlib/SRC/dtgexc.c
index bc0765a6fb..9eb76de183 100644
--- a/lapack-netlib/SRC/dtgexc.c
+++ b/lapack-netlib/SRC/dtgexc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtgsen.c b/lapack-netlib/SRC/dtgsen.c
index 1d2e658e25..3c186178ab 100644
--- a/lapack-netlib/SRC/dtgsen.c
+++ b/lapack-netlib/SRC/dtgsen.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtgsja.c b/lapack-netlib/SRC/dtgsja.c
index 158ee2805e..25a027f2fc 100644
--- a/lapack-netlib/SRC/dtgsja.c
+++ b/lapack-netlib/SRC/dtgsja.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtgsna.c b/lapack-netlib/SRC/dtgsna.c
index 010b0a8909..9f0d49b126 100644
--- a/lapack-netlib/SRC/dtgsna.c
+++ b/lapack-netlib/SRC/dtgsna.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtgsy2.c b/lapack-netlib/SRC/dtgsy2.c
index fc2f271aa1..0a89bd99b8 100644
--- a/lapack-netlib/SRC/dtgsy2.c
+++ b/lapack-netlib/SRC/dtgsy2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtgsyl.c b/lapack-netlib/SRC/dtgsyl.c
index 3493e716fa..3d0885c0f9 100644
--- a/lapack-netlib/SRC/dtgsyl.c
+++ b/lapack-netlib/SRC/dtgsyl.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtpcon.c b/lapack-netlib/SRC/dtpcon.c
index 7beee5211d..a0747eae5f 100644
--- a/lapack-netlib/SRC/dtpcon.c
+++ b/lapack-netlib/SRC/dtpcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtplqt.c b/lapack-netlib/SRC/dtplqt.c
index 0c3d1b1c93..cff76eda66 100644
--- a/lapack-netlib/SRC/dtplqt.c
+++ b/lapack-netlib/SRC/dtplqt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtplqt2.c b/lapack-netlib/SRC/dtplqt2.c
index cac1311db6..db77fca68c 100644
--- a/lapack-netlib/SRC/dtplqt2.c
+++ b/lapack-netlib/SRC/dtplqt2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtpmlqt.c b/lapack-netlib/SRC/dtpmlqt.c
index 52ee6799ea..3907b7d931 100644
--- a/lapack-netlib/SRC/dtpmlqt.c
+++ b/lapack-netlib/SRC/dtpmlqt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtpmqrt.c b/lapack-netlib/SRC/dtpmqrt.c
index 78b7a4e4f9..4c0032954a 100644
--- a/lapack-netlib/SRC/dtpmqrt.c
+++ b/lapack-netlib/SRC/dtpmqrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtpqrt.c b/lapack-netlib/SRC/dtpqrt.c
index 3d44f2b166..bb95eebef8 100644
--- a/lapack-netlib/SRC/dtpqrt.c
+++ b/lapack-netlib/SRC/dtpqrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtpqrt2.c b/lapack-netlib/SRC/dtpqrt2.c
index d82e0a7d52..2d1634e224 100644
--- a/lapack-netlib/SRC/dtpqrt2.c
+++ b/lapack-netlib/SRC/dtpqrt2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtprfb.c b/lapack-netlib/SRC/dtprfb.c
index 28c152d9e5..6e17595423 100644
--- a/lapack-netlib/SRC/dtprfb.c
+++ b/lapack-netlib/SRC/dtprfb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtprfs.c b/lapack-netlib/SRC/dtprfs.c
index 3d89639f4e..6fa658c0be 100644
--- a/lapack-netlib/SRC/dtprfs.c
+++ b/lapack-netlib/SRC/dtprfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtptri.c b/lapack-netlib/SRC/dtptri.c
index d2bf675f0b..655218d984 100644
--- a/lapack-netlib/SRC/dtptri.c
+++ b/lapack-netlib/SRC/dtptri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtptrs.c b/lapack-netlib/SRC/dtptrs.c
index b9485e5337..d8643c9e29 100644
--- a/lapack-netlib/SRC/dtptrs.c
+++ b/lapack-netlib/SRC/dtptrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtpttf.c b/lapack-netlib/SRC/dtpttf.c
index f58742658a..858457e910 100644
--- a/lapack-netlib/SRC/dtpttf.c
+++ b/lapack-netlib/SRC/dtpttf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtpttr.c b/lapack-netlib/SRC/dtpttr.c
index e62a648cf2..4fbc8af14d 100644
--- a/lapack-netlib/SRC/dtpttr.c
+++ b/lapack-netlib/SRC/dtpttr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtrcon.c b/lapack-netlib/SRC/dtrcon.c
index bda4ee17af..ee54cf1787 100644
--- a/lapack-netlib/SRC/dtrcon.c
+++ b/lapack-netlib/SRC/dtrcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtrevc.c b/lapack-netlib/SRC/dtrevc.c
index bbaacf89d4..a282cec3f2 100644
--- a/lapack-netlib/SRC/dtrevc.c
+++ b/lapack-netlib/SRC/dtrevc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtrevc3.c b/lapack-netlib/SRC/dtrevc3.c
index eb7055fa29..0ad4b3d92b 100644
--- a/lapack-netlib/SRC/dtrevc3.c
+++ b/lapack-netlib/SRC/dtrevc3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtrexc.c b/lapack-netlib/SRC/dtrexc.c
index 6dd00b9070..e70297281d 100644
--- a/lapack-netlib/SRC/dtrexc.c
+++ b/lapack-netlib/SRC/dtrexc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtrrfs.c b/lapack-netlib/SRC/dtrrfs.c
index a42ee25ffa..5a8a027e40 100644
--- a/lapack-netlib/SRC/dtrrfs.c
+++ b/lapack-netlib/SRC/dtrrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtrsen.c b/lapack-netlib/SRC/dtrsen.c
index 17d3915cab..165cddb0f3 100644
--- a/lapack-netlib/SRC/dtrsen.c
+++ b/lapack-netlib/SRC/dtrsen.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtrsna.c b/lapack-netlib/SRC/dtrsna.c
index 4bcf3e344b..5cf7757cb9 100644
--- a/lapack-netlib/SRC/dtrsna.c
+++ b/lapack-netlib/SRC/dtrsna.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtrsyl.c b/lapack-netlib/SRC/dtrsyl.c
index a928346829..f98bd6a83d 100644
--- a/lapack-netlib/SRC/dtrsyl.c
+++ b/lapack-netlib/SRC/dtrsyl.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtrsyl3.c b/lapack-netlib/SRC/dtrsyl3.c
index 187226281e..c459b61dbf 100644
--- a/lapack-netlib/SRC/dtrsyl3.c
+++ b/lapack-netlib/SRC/dtrsyl3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -263,7 +263,7 @@ static int my_expfunc(double *x) {int e; (void)frexp(*x,&e); return e;}
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtrti2.c b/lapack-netlib/SRC/dtrti2.c
index 47eb0d889c..9779b6f7a2 100644
--- a/lapack-netlib/SRC/dtrti2.c
+++ b/lapack-netlib/SRC/dtrti2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtrtri.c b/lapack-netlib/SRC/dtrtri.c
index 1f7191472b..1963885538 100644
--- a/lapack-netlib/SRC/dtrtri.c
+++ b/lapack-netlib/SRC/dtrtri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtrtrs.c b/lapack-netlib/SRC/dtrtrs.c
index 804ebe54e9..6c2b27257a 100644
--- a/lapack-netlib/SRC/dtrtrs.c
+++ b/lapack-netlib/SRC/dtrtrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtrttf.c b/lapack-netlib/SRC/dtrttf.c
index 199a8731c3..a90ecd0dc0 100644
--- a/lapack-netlib/SRC/dtrttf.c
+++ b/lapack-netlib/SRC/dtrttf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtrttp.c b/lapack-netlib/SRC/dtrttp.c
index fb96db271f..2164edb557 100644
--- a/lapack-netlib/SRC/dtrttp.c
+++ b/lapack-netlib/SRC/dtrttp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dtzrzf.c b/lapack-netlib/SRC/dtzrzf.c
index 5836f65fce..7324ead6b6 100644
--- a/lapack-netlib/SRC/dtzrzf.c
+++ b/lapack-netlib/SRC/dtzrzf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/dzsum1.c b/lapack-netlib/SRC/dzsum1.c
index e3c0e9893d..5101bc049a 100644
--- a/lapack-netlib/SRC/dzsum1.c
+++ b/lapack-netlib/SRC/dzsum1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/icmax1.c b/lapack-netlib/SRC/icmax1.c
index 3a2510453e..4d57a4c1af 100644
--- a/lapack-netlib/SRC/icmax1.c
+++ b/lapack-netlib/SRC/icmax1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ieeeck.c b/lapack-netlib/SRC/ieeeck.c
index 0516fc3775..8b22019f1c 100644
--- a/lapack-netlib/SRC/ieeeck.c
+++ b/lapack-netlib/SRC/ieeeck.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ilaclc.c b/lapack-netlib/SRC/ilaclc.c
index 616c3d1e4d..16617f9dac 100644
--- a/lapack-netlib/SRC/ilaclc.c
+++ b/lapack-netlib/SRC/ilaclc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ilaclr.c b/lapack-netlib/SRC/ilaclr.c
index 7cddc2b86d..b90466f9ac 100644
--- a/lapack-netlib/SRC/ilaclr.c
+++ b/lapack-netlib/SRC/ilaclr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/iladiag.c b/lapack-netlib/SRC/iladiag.c
index fa99e64238..a65ea4cd93 100644
--- a/lapack-netlib/SRC/iladiag.c
+++ b/lapack-netlib/SRC/iladiag.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/iladlc.c b/lapack-netlib/SRC/iladlc.c
index d2c5451a0f..37cfad67e5 100644
--- a/lapack-netlib/SRC/iladlc.c
+++ b/lapack-netlib/SRC/iladlc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/iladlr.c b/lapack-netlib/SRC/iladlr.c
index ff871596cb..8955573f7b 100644
--- a/lapack-netlib/SRC/iladlr.c
+++ b/lapack-netlib/SRC/iladlr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ilaenv.c b/lapack-netlib/SRC/ilaenv.c
index 8f3b2db8eb..c262e5952f 100644
--- a/lapack-netlib/SRC/ilaenv.c
+++ b/lapack-netlib/SRC/ilaenv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ilaenv2stage.c b/lapack-netlib/SRC/ilaenv2stage.c
index 9730bdc482..12baeba636 100644
--- a/lapack-netlib/SRC/ilaenv2stage.c
+++ b/lapack-netlib/SRC/ilaenv2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ilaprec.c b/lapack-netlib/SRC/ilaprec.c
index 07a1b58731..381d3292e6 100644
--- a/lapack-netlib/SRC/ilaprec.c
+++ b/lapack-netlib/SRC/ilaprec.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ilaslc.c b/lapack-netlib/SRC/ilaslc.c
index cdce95c3af..c37f0f2f4d 100644
--- a/lapack-netlib/SRC/ilaslc.c
+++ b/lapack-netlib/SRC/ilaslc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ilaslr.c b/lapack-netlib/SRC/ilaslr.c
index 285d971a5f..f0f04e9d0e 100644
--- a/lapack-netlib/SRC/ilaslr.c
+++ b/lapack-netlib/SRC/ilaslr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ilatrans.c b/lapack-netlib/SRC/ilatrans.c
index c75bb7c488..f086785cea 100644
--- a/lapack-netlib/SRC/ilatrans.c
+++ b/lapack-netlib/SRC/ilatrans.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ilauplo.c b/lapack-netlib/SRC/ilauplo.c
index 71d1c5cbaf..4bda2c0c70 100644
--- a/lapack-netlib/SRC/ilauplo.c
+++ b/lapack-netlib/SRC/ilauplo.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ilazlc.c b/lapack-netlib/SRC/ilazlc.c
index 4af641d40c..60de5b1851 100644
--- a/lapack-netlib/SRC/ilazlc.c
+++ b/lapack-netlib/SRC/ilazlc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ilazlr.c b/lapack-netlib/SRC/ilazlr.c
index 93b80c7c3b..016cd9cb98 100644
--- a/lapack-netlib/SRC/ilazlr.c
+++ b/lapack-netlib/SRC/ilazlr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/iparam2stage.c b/lapack-netlib/SRC/iparam2stage.c
index 7ba938dcd7..f88aeb1b42 100644
--- a/lapack-netlib/SRC/iparam2stage.c
+++ b/lapack-netlib/SRC/iparam2stage.c
@@ -53,8 +53,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -261,7 +261,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/iparmq.c b/lapack-netlib/SRC/iparmq.c
index eb9d12112c..57578929fe 100644
--- a/lapack-netlib/SRC/iparmq.c
+++ b/lapack-netlib/SRC/iparmq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/izmax1.c b/lapack-netlib/SRC/izmax1.c
index 1176d0208e..c6a8443bc4 100644
--- a/lapack-netlib/SRC/izmax1.c
+++ b/lapack-netlib/SRC/izmax1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/la_constants.c b/lapack-netlib/SRC/la_constants.c
index d05923a46d..7856e080ff 100644
--- a/lapack-netlib/SRC/la_constants.c
+++ b/lapack-netlib/SRC/la_constants.c
@@ -19,7 +19,28 @@
#undef I
#endif
-typedef int integer;
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
+
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/la_xisnan.c b/lapack-netlib/SRC/la_xisnan.c
index d05923a46d..7856e080ff 100644
--- a/lapack-netlib/SRC/la_xisnan.c
+++ b/lapack-netlib/SRC/la_xisnan.c
@@ -19,7 +19,28 @@
#undef I
#endif
-typedef int integer;
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
+
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/lsamen.c b/lapack-netlib/SRC/lsamen.c
index 18bad69cf8..252fed8dc4 100644
--- a/lapack-netlib/SRC/lsamen.c
+++ b/lapack-netlib/SRC/lsamen.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/sbbcsd.c b/lapack-netlib/SRC/sbbcsd.c
index 198baa59c9..d22bb29950 100644
--- a/lapack-netlib/SRC/sbbcsd.c
+++ b/lapack-netlib/SRC/sbbcsd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/sbdsdc.c b/lapack-netlib/SRC/sbdsdc.c
index ffcf1afda0..85fd13e2bc 100644
--- a/lapack-netlib/SRC/sbdsdc.c
+++ b/lapack-netlib/SRC/sbdsdc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/sbdsqr.c b/lapack-netlib/SRC/sbdsqr.c
index 832c43bca0..f5a3b49d8f 100644
--- a/lapack-netlib/SRC/sbdsqr.c
+++ b/lapack-netlib/SRC/sbdsqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/sbdsvdx.c b/lapack-netlib/SRC/sbdsvdx.c
index bf1b9aa1b5..be3bbde4f6 100644
--- a/lapack-netlib/SRC/sbdsvdx.c
+++ b/lapack-netlib/SRC/sbdsvdx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/scombssq.c b/lapack-netlib/SRC/scombssq.c
index 1e207420f4..b2da995d69 100644
--- a/lapack-netlib/SRC/scombssq.c
+++ b/lapack-netlib/SRC/scombssq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/scsum1.c b/lapack-netlib/SRC/scsum1.c
index a12e8cc8a2..35384b9499 100644
--- a/lapack-netlib/SRC/scsum1.c
+++ b/lapack-netlib/SRC/scsum1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/sdisna.c b/lapack-netlib/SRC/sdisna.c
index bf12638f16..8f411715cf 100644
--- a/lapack-netlib/SRC/sdisna.c
+++ b/lapack-netlib/SRC/sdisna.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/sgbbrd.c b/lapack-netlib/SRC/sgbbrd.c
index ffa248478a..306eebee79 100644
--- a/lapack-netlib/SRC/sgbbrd.c
+++ b/lapack-netlib/SRC/sgbbrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -235,19 +235,11 @@ typedef struct Namelist Namelist;
#define i_len(s, n) (n)
#define i_nint(x) ((integer)u_nint(*(x)))
#define i_sign(a,b) ((integer)u_sign((integer)*(a),(integer)*(b)))
-#define pow_dd(ap, bp) ( pow(*(ap), *(bp)))
-#define pow_si(B,E) spow_ui(*(B),*(E))
-#define pow_ri(B,E) spow_ui(*(B),*(E))
-#define pow_di(B,E) dpow_ui(*(B),*(E))
-#define pow_zi(p, a, b) {pCd(p) = zpow_ui(Cd(a), *(b));}
-#define pow_ci(p, a, b) {pCf(p) = cpow_ui(Cf(a), *(b));}
-#define pow_zz(R,A,B) {pCd(R) = cpow(Cd(A),*(B));}
#define s_cat(lpp, rpp, rnp, np, llp) { ftnlen i, nc, ll; char *f__rp, *lp; ll = (llp); lp = (lpp); for(i=0; i < (int)*(np); ++i) { nc = ll; if((rnp)[i] < nc) nc = (rnp)[i]; ll -= nc; f__rp = (rpp)[i]; while(--nc >= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -260,248 +249,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i
*> \param[out] WORK
*> \verbatim
-*> WORK is REAL array, dimension (3*N)
+*> WORK is REAL array, dimension (MAX(1,3*N))
*> On exit, WORK(1) contains the reciprocal pivot growth
*> factor norm(A)/norm(U). The "max absolute element" norm is
*> used. If WORK(1) is much less than 1, then the stability
diff --git a/lapack-netlib/SRC/sgbsvxx.c b/lapack-netlib/SRC/sgbsvxx.c
index 74f458c06f..d1a3d0e2f4 100644
--- a/lapack-netlib/SRC/sgbsvxx.c
+++ b/lapack-netlib/SRC/sgbsvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/sgbtf2.c b/lapack-netlib/SRC/sgbtf2.c
index 9324568d3f..e73e9b879d 100644
--- a/lapack-netlib/SRC/sgbtf2.c
+++ b/lapack-netlib/SRC/sgbtf2.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -235,19 +232,11 @@ typedef struct Namelist Namelist;
#define i_len(s, n) (n)
#define i_nint(x) ((integer)u_nint(*(x)))
#define i_sign(a,b) ((integer)u_sign((integer)*(a),(integer)*(b)))
-#define pow_dd(ap, bp) ( pow(*(ap), *(bp)))
-#define pow_si(B,E) spow_ui(*(B),*(E))
-#define pow_ri(B,E) spow_ui(*(B),*(E))
-#define pow_di(B,E) dpow_ui(*(B),*(E))
-#define pow_zi(p, a, b) {pCd(p) = zpow_ui(Cd(a), *(b));}
-#define pow_ci(p, a, b) {pCf(p) = cpow_ui(Cf(a), *(b));}
-#define pow_zz(R,A,B) {pCd(R) = cpow(Cd(A),*(B));}
#define s_cat(lpp, rpp, rnp, np, llp) { ftnlen i, nc, ll; char *f__rp, *lp; ll = (llp); lp = (lpp); for(i=0; i < (int)*(np); ++i) { nc = ll; if((rnp)[i] < nc) nc = (rnp)[i]; ll -= nc; f__rp = (rpp)[i]; while(--nc >= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +247,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -257,251 +249,12 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define myhuge(w) {HUGE_VAL}
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
typedef logical (*L_fp)();
#endif
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -260,248 +252,13 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
typedef logical (*L_fp)();
#endif
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +247,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +247,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +247,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,257 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc_(w,s,e,n) dmaxloc_(w,*(s),*(e),n)
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +247,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +247,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +247,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i
*> \param[out] WORK
*> \verbatim
-*> WORK is REAL array, dimension (4*N)
+*> WORK is REAL array, dimension (MAX(1,4*N))
*> On exit, WORK(1) contains the reciprocal pivot growth
*> factor norm(A)/norm(U). The "max absolute element" norm is
*> used. If WORK(1) is much less than 1, then the stability
diff --git a/lapack-netlib/SRC/sgesvxx.c b/lapack-netlib/SRC/sgesvxx.c
index 424053793e..742e0023da 100644
--- a/lapack-netlib/SRC/sgesvxx.c
+++ b/lapack-netlib/SRC/sgesvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/sgetc2.c b/lapack-netlib/SRC/sgetc2.c
index 1ed5eb4be4..3fee2f7c97 100644
--- a/lapack-netlib/SRC/sgetc2.c
+++ b/lapack-netlib/SRC/sgetc2.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -235,19 +232,11 @@ typedef struct Namelist Namelist;
#define i_len(s, n) (n)
#define i_nint(x) ((integer)u_nint(*(x)))
#define i_sign(a,b) ((integer)u_sign((integer)*(a),(integer)*(b)))
-#define pow_dd(ap, bp) ( pow(*(ap), *(bp)))
-#define pow_si(B,E) spow_ui(*(B),*(E))
-#define pow_ri(B,E) spow_ui(*(B),*(E))
-#define pow_di(B,E) dpow_ui(*(B),*(E))
-#define pow_zi(p, a, b) {pCd(p) = zpow_ui(Cd(a), *(b));}
-#define pow_ci(p, a, b) {pCf(p) = cpow_ui(Cf(a), *(b));}
-#define pow_zz(R,A,B) {pCd(R) = cpow(Cd(A),*(B));}
#define s_cat(lpp, rpp, rnp, np, llp) { ftnlen i, nc, ll; char *f__rp, *lp; ll = (llp); lp = (lpp); for(i=0; i < (int)*(np); ++i) { nc = ll; if((rnp)[i] < nc) nc = (rnp)[i]; ll -= nc; f__rp = (rpp)[i]; while(--nc >= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +247,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +251,19 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
+ float pow=1.0; unsigned long int u;
+ if(n != 0) {
+ if(n < 0) n = -n, x = 1/x;
+ for(u = n; ; ) {
+ if(u & 01) pow *= x;
+ if(u >>= 1) x *= x;
+ else break;
+ }
+ }
+ return pow;
}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -260,248 +252,13 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
typedef logical (*L_fp)();
#endif
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -260,248 +252,13 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
typedef logical (*L_fp)();
#endif
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -260,248 +252,13 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
typedef logical (*L_fp)();
#endif
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +249,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,6 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -234,148 +247,5 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc_(w,s,e,n) dmaxloc_(w,*(s),*(e),n)
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
#endif
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
- _Complex float zdotc = 0.0;
- if (incx == 1 && incy == 1) {
- for (i=0;i= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
-static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
@@ -258,250 +250,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef logical (*L_fp)(...);
-#else
-typedef logical (*L_fp)();
-#endif
-static float spow_ui(float x, integer n) {
- float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static double dpow_ui(double x, integer n) {
- double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#ifdef _MSC_VER
-static _Fcomplex cpow_ui(complex x, integer n) {
- complex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
- for(u = n; ; ) {
- if(u & 01) pow.r *= x.r, pow.i *= x.i;
- if(u >>= 1) x.r *= x.r, x.i *= x.i;
- else break;
- }
- }
- _Fcomplex p={pow.r, pow.i};
- return p;
-}
-#else
-static _Complex float cpow_ui(_Complex float x, integer n) {
- _Complex float pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-#ifdef _MSC_VER
-static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
- _Dcomplex pow={1.0,0.0}; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
- for(u = n; ; ) {
- if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
- if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
- else break;
- }
- }
- _Dcomplex p = {pow._Val[0], pow._Val[1]};
- return p;
-}
-#else
-static _Complex double zpow_ui(_Complex double x, integer n) {
- _Complex double pow=1.0; unsigned long int u;
- if(n != 0) {
- if(n < 0) n = -n, x = 1/x;
- for(u = n; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-#endif
-static integer pow_ii(integer x, integer n) {
- integer pow; unsigned long int u;
- if (n <= 0) {
- if (n == 0 || x == 1) pow = 1;
- else if (x != -1) pow = x == 0 ? 1/x : 0;
- else n = -n;
- }
- if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
- u = n;
- for(pow = 1; ; ) {
- if(u & 01) pow *= x;
- if(u >>= 1) x *= x;
- else break;
- }
- }
- return pow;
-}
-static integer dmaxloc_(double *w, integer s, integer e, integer *n)
-{
- double m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static integer smaxloc_(float *w, integer s, integer e, integer *n)
-{
- float m; integer i, mi;
- for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
- if (w[i-1]>m) mi=i ,m=w[i-1];
- return mi-s+1;
-}
-static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
- integer n = *n_, incx = *incx_, incy = *incy_, i;
-#ifdef _MSC_VER
- _Fcomplex zdotc = {0.0, 0.0};
- if (incx == 1 && incy == 1) {
- for (i=0;i
*> \param[out] RWORK
*> \verbatim
-*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,N))
*> On exit, RWORK(1) contains the reciprocal pivot growth
*> factor norm(A)/norm(U). The "max absolute element" norm is
*> used. If RWORK(1) is much less than 1, then the stability
diff --git a/lapack-netlib/SRC/zgbsvxx.c b/lapack-netlib/SRC/zgbsvxx.c
index ad6692aa06..6928a7b43c 100644
--- a/lapack-netlib/SRC/zgbsvxx.c
+++ b/lapack-netlib/SRC/zgbsvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgbtf2.c b/lapack-netlib/SRC/zgbtf2.c
index b15c12d869..a06c4c1000 100644
--- a/lapack-netlib/SRC/zgbtf2.c
+++ b/lapack-netlib/SRC/zgbtf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgbtrf.c b/lapack-netlib/SRC/zgbtrf.c
index 64b5d13048..236f1434df 100644
--- a/lapack-netlib/SRC/zgbtrf.c
+++ b/lapack-netlib/SRC/zgbtrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgbtrs.c b/lapack-netlib/SRC/zgbtrs.c
index b744ab5b6b..4f3f363503 100644
--- a/lapack-netlib/SRC/zgbtrs.c
+++ b/lapack-netlib/SRC/zgbtrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgebak.c b/lapack-netlib/SRC/zgebak.c
index 131185aec5..1cda920df5 100644
--- a/lapack-netlib/SRC/zgebak.c
+++ b/lapack-netlib/SRC/zgebak.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgebal.c b/lapack-netlib/SRC/zgebal.c
index 289e9c9a58..36b7203ee0 100644
--- a/lapack-netlib/SRC/zgebal.c
+++ b/lapack-netlib/SRC/zgebal.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgebd2.c b/lapack-netlib/SRC/zgebd2.c
index 17282ba0bb..d8d9e27b9f 100644
--- a/lapack-netlib/SRC/zgebd2.c
+++ b/lapack-netlib/SRC/zgebd2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgebrd.c b/lapack-netlib/SRC/zgebrd.c
index cc2d94b650..bc0fb3a796 100644
--- a/lapack-netlib/SRC/zgebrd.c
+++ b/lapack-netlib/SRC/zgebrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgecon.c b/lapack-netlib/SRC/zgecon.c
index d83bcf93f4..1dbe908e0c 100644
--- a/lapack-netlib/SRC/zgecon.c
+++ b/lapack-netlib/SRC/zgecon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgedmd.c b/lapack-netlib/SRC/zgedmd.c
index c1b39ba3e2..0adad21d89 100644
--- a/lapack-netlib/SRC/zgedmd.c
+++ b/lapack-netlib/SRC/zgedmd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgedmdq.c b/lapack-netlib/SRC/zgedmdq.c
index 1815f08147..6ef687371d 100644
--- a/lapack-netlib/SRC/zgedmdq.c
+++ b/lapack-netlib/SRC/zgedmdq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeequ.c b/lapack-netlib/SRC/zgeequ.c
index b48f175c66..89c8e61f28 100644
--- a/lapack-netlib/SRC/zgeequ.c
+++ b/lapack-netlib/SRC/zgeequ.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeequb.c b/lapack-netlib/SRC/zgeequb.c
index 6b35c89941..f9ec3045a5 100644
--- a/lapack-netlib/SRC/zgeequb.c
+++ b/lapack-netlib/SRC/zgeequb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgees.c b/lapack-netlib/SRC/zgees.c
index 5044173297..fea0f25738 100644
--- a/lapack-netlib/SRC/zgees.c
+++ b/lapack-netlib/SRC/zgees.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeesx.c b/lapack-netlib/SRC/zgeesx.c
index a04f05d9fc..3749c53e58 100644
--- a/lapack-netlib/SRC/zgeesx.c
+++ b/lapack-netlib/SRC/zgeesx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeev.c b/lapack-netlib/SRC/zgeev.c
index 7034c7c5b9..e9bff9b10e 100644
--- a/lapack-netlib/SRC/zgeev.c
+++ b/lapack-netlib/SRC/zgeev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeevx.c b/lapack-netlib/SRC/zgeevx.c
index 874b56e1d6..221efe857d 100644
--- a/lapack-netlib/SRC/zgeevx.c
+++ b/lapack-netlib/SRC/zgeevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgehd2.c b/lapack-netlib/SRC/zgehd2.c
index 5ce4b504ff..125727e392 100644
--- a/lapack-netlib/SRC/zgehd2.c
+++ b/lapack-netlib/SRC/zgehd2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgehrd.c b/lapack-netlib/SRC/zgehrd.c
index bb1bdc0db7..ac39cec7dd 100644
--- a/lapack-netlib/SRC/zgehrd.c
+++ b/lapack-netlib/SRC/zgehrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgejsv.c b/lapack-netlib/SRC/zgejsv.c
index 7158ff8d71..13928d93a9 100644
--- a/lapack-netlib/SRC/zgejsv.c
+++ b/lapack-netlib/SRC/zgejsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgelq.c b/lapack-netlib/SRC/zgelq.c
index f876c6ed0d..960b926044 100644
--- a/lapack-netlib/SRC/zgelq.c
+++ b/lapack-netlib/SRC/zgelq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgelq2.c b/lapack-netlib/SRC/zgelq2.c
index b9dc8893bb..216f1eaa29 100644
--- a/lapack-netlib/SRC/zgelq2.c
+++ b/lapack-netlib/SRC/zgelq2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgelqf.c b/lapack-netlib/SRC/zgelqf.c
index 4373e46168..6c641aeb88 100644
--- a/lapack-netlib/SRC/zgelqf.c
+++ b/lapack-netlib/SRC/zgelqf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgelqt.c b/lapack-netlib/SRC/zgelqt.c
index e9bc1f8559..baa6c4e924 100644
--- a/lapack-netlib/SRC/zgelqt.c
+++ b/lapack-netlib/SRC/zgelqt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgelqt3.c b/lapack-netlib/SRC/zgelqt3.c
index 6732698c17..64e6435cd8 100644
--- a/lapack-netlib/SRC/zgelqt3.c
+++ b/lapack-netlib/SRC/zgelqt3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgels.c b/lapack-netlib/SRC/zgels.c
index fdc1da60ae..5f3ca5e4b9 100644
--- a/lapack-netlib/SRC/zgels.c
+++ b/lapack-netlib/SRC/zgels.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgelsd.c b/lapack-netlib/SRC/zgelsd.c
index f101cb3f0c..3a42ae9ce8 100644
--- a/lapack-netlib/SRC/zgelsd.c
+++ b/lapack-netlib/SRC/zgelsd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgelss.c b/lapack-netlib/SRC/zgelss.c
index 573963478a..fe98d07d49 100644
--- a/lapack-netlib/SRC/zgelss.c
+++ b/lapack-netlib/SRC/zgelss.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgelst.c b/lapack-netlib/SRC/zgelst.c
index 88e0dcc9cc..42282011cd 100644
--- a/lapack-netlib/SRC/zgelst.c
+++ b/lapack-netlib/SRC/zgelst.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgelsy.c b/lapack-netlib/SRC/zgelsy.c
index 673ea76c89..2e4d3955e6 100644
--- a/lapack-netlib/SRC/zgelsy.c
+++ b/lapack-netlib/SRC/zgelsy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgemlq.c b/lapack-netlib/SRC/zgemlq.c
index dc1616d7ab..42dcbdbdd8 100644
--- a/lapack-netlib/SRC/zgemlq.c
+++ b/lapack-netlib/SRC/zgemlq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgemlqt.c b/lapack-netlib/SRC/zgemlqt.c
index 2487a49b03..8d78d6f5d2 100644
--- a/lapack-netlib/SRC/zgemlqt.c
+++ b/lapack-netlib/SRC/zgemlqt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgemqr.c b/lapack-netlib/SRC/zgemqr.c
index 600c94145a..b975f318c4 100644
--- a/lapack-netlib/SRC/zgemqr.c
+++ b/lapack-netlib/SRC/zgemqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgemqrt.c b/lapack-netlib/SRC/zgemqrt.c
index 0ac74d4c5a..5edef06912 100644
--- a/lapack-netlib/SRC/zgemqrt.c
+++ b/lapack-netlib/SRC/zgemqrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeql2.c b/lapack-netlib/SRC/zgeql2.c
index b62412cfe2..81b3320771 100644
--- a/lapack-netlib/SRC/zgeql2.c
+++ b/lapack-netlib/SRC/zgeql2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeqlf.c b/lapack-netlib/SRC/zgeqlf.c
index b562fc9a26..2aabd5dec8 100644
--- a/lapack-netlib/SRC/zgeqlf.c
+++ b/lapack-netlib/SRC/zgeqlf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeqp3.c b/lapack-netlib/SRC/zgeqp3.c
index f2b957e7aa..c8601af2f1 100644
--- a/lapack-netlib/SRC/zgeqp3.c
+++ b/lapack-netlib/SRC/zgeqp3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeqp3rk.c b/lapack-netlib/SRC/zgeqp3rk.c
index 0c8b41c2de..14e5b0cdaf 100644
--- a/lapack-netlib/SRC/zgeqp3rk.c
+++ b/lapack-netlib/SRC/zgeqp3rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeqr.c b/lapack-netlib/SRC/zgeqr.c
index 93af2ac2bb..00fe402ebe 100644
--- a/lapack-netlib/SRC/zgeqr.c
+++ b/lapack-netlib/SRC/zgeqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeqr2.c b/lapack-netlib/SRC/zgeqr2.c
index cf368ad46c..d1cc85f2ca 100644
--- a/lapack-netlib/SRC/zgeqr2.c
+++ b/lapack-netlib/SRC/zgeqr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeqr2p.c b/lapack-netlib/SRC/zgeqr2p.c
index 4e409ec782..824725e21e 100644
--- a/lapack-netlib/SRC/zgeqr2p.c
+++ b/lapack-netlib/SRC/zgeqr2p.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeqrf.c b/lapack-netlib/SRC/zgeqrf.c
index 9f2facb994..f37a28b7c2 100644
--- a/lapack-netlib/SRC/zgeqrf.c
+++ b/lapack-netlib/SRC/zgeqrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeqrfp.c b/lapack-netlib/SRC/zgeqrfp.c
index 5432a10a3b..4658d5f3d3 100644
--- a/lapack-netlib/SRC/zgeqrfp.c
+++ b/lapack-netlib/SRC/zgeqrfp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeqrt.c b/lapack-netlib/SRC/zgeqrt.c
index c3919be55c..717d484d6d 100644
--- a/lapack-netlib/SRC/zgeqrt.c
+++ b/lapack-netlib/SRC/zgeqrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeqrt2.c b/lapack-netlib/SRC/zgeqrt2.c
index 847db1b822..0fdb08e491 100644
--- a/lapack-netlib/SRC/zgeqrt2.c
+++ b/lapack-netlib/SRC/zgeqrt2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgeqrt3.c b/lapack-netlib/SRC/zgeqrt3.c
index 020558deb9..589680b6d9 100644
--- a/lapack-netlib/SRC/zgeqrt3.c
+++ b/lapack-netlib/SRC/zgeqrt3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgerfs.c b/lapack-netlib/SRC/zgerfs.c
index a53dd4f8f7..733175f66f 100644
--- a/lapack-netlib/SRC/zgerfs.c
+++ b/lapack-netlib/SRC/zgerfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgerfsx.c b/lapack-netlib/SRC/zgerfsx.c
index aa3ac4f728..61885f2fe1 100644
--- a/lapack-netlib/SRC/zgerfsx.c
+++ b/lapack-netlib/SRC/zgerfsx.c
@@ -54,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -257,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgerq2.c b/lapack-netlib/SRC/zgerq2.c
index ccafd6293a..13d5445c5f 100644
--- a/lapack-netlib/SRC/zgerq2.c
+++ b/lapack-netlib/SRC/zgerq2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgerqf.c b/lapack-netlib/SRC/zgerqf.c
index 840416f507..b3e777dd33 100644
--- a/lapack-netlib/SRC/zgerqf.c
+++ b/lapack-netlib/SRC/zgerqf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgesc2.c b/lapack-netlib/SRC/zgesc2.c
index ae7884dd77..26b602a714 100644
--- a/lapack-netlib/SRC/zgesc2.c
+++ b/lapack-netlib/SRC/zgesc2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgesdd.c b/lapack-netlib/SRC/zgesdd.c
index 898d5c87ac..22b59c426e 100644
--- a/lapack-netlib/SRC/zgesdd.c
+++ b/lapack-netlib/SRC/zgesdd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgesv.c b/lapack-netlib/SRC/zgesv.c
index 53813cd015..210c8b272b 100644
--- a/lapack-netlib/SRC/zgesv.c
+++ b/lapack-netlib/SRC/zgesv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgesvd.c b/lapack-netlib/SRC/zgesvd.c
index 0d16703571..ed54892af5 100644
--- a/lapack-netlib/SRC/zgesvd.c
+++ b/lapack-netlib/SRC/zgesvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgesvdq.c b/lapack-netlib/SRC/zgesvdq.c
index ea91ef2697..a1a6723c6b 100644
--- a/lapack-netlib/SRC/zgesvdq.c
+++ b/lapack-netlib/SRC/zgesvdq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgesvdx.c b/lapack-netlib/SRC/zgesvdx.c
index dfd525a95f..ba915f0dd7 100644
--- a/lapack-netlib/SRC/zgesvdx.c
+++ b/lapack-netlib/SRC/zgesvdx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgesvj.c b/lapack-netlib/SRC/zgesvj.c
index b94112af01..d4985f642c 100644
--- a/lapack-netlib/SRC/zgesvj.c
+++ b/lapack-netlib/SRC/zgesvj.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgesvx.c b/lapack-netlib/SRC/zgesvx.c
index 7a8538c351..57c1289fb4 100644
--- a/lapack-netlib/SRC/zgesvx.c
+++ b/lapack-netlib/SRC/zgesvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgesvx.f b/lapack-netlib/SRC/zgesvx.f
index 87f36bba6b..3b193a1b2a 100644
--- a/lapack-netlib/SRC/zgesvx.f
+++ b/lapack-netlib/SRC/zgesvx.f
@@ -302,7 +302,7 @@
*>
*> \param[out] RWORK
*> \verbatim
-*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,2*N))
*> On exit, RWORK(1) contains the reciprocal pivot growth
*> factor norm(A)/norm(U). The "max absolute element" norm is
*> used. If RWORK(1) is much less than 1, then the stability
diff --git a/lapack-netlib/SRC/zgesvxx.c b/lapack-netlib/SRC/zgesvxx.c
index ed19f0d395..054a3c8cba 100644
--- a/lapack-netlib/SRC/zgesvxx.c
+++ b/lapack-netlib/SRC/zgesvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgetc2.c b/lapack-netlib/SRC/zgetc2.c
index 80ff7ab604..73eba5290b 100644
--- a/lapack-netlib/SRC/zgetc2.c
+++ b/lapack-netlib/SRC/zgetc2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgetf2.c b/lapack-netlib/SRC/zgetf2.c
index fdc8954288..1a7d7b9403 100644
--- a/lapack-netlib/SRC/zgetf2.c
+++ b/lapack-netlib/SRC/zgetf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgetrf.c b/lapack-netlib/SRC/zgetrf.c
index d4f52efd3b..287b513327 100644
--- a/lapack-netlib/SRC/zgetrf.c
+++ b/lapack-netlib/SRC/zgetrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgetrf2.c b/lapack-netlib/SRC/zgetrf2.c
index 679b10374e..849d907416 100644
--- a/lapack-netlib/SRC/zgetrf2.c
+++ b/lapack-netlib/SRC/zgetrf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgetri.c b/lapack-netlib/SRC/zgetri.c
index e7a46e719a..72fa88fdb6 100644
--- a/lapack-netlib/SRC/zgetri.c
+++ b/lapack-netlib/SRC/zgetri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgetrs.c b/lapack-netlib/SRC/zgetrs.c
index d9e10c3460..c6de811e88 100644
--- a/lapack-netlib/SRC/zgetrs.c
+++ b/lapack-netlib/SRC/zgetrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgetsls.c b/lapack-netlib/SRC/zgetsls.c
index a63df472f1..c9f1d5d971 100644
--- a/lapack-netlib/SRC/zgetsls.c
+++ b/lapack-netlib/SRC/zgetsls.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgetsqrhrt.c b/lapack-netlib/SRC/zgetsqrhrt.c
index 6b426465fb..28d85782de 100644
--- a/lapack-netlib/SRC/zgetsqrhrt.c
+++ b/lapack-netlib/SRC/zgetsqrhrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zggbak.c b/lapack-netlib/SRC/zggbak.c
index 735ae22f99..418da428b2 100644
--- a/lapack-netlib/SRC/zggbak.c
+++ b/lapack-netlib/SRC/zggbak.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zggbal.c b/lapack-netlib/SRC/zggbal.c
index 673ad9d14a..4bde5573ef 100644
--- a/lapack-netlib/SRC/zggbal.c
+++ b/lapack-netlib/SRC/zggbal.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgges.c b/lapack-netlib/SRC/zgges.c
index e8858d7e12..aab716add6 100644
--- a/lapack-netlib/SRC/zgges.c
+++ b/lapack-netlib/SRC/zgges.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgges3.c b/lapack-netlib/SRC/zgges3.c
index ac9ce770fa..98149dabeb 100644
--- a/lapack-netlib/SRC/zgges3.c
+++ b/lapack-netlib/SRC/zgges3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zggesx.c b/lapack-netlib/SRC/zggesx.c
index ea98b0e1ab..fa4c5bd8db 100644
--- a/lapack-netlib/SRC/zggesx.c
+++ b/lapack-netlib/SRC/zggesx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zggev.c b/lapack-netlib/SRC/zggev.c
index a93883a730..daf22a1ac1 100644
--- a/lapack-netlib/SRC/zggev.c
+++ b/lapack-netlib/SRC/zggev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zggev3.c b/lapack-netlib/SRC/zggev3.c
index 084d205176..ab15944cda 100644
--- a/lapack-netlib/SRC/zggev3.c
+++ b/lapack-netlib/SRC/zggev3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zggevx.c b/lapack-netlib/SRC/zggevx.c
index b04cf7fd6b..9c2e7b05f3 100644
--- a/lapack-netlib/SRC/zggevx.c
+++ b/lapack-netlib/SRC/zggevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zggglm.c b/lapack-netlib/SRC/zggglm.c
index cc2dcd8fd3..e4ed67fb04 100644
--- a/lapack-netlib/SRC/zggglm.c
+++ b/lapack-netlib/SRC/zggglm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgghd3.c b/lapack-netlib/SRC/zgghd3.c
index ff20280f30..5f14a19aee 100644
--- a/lapack-netlib/SRC/zgghd3.c
+++ b/lapack-netlib/SRC/zgghd3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgghrd.c b/lapack-netlib/SRC/zgghrd.c
index 62ba9a31f5..9e351075e3 100644
--- a/lapack-netlib/SRC/zgghrd.c
+++ b/lapack-netlib/SRC/zgghrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgglse.c b/lapack-netlib/SRC/zgglse.c
index 47b30742c5..06a3c266b1 100644
--- a/lapack-netlib/SRC/zgglse.c
+++ b/lapack-netlib/SRC/zgglse.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zggqrf.c b/lapack-netlib/SRC/zggqrf.c
index afe06bcfca..5d8d7f6251 100644
--- a/lapack-netlib/SRC/zggqrf.c
+++ b/lapack-netlib/SRC/zggqrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zggrqf.c b/lapack-netlib/SRC/zggrqf.c
index 789c1c856f..c9138ee3b7 100644
--- a/lapack-netlib/SRC/zggrqf.c
+++ b/lapack-netlib/SRC/zggrqf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zggsvd3.c b/lapack-netlib/SRC/zggsvd3.c
index a8bc8de191..0df6740bc8 100644
--- a/lapack-netlib/SRC/zggsvd3.c
+++ b/lapack-netlib/SRC/zggsvd3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zggsvp3.c b/lapack-netlib/SRC/zggsvp3.c
index e78bbe74ea..fa31f17286 100644
--- a/lapack-netlib/SRC/zggsvp3.c
+++ b/lapack-netlib/SRC/zggsvp3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgsvj0.c b/lapack-netlib/SRC/zgsvj0.c
index c300fcd93d..948f1b5018 100644
--- a/lapack-netlib/SRC/zgsvj0.c
+++ b/lapack-netlib/SRC/zgsvj0.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgsvj1.c b/lapack-netlib/SRC/zgsvj1.c
index fa1fc77c1d..17f61ec2b1 100644
--- a/lapack-netlib/SRC/zgsvj1.c
+++ b/lapack-netlib/SRC/zgsvj1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgtcon.c b/lapack-netlib/SRC/zgtcon.c
index bc5732d5ec..d353734890 100644
--- a/lapack-netlib/SRC/zgtcon.c
+++ b/lapack-netlib/SRC/zgtcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgtrfs.c b/lapack-netlib/SRC/zgtrfs.c
index a0d1374e65..642d109e81 100644
--- a/lapack-netlib/SRC/zgtrfs.c
+++ b/lapack-netlib/SRC/zgtrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgtsv.c b/lapack-netlib/SRC/zgtsv.c
index 8a4da397a9..5acb3be283 100644
--- a/lapack-netlib/SRC/zgtsv.c
+++ b/lapack-netlib/SRC/zgtsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgtsvx.c b/lapack-netlib/SRC/zgtsvx.c
index 0d8dec2a19..9a7a8c1874 100644
--- a/lapack-netlib/SRC/zgtsvx.c
+++ b/lapack-netlib/SRC/zgtsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgttrf.c b/lapack-netlib/SRC/zgttrf.c
index 4dd8d5e98d..ec9bc2f34a 100644
--- a/lapack-netlib/SRC/zgttrf.c
+++ b/lapack-netlib/SRC/zgttrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgttrs.c b/lapack-netlib/SRC/zgttrs.c
index 99ae1cb14c..6e6f3c5acf 100644
--- a/lapack-netlib/SRC/zgttrs.c
+++ b/lapack-netlib/SRC/zgttrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zgtts2.c b/lapack-netlib/SRC/zgtts2.c
index 235432563b..e84a9507bb 100644
--- a/lapack-netlib/SRC/zgtts2.c
+++ b/lapack-netlib/SRC/zgtts2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhb2st_kernels.c b/lapack-netlib/SRC/zhb2st_kernels.c
index a7734ef644..c06b5b275f 100644
--- a/lapack-netlib/SRC/zhb2st_kernels.c
+++ b/lapack-netlib/SRC/zhb2st_kernels.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhbev.c b/lapack-netlib/SRC/zhbev.c
index 7d5b2ecf1c..c46de93d51 100644
--- a/lapack-netlib/SRC/zhbev.c
+++ b/lapack-netlib/SRC/zhbev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhbev_2stage.c b/lapack-netlib/SRC/zhbev_2stage.c
index 986b0382e4..6337d52a46 100644
--- a/lapack-netlib/SRC/zhbev_2stage.c
+++ b/lapack-netlib/SRC/zhbev_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhbevd.c b/lapack-netlib/SRC/zhbevd.c
index 00fd613f7a..382d4ab6bc 100644
--- a/lapack-netlib/SRC/zhbevd.c
+++ b/lapack-netlib/SRC/zhbevd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhbevd_2stage.c b/lapack-netlib/SRC/zhbevd_2stage.c
index 5a866844be..35763067a7 100644
--- a/lapack-netlib/SRC/zhbevd_2stage.c
+++ b/lapack-netlib/SRC/zhbevd_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhbevx.c b/lapack-netlib/SRC/zhbevx.c
index 6203b310dc..b2f9c1130d 100644
--- a/lapack-netlib/SRC/zhbevx.c
+++ b/lapack-netlib/SRC/zhbevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhbevx_2stage.c b/lapack-netlib/SRC/zhbevx_2stage.c
index 64e97ebd3a..64bcfc2796 100644
--- a/lapack-netlib/SRC/zhbevx_2stage.c
+++ b/lapack-netlib/SRC/zhbevx_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhbgst.c b/lapack-netlib/SRC/zhbgst.c
index e37dd82b40..e08a67b66a 100644
--- a/lapack-netlib/SRC/zhbgst.c
+++ b/lapack-netlib/SRC/zhbgst.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhbgv.c b/lapack-netlib/SRC/zhbgv.c
index 459f11cab6..1c50e2cf20 100644
--- a/lapack-netlib/SRC/zhbgv.c
+++ b/lapack-netlib/SRC/zhbgv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhbgvd.c b/lapack-netlib/SRC/zhbgvd.c
index e7dd111f5e..c4b92605ad 100644
--- a/lapack-netlib/SRC/zhbgvd.c
+++ b/lapack-netlib/SRC/zhbgvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhbgvx.c b/lapack-netlib/SRC/zhbgvx.c
index 75d981600b..c6954c077e 100644
--- a/lapack-netlib/SRC/zhbgvx.c
+++ b/lapack-netlib/SRC/zhbgvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhbtrd.c b/lapack-netlib/SRC/zhbtrd.c
index 641320b872..abf676fc9f 100644
--- a/lapack-netlib/SRC/zhbtrd.c
+++ b/lapack-netlib/SRC/zhbtrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhecon.c b/lapack-netlib/SRC/zhecon.c
index e1ec4b856f..b7f3774c24 100644
--- a/lapack-netlib/SRC/zhecon.c
+++ b/lapack-netlib/SRC/zhecon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhecon_3.c b/lapack-netlib/SRC/zhecon_3.c
index 97713d102e..71e9f667c6 100644
--- a/lapack-netlib/SRC/zhecon_3.c
+++ b/lapack-netlib/SRC/zhecon_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhecon_rook.c b/lapack-netlib/SRC/zhecon_rook.c
index 82665a210b..d59da6cc24 100644
--- a/lapack-netlib/SRC/zhecon_rook.c
+++ b/lapack-netlib/SRC/zhecon_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zheequb.c b/lapack-netlib/SRC/zheequb.c
index 918272b8bd..32b620423c 100644
--- a/lapack-netlib/SRC/zheequb.c
+++ b/lapack-netlib/SRC/zheequb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zheev.c b/lapack-netlib/SRC/zheev.c
index fed8677b70..0ec48f8f31 100644
--- a/lapack-netlib/SRC/zheev.c
+++ b/lapack-netlib/SRC/zheev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zheev_2stage.c b/lapack-netlib/SRC/zheev_2stage.c
index 6fd0b2b587..6f5e3e8939 100644
--- a/lapack-netlib/SRC/zheev_2stage.c
+++ b/lapack-netlib/SRC/zheev_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zheevd.c b/lapack-netlib/SRC/zheevd.c
index f4e9ef33cf..df446b8c29 100644
--- a/lapack-netlib/SRC/zheevd.c
+++ b/lapack-netlib/SRC/zheevd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zheevd_2stage.c b/lapack-netlib/SRC/zheevd_2stage.c
index a3abcfacad..971ce08be3 100644
--- a/lapack-netlib/SRC/zheevd_2stage.c
+++ b/lapack-netlib/SRC/zheevd_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zheevr.c b/lapack-netlib/SRC/zheevr.c
index 16f10593ec..159a9bceb0 100644
--- a/lapack-netlib/SRC/zheevr.c
+++ b/lapack-netlib/SRC/zheevr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zheevr_2stage.c b/lapack-netlib/SRC/zheevr_2stage.c
index 8f524c77bb..9d43883a12 100644
--- a/lapack-netlib/SRC/zheevr_2stage.c
+++ b/lapack-netlib/SRC/zheevr_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zheevx.c b/lapack-netlib/SRC/zheevx.c
index c8e4d0b9a0..7250e96965 100644
--- a/lapack-netlib/SRC/zheevx.c
+++ b/lapack-netlib/SRC/zheevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zheevx_2stage.c b/lapack-netlib/SRC/zheevx_2stage.c
index cc2503067d..833ddef832 100644
--- a/lapack-netlib/SRC/zheevx_2stage.c
+++ b/lapack-netlib/SRC/zheevx_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhegs2.c b/lapack-netlib/SRC/zhegs2.c
index ea7aaf9238..321c357d28 100644
--- a/lapack-netlib/SRC/zhegs2.c
+++ b/lapack-netlib/SRC/zhegs2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhegst.c b/lapack-netlib/SRC/zhegst.c
index d7517e27a0..4bf50954fe 100644
--- a/lapack-netlib/SRC/zhegst.c
+++ b/lapack-netlib/SRC/zhegst.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhegv.c b/lapack-netlib/SRC/zhegv.c
index 77d2ddea4e..20005702fe 100644
--- a/lapack-netlib/SRC/zhegv.c
+++ b/lapack-netlib/SRC/zhegv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhegv_2stage.c b/lapack-netlib/SRC/zhegv_2stage.c
index 9ae891db19..773f51f76b 100644
--- a/lapack-netlib/SRC/zhegv_2stage.c
+++ b/lapack-netlib/SRC/zhegv_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhegvd.c b/lapack-netlib/SRC/zhegvd.c
index 6ce5b95523..a05d5e3f1c 100644
--- a/lapack-netlib/SRC/zhegvd.c
+++ b/lapack-netlib/SRC/zhegvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhegvx.c b/lapack-netlib/SRC/zhegvx.c
index 77e5ddd74d..117e8dab9b 100644
--- a/lapack-netlib/SRC/zhegvx.c
+++ b/lapack-netlib/SRC/zhegvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zherfs.c b/lapack-netlib/SRC/zherfs.c
index 47496c5198..0803da780e 100644
--- a/lapack-netlib/SRC/zherfs.c
+++ b/lapack-netlib/SRC/zherfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zherfsx.c b/lapack-netlib/SRC/zherfsx.c
index aa3ac4f728..61885f2fe1 100644
--- a/lapack-netlib/SRC/zherfsx.c
+++ b/lapack-netlib/SRC/zherfsx.c
@@ -54,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -257,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhesv.c b/lapack-netlib/SRC/zhesv.c
index 64c94960f7..337fba5f8d 100644
--- a/lapack-netlib/SRC/zhesv.c
+++ b/lapack-netlib/SRC/zhesv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhesv_aa.c b/lapack-netlib/SRC/zhesv_aa.c
index 5878e34707..2d10e0d187 100644
--- a/lapack-netlib/SRC/zhesv_aa.c
+++ b/lapack-netlib/SRC/zhesv_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhesv_aa_2stage.c b/lapack-netlib/SRC/zhesv_aa_2stage.c
index e2665440d9..8bd981d8fd 100644
--- a/lapack-netlib/SRC/zhesv_aa_2stage.c
+++ b/lapack-netlib/SRC/zhesv_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhesv_rk.c b/lapack-netlib/SRC/zhesv_rk.c
index 36079d8cfd..d8db497429 100644
--- a/lapack-netlib/SRC/zhesv_rk.c
+++ b/lapack-netlib/SRC/zhesv_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhesv_rook.c b/lapack-netlib/SRC/zhesv_rook.c
index 4c166c1233..1bfee51211 100644
--- a/lapack-netlib/SRC/zhesv_rook.c
+++ b/lapack-netlib/SRC/zhesv_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhesvx.c b/lapack-netlib/SRC/zhesvx.c
index a71a0745c3..f0b53843af 100644
--- a/lapack-netlib/SRC/zhesvx.c
+++ b/lapack-netlib/SRC/zhesvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhesvxx.c b/lapack-netlib/SRC/zhesvxx.c
index 54b52afc2c..efdc9f3e81 100644
--- a/lapack-netlib/SRC/zhesvxx.c
+++ b/lapack-netlib/SRC/zhesvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zheswapr.c b/lapack-netlib/SRC/zheswapr.c
index 999b3f43bc..3683bfd2e2 100644
--- a/lapack-netlib/SRC/zheswapr.c
+++ b/lapack-netlib/SRC/zheswapr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetd2.c b/lapack-netlib/SRC/zhetd2.c
index af8d2532e9..f7bb4748b3 100644
--- a/lapack-netlib/SRC/zhetd2.c
+++ b/lapack-netlib/SRC/zhetd2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetf2.c b/lapack-netlib/SRC/zhetf2.c
index 0ded5c3a7d..4d2bd2bee4 100644
--- a/lapack-netlib/SRC/zhetf2.c
+++ b/lapack-netlib/SRC/zhetf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetf2_rk.c b/lapack-netlib/SRC/zhetf2_rk.c
index 95131cfca7..b4edb3dba9 100644
--- a/lapack-netlib/SRC/zhetf2_rk.c
+++ b/lapack-netlib/SRC/zhetf2_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetf2_rook.c b/lapack-netlib/SRC/zhetf2_rook.c
index 40ebc9661c..ffebafa42c 100644
--- a/lapack-netlib/SRC/zhetf2_rook.c
+++ b/lapack-netlib/SRC/zhetf2_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrd.c b/lapack-netlib/SRC/zhetrd.c
index a08e38a9cf..180d0d6170 100644
--- a/lapack-netlib/SRC/zhetrd.c
+++ b/lapack-netlib/SRC/zhetrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrd_2stage.c b/lapack-netlib/SRC/zhetrd_2stage.c
index 1d52bdaea1..b4aabba898 100644
--- a/lapack-netlib/SRC/zhetrd_2stage.c
+++ b/lapack-netlib/SRC/zhetrd_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrd_hb2st.c b/lapack-netlib/SRC/zhetrd_hb2st.c
index cac1d995ef..50d296d674 100644
--- a/lapack-netlib/SRC/zhetrd_hb2st.c
+++ b/lapack-netlib/SRC/zhetrd_hb2st.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrd_he2hb.c b/lapack-netlib/SRC/zhetrd_he2hb.c
index 669ca5c59a..f87c24b1f2 100644
--- a/lapack-netlib/SRC/zhetrd_he2hb.c
+++ b/lapack-netlib/SRC/zhetrd_he2hb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrf.c b/lapack-netlib/SRC/zhetrf.c
index a52c02a65a..928fa793fb 100644
--- a/lapack-netlib/SRC/zhetrf.c
+++ b/lapack-netlib/SRC/zhetrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrf_aa.c b/lapack-netlib/SRC/zhetrf_aa.c
index b3c663bb5b..40b290e5fc 100644
--- a/lapack-netlib/SRC/zhetrf_aa.c
+++ b/lapack-netlib/SRC/zhetrf_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrf_aa_2stage.c b/lapack-netlib/SRC/zhetrf_aa_2stage.c
index a21c6c472b..ae6f10fc64 100644
--- a/lapack-netlib/SRC/zhetrf_aa_2stage.c
+++ b/lapack-netlib/SRC/zhetrf_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrf_rk.c b/lapack-netlib/SRC/zhetrf_rk.c
index b924045792..8b340dfdbe 100644
--- a/lapack-netlib/SRC/zhetrf_rk.c
+++ b/lapack-netlib/SRC/zhetrf_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrf_rook.c b/lapack-netlib/SRC/zhetrf_rook.c
index f4a2b2def6..c502352e4d 100644
--- a/lapack-netlib/SRC/zhetrf_rook.c
+++ b/lapack-netlib/SRC/zhetrf_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetri.c b/lapack-netlib/SRC/zhetri.c
index 9b7511b550..6aff3a5a46 100644
--- a/lapack-netlib/SRC/zhetri.c
+++ b/lapack-netlib/SRC/zhetri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetri2.c b/lapack-netlib/SRC/zhetri2.c
index 9dc0f8b540..b3a5394c6a 100644
--- a/lapack-netlib/SRC/zhetri2.c
+++ b/lapack-netlib/SRC/zhetri2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetri2x.c b/lapack-netlib/SRC/zhetri2x.c
index fa41c2a5d2..4dcf207e48 100644
--- a/lapack-netlib/SRC/zhetri2x.c
+++ b/lapack-netlib/SRC/zhetri2x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetri_3.c b/lapack-netlib/SRC/zhetri_3.c
index 47d2c63311..df658fb022 100644
--- a/lapack-netlib/SRC/zhetri_3.c
+++ b/lapack-netlib/SRC/zhetri_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetri_3x.c b/lapack-netlib/SRC/zhetri_3x.c
index 114ae02d5e..a971f09d46 100644
--- a/lapack-netlib/SRC/zhetri_3x.c
+++ b/lapack-netlib/SRC/zhetri_3x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetri_rook.c b/lapack-netlib/SRC/zhetri_rook.c
index 1897f04b31..efc2b44016 100644
--- a/lapack-netlib/SRC/zhetri_rook.c
+++ b/lapack-netlib/SRC/zhetri_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrs.c b/lapack-netlib/SRC/zhetrs.c
index a732bb7f95..c6101c7016 100644
--- a/lapack-netlib/SRC/zhetrs.c
+++ b/lapack-netlib/SRC/zhetrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrs2.c b/lapack-netlib/SRC/zhetrs2.c
index fe49e271c3..bc2c75e4a3 100644
--- a/lapack-netlib/SRC/zhetrs2.c
+++ b/lapack-netlib/SRC/zhetrs2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrs_3.c b/lapack-netlib/SRC/zhetrs_3.c
index d8160301e0..d0b728f741 100644
--- a/lapack-netlib/SRC/zhetrs_3.c
+++ b/lapack-netlib/SRC/zhetrs_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrs_aa.c b/lapack-netlib/SRC/zhetrs_aa.c
index bdebbd6b3e..d2c4da0ed7 100644
--- a/lapack-netlib/SRC/zhetrs_aa.c
+++ b/lapack-netlib/SRC/zhetrs_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrs_aa_2stage.c b/lapack-netlib/SRC/zhetrs_aa_2stage.c
index efcebead3e..8cf70349c3 100644
--- a/lapack-netlib/SRC/zhetrs_aa_2stage.c
+++ b/lapack-netlib/SRC/zhetrs_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhetrs_rook.c b/lapack-netlib/SRC/zhetrs_rook.c
index f6f814ea9c..8a23b694c7 100644
--- a/lapack-netlib/SRC/zhetrs_rook.c
+++ b/lapack-netlib/SRC/zhetrs_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhfrk.c b/lapack-netlib/SRC/zhfrk.c
index efc567c3ae..89da0aef78 100644
--- a/lapack-netlib/SRC/zhfrk.c
+++ b/lapack-netlib/SRC/zhfrk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhgeqz.c b/lapack-netlib/SRC/zhgeqz.c
index a34d504262..fc1a5d00c2 100644
--- a/lapack-netlib/SRC/zhgeqz.c
+++ b/lapack-netlib/SRC/zhgeqz.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhpcon.c b/lapack-netlib/SRC/zhpcon.c
index aef8edf974..b50e662663 100644
--- a/lapack-netlib/SRC/zhpcon.c
+++ b/lapack-netlib/SRC/zhpcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhpev.c b/lapack-netlib/SRC/zhpev.c
index b3f42a19fc..b92c88f110 100644
--- a/lapack-netlib/SRC/zhpev.c
+++ b/lapack-netlib/SRC/zhpev.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhpevd.c b/lapack-netlib/SRC/zhpevd.c
index 651d252670..c6a0c9f5d4 100644
--- a/lapack-netlib/SRC/zhpevd.c
+++ b/lapack-netlib/SRC/zhpevd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhpevx.c b/lapack-netlib/SRC/zhpevx.c
index 289d788909..8efd03bed6 100644
--- a/lapack-netlib/SRC/zhpevx.c
+++ b/lapack-netlib/SRC/zhpevx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhpgst.c b/lapack-netlib/SRC/zhpgst.c
index 55bd84a5e8..845e3c6b45 100644
--- a/lapack-netlib/SRC/zhpgst.c
+++ b/lapack-netlib/SRC/zhpgst.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhpgv.c b/lapack-netlib/SRC/zhpgv.c
index 915cdc5263..8b45e067be 100644
--- a/lapack-netlib/SRC/zhpgv.c
+++ b/lapack-netlib/SRC/zhpgv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhpgvd.c b/lapack-netlib/SRC/zhpgvd.c
index 41edf776e5..e7ecb5bd9d 100644
--- a/lapack-netlib/SRC/zhpgvd.c
+++ b/lapack-netlib/SRC/zhpgvd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhpgvx.c b/lapack-netlib/SRC/zhpgvx.c
index a5bc14dfb1..dc8a9dde73 100644
--- a/lapack-netlib/SRC/zhpgvx.c
+++ b/lapack-netlib/SRC/zhpgvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhprfs.c b/lapack-netlib/SRC/zhprfs.c
index e4dcbafc3b..39cb9b30c0 100644
--- a/lapack-netlib/SRC/zhprfs.c
+++ b/lapack-netlib/SRC/zhprfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhpsv.c b/lapack-netlib/SRC/zhpsv.c
index dd075d9d72..b4cd74808e 100644
--- a/lapack-netlib/SRC/zhpsv.c
+++ b/lapack-netlib/SRC/zhpsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhpsvx.c b/lapack-netlib/SRC/zhpsvx.c
index 93af38a19c..118556646e 100644
--- a/lapack-netlib/SRC/zhpsvx.c
+++ b/lapack-netlib/SRC/zhpsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhptrd.c b/lapack-netlib/SRC/zhptrd.c
index e14d305a13..fd128f0672 100644
--- a/lapack-netlib/SRC/zhptrd.c
+++ b/lapack-netlib/SRC/zhptrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhptrf.c b/lapack-netlib/SRC/zhptrf.c
index 31bfd9bc02..ffec15a3b9 100644
--- a/lapack-netlib/SRC/zhptrf.c
+++ b/lapack-netlib/SRC/zhptrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhptri.c b/lapack-netlib/SRC/zhptri.c
index 67266cb9b8..447d80bf1d 100644
--- a/lapack-netlib/SRC/zhptri.c
+++ b/lapack-netlib/SRC/zhptri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhptrs.c b/lapack-netlib/SRC/zhptrs.c
index e000b267c5..f15bf615dc 100644
--- a/lapack-netlib/SRC/zhptrs.c
+++ b/lapack-netlib/SRC/zhptrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhsein.c b/lapack-netlib/SRC/zhsein.c
index a7bc3e15f1..06f0ecd9d6 100644
--- a/lapack-netlib/SRC/zhsein.c
+++ b/lapack-netlib/SRC/zhsein.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zhseqr.c b/lapack-netlib/SRC/zhseqr.c
index bdf100a32a..d7913ca7aa 100644
--- a/lapack-netlib/SRC/zhseqr.c
+++ b/lapack-netlib/SRC/zhseqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_gbamv.c b/lapack-netlib/SRC/zla_gbamv.c
index 6bab7632d3..d12a36bc53 100644
--- a/lapack-netlib/SRC/zla_gbamv.c
+++ b/lapack-netlib/SRC/zla_gbamv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_gbrcond_c.c b/lapack-netlib/SRC/zla_gbrcond_c.c
index 5996953417..d3a31dcd57 100644
--- a/lapack-netlib/SRC/zla_gbrcond_c.c
+++ b/lapack-netlib/SRC/zla_gbrcond_c.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_gbrcond_x.c b/lapack-netlib/SRC/zla_gbrcond_x.c
index b1ffadc645..1514a82b24 100644
--- a/lapack-netlib/SRC/zla_gbrcond_x.c
+++ b/lapack-netlib/SRC/zla_gbrcond_x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_gbrfsx_extended.c b/lapack-netlib/SRC/zla_gbrfsx_extended.c
index a662d43442..f8d5e47868 100644
--- a/lapack-netlib/SRC/zla_gbrfsx_extended.c
+++ b/lapack-netlib/SRC/zla_gbrfsx_extended.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_gbrpvgrw.c b/lapack-netlib/SRC/zla_gbrpvgrw.c
index 5208601693..370d37e8a9 100644
--- a/lapack-netlib/SRC/zla_gbrpvgrw.c
+++ b/lapack-netlib/SRC/zla_gbrpvgrw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_geamv.c b/lapack-netlib/SRC/zla_geamv.c
index 5ad3c22075..8fa2f39928 100644
--- a/lapack-netlib/SRC/zla_geamv.c
+++ b/lapack-netlib/SRC/zla_geamv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_gercond_c.c b/lapack-netlib/SRC/zla_gercond_c.c
index b1a63cd923..95718808f1 100644
--- a/lapack-netlib/SRC/zla_gercond_c.c
+++ b/lapack-netlib/SRC/zla_gercond_c.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_gercond_x.c b/lapack-netlib/SRC/zla_gercond_x.c
index 2b862092ff..1a01f6b5f2 100644
--- a/lapack-netlib/SRC/zla_gercond_x.c
+++ b/lapack-netlib/SRC/zla_gercond_x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_gerfsx_extended.c b/lapack-netlib/SRC/zla_gerfsx_extended.c
index 34703a163e..5e7b2d584e 100644
--- a/lapack-netlib/SRC/zla_gerfsx_extended.c
+++ b/lapack-netlib/SRC/zla_gerfsx_extended.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_gerpvgrw.c b/lapack-netlib/SRC/zla_gerpvgrw.c
index 5feae54aa9..b8bc9700c7 100644
--- a/lapack-netlib/SRC/zla_gerpvgrw.c
+++ b/lapack-netlib/SRC/zla_gerpvgrw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_heamv.c b/lapack-netlib/SRC/zla_heamv.c
index d76bb993cb..23f1c4b54b 100644
--- a/lapack-netlib/SRC/zla_heamv.c
+++ b/lapack-netlib/SRC/zla_heamv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_hercond_c.c b/lapack-netlib/SRC/zla_hercond_c.c
index bb5e2fe4d5..251446aee7 100644
--- a/lapack-netlib/SRC/zla_hercond_c.c
+++ b/lapack-netlib/SRC/zla_hercond_c.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_hercond_x.c b/lapack-netlib/SRC/zla_hercond_x.c
index 879164bd3e..1e4e692a90 100644
--- a/lapack-netlib/SRC/zla_hercond_x.c
+++ b/lapack-netlib/SRC/zla_hercond_x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_herfsx_extended.c b/lapack-netlib/SRC/zla_herfsx_extended.c
index 2b4145e8ea..e26f6a27fb 100644
--- a/lapack-netlib/SRC/zla_herfsx_extended.c
+++ b/lapack-netlib/SRC/zla_herfsx_extended.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_herpvgrw.c b/lapack-netlib/SRC/zla_herpvgrw.c
index 85715d493d..f409b090ab 100644
--- a/lapack-netlib/SRC/zla_herpvgrw.c
+++ b/lapack-netlib/SRC/zla_herpvgrw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_lin_berr.c b/lapack-netlib/SRC/zla_lin_berr.c
index 3a64125e86..820de3ac5a 100644
--- a/lapack-netlib/SRC/zla_lin_berr.c
+++ b/lapack-netlib/SRC/zla_lin_berr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_porcond_c.c b/lapack-netlib/SRC/zla_porcond_c.c
index d5c914b400..e994108546 100644
--- a/lapack-netlib/SRC/zla_porcond_c.c
+++ b/lapack-netlib/SRC/zla_porcond_c.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_porcond_x.c b/lapack-netlib/SRC/zla_porcond_x.c
index 50fe978060..f9c4f02df4 100644
--- a/lapack-netlib/SRC/zla_porcond_x.c
+++ b/lapack-netlib/SRC/zla_porcond_x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_porfsx_extended.c b/lapack-netlib/SRC/zla_porfsx_extended.c
index 47982e6581..17e2a91c3e 100644
--- a/lapack-netlib/SRC/zla_porfsx_extended.c
+++ b/lapack-netlib/SRC/zla_porfsx_extended.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_porpvgrw.c b/lapack-netlib/SRC/zla_porpvgrw.c
index ee1de1b3fb..10b6737d02 100644
--- a/lapack-netlib/SRC/zla_porpvgrw.c
+++ b/lapack-netlib/SRC/zla_porpvgrw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_syamv.c b/lapack-netlib/SRC/zla_syamv.c
index f6a0c77840..7f652153c2 100644
--- a/lapack-netlib/SRC/zla_syamv.c
+++ b/lapack-netlib/SRC/zla_syamv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_syrcond_c.c b/lapack-netlib/SRC/zla_syrcond_c.c
index 988a63713f..5173cbb056 100644
--- a/lapack-netlib/SRC/zla_syrcond_c.c
+++ b/lapack-netlib/SRC/zla_syrcond_c.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_syrcond_x.c b/lapack-netlib/SRC/zla_syrcond_x.c
index 7b771f1444..c0f9c71ba9 100644
--- a/lapack-netlib/SRC/zla_syrcond_x.c
+++ b/lapack-netlib/SRC/zla_syrcond_x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_syrfsx_extended.c b/lapack-netlib/SRC/zla_syrfsx_extended.c
index 8e5b40297b..95e3c555f1 100644
--- a/lapack-netlib/SRC/zla_syrfsx_extended.c
+++ b/lapack-netlib/SRC/zla_syrfsx_extended.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_syrpvgrw.c b/lapack-netlib/SRC/zla_syrpvgrw.c
index 3a9af3b3e2..789cb23937 100644
--- a/lapack-netlib/SRC/zla_syrpvgrw.c
+++ b/lapack-netlib/SRC/zla_syrpvgrw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zla_wwaddw.c b/lapack-netlib/SRC/zla_wwaddw.c
index 63a8542b69..aa9bf35c35 100644
--- a/lapack-netlib/SRC/zla_wwaddw.c
+++ b/lapack-netlib/SRC/zla_wwaddw.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlabrd.c b/lapack-netlib/SRC/zlabrd.c
index 208655c58d..13721ce763 100644
--- a/lapack-netlib/SRC/zlabrd.c
+++ b/lapack-netlib/SRC/zlabrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlacgv.c b/lapack-netlib/SRC/zlacgv.c
index 13809ceb4b..02591726c7 100644
--- a/lapack-netlib/SRC/zlacgv.c
+++ b/lapack-netlib/SRC/zlacgv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlacn2.c b/lapack-netlib/SRC/zlacn2.c
index 8984c8bd15..eba861a77b 100644
--- a/lapack-netlib/SRC/zlacn2.c
+++ b/lapack-netlib/SRC/zlacn2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlacon.c b/lapack-netlib/SRC/zlacon.c
index 09aed340f1..1ad786e334 100644
--- a/lapack-netlib/SRC/zlacon.c
+++ b/lapack-netlib/SRC/zlacon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlacp2.c b/lapack-netlib/SRC/zlacp2.c
index 86f6db0c2a..55da810566 100644
--- a/lapack-netlib/SRC/zlacp2.c
+++ b/lapack-netlib/SRC/zlacp2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlacpy.c b/lapack-netlib/SRC/zlacpy.c
index 3db74dbfa4..388af1e0fc 100644
--- a/lapack-netlib/SRC/zlacpy.c
+++ b/lapack-netlib/SRC/zlacpy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlacrm.c b/lapack-netlib/SRC/zlacrm.c
index 842ad2bfd8..3010003a3b 100644
--- a/lapack-netlib/SRC/zlacrm.c
+++ b/lapack-netlib/SRC/zlacrm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlacrt.c b/lapack-netlib/SRC/zlacrt.c
index 587630d433..6ee43bd193 100644
--- a/lapack-netlib/SRC/zlacrt.c
+++ b/lapack-netlib/SRC/zlacrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zladiv.c b/lapack-netlib/SRC/zladiv.c
index 82c963534c..226ea16a64 100644
--- a/lapack-netlib/SRC/zladiv.c
+++ b/lapack-netlib/SRC/zladiv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaed0.c b/lapack-netlib/SRC/zlaed0.c
index a904235fc2..b48fca2c45 100644
--- a/lapack-netlib/SRC/zlaed0.c
+++ b/lapack-netlib/SRC/zlaed0.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaed7.c b/lapack-netlib/SRC/zlaed7.c
index 78c21aa2eb..210511a73b 100644
--- a/lapack-netlib/SRC/zlaed7.c
+++ b/lapack-netlib/SRC/zlaed7.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaed8.c b/lapack-netlib/SRC/zlaed8.c
index 54edb64f9d..6e45b41558 100644
--- a/lapack-netlib/SRC/zlaed8.c
+++ b/lapack-netlib/SRC/zlaed8.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaein.c b/lapack-netlib/SRC/zlaein.c
index eaa156ecd0..35cbf2c122 100644
--- a/lapack-netlib/SRC/zlaein.c
+++ b/lapack-netlib/SRC/zlaein.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaesy.c b/lapack-netlib/SRC/zlaesy.c
index 33cc230050..9e09550c3c 100644
--- a/lapack-netlib/SRC/zlaesy.c
+++ b/lapack-netlib/SRC/zlaesy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaev2.c b/lapack-netlib/SRC/zlaev2.c
index a25e056331..a28ee2cb8b 100644
--- a/lapack-netlib/SRC/zlaev2.c
+++ b/lapack-netlib/SRC/zlaev2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlag2c.c b/lapack-netlib/SRC/zlag2c.c
index 60d24d21ce..1c8a14d000 100644
--- a/lapack-netlib/SRC/zlag2c.c
+++ b/lapack-netlib/SRC/zlag2c.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlags2.c b/lapack-netlib/SRC/zlags2.c
index 9ddde74f6e..d440ae90bb 100644
--- a/lapack-netlib/SRC/zlags2.c
+++ b/lapack-netlib/SRC/zlags2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlagtm.c b/lapack-netlib/SRC/zlagtm.c
index c157909045..a9de3e3f62 100644
--- a/lapack-netlib/SRC/zlagtm.c
+++ b/lapack-netlib/SRC/zlagtm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlahef.c b/lapack-netlib/SRC/zlahef.c
index 466b0ed732..c9b543800c 100644
--- a/lapack-netlib/SRC/zlahef.c
+++ b/lapack-netlib/SRC/zlahef.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlahef_aa.c b/lapack-netlib/SRC/zlahef_aa.c
index 10b77518a1..5c7907856b 100644
--- a/lapack-netlib/SRC/zlahef_aa.c
+++ b/lapack-netlib/SRC/zlahef_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlahef_rk.c b/lapack-netlib/SRC/zlahef_rk.c
index 05f455b776..bede4d5940 100644
--- a/lapack-netlib/SRC/zlahef_rk.c
+++ b/lapack-netlib/SRC/zlahef_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlahef_rook.c b/lapack-netlib/SRC/zlahef_rook.c
index 6172edfd2d..9fbb3f4027 100644
--- a/lapack-netlib/SRC/zlahef_rook.c
+++ b/lapack-netlib/SRC/zlahef_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlahqr.c b/lapack-netlib/SRC/zlahqr.c
index 8436315e0c..1b991d586f 100644
--- a/lapack-netlib/SRC/zlahqr.c
+++ b/lapack-netlib/SRC/zlahqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlahr2.c b/lapack-netlib/SRC/zlahr2.c
index c04c53d91e..c75e9f4e0a 100644
--- a/lapack-netlib/SRC/zlahr2.c
+++ b/lapack-netlib/SRC/zlahr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaic1.c b/lapack-netlib/SRC/zlaic1.c
index dcb06dc7c2..a2413808b4 100644
--- a/lapack-netlib/SRC/zlaic1.c
+++ b/lapack-netlib/SRC/zlaic1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlals0.c b/lapack-netlib/SRC/zlals0.c
index 3a3dc3fade..6255884cc8 100644
--- a/lapack-netlib/SRC/zlals0.c
+++ b/lapack-netlib/SRC/zlals0.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlalsa.c b/lapack-netlib/SRC/zlalsa.c
index 0452472c6c..b6704b31db 100644
--- a/lapack-netlib/SRC/zlalsa.c
+++ b/lapack-netlib/SRC/zlalsa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlalsd.c b/lapack-netlib/SRC/zlalsd.c
index 1f2c72a918..ef4bea5580 100644
--- a/lapack-netlib/SRC/zlalsd.c
+++ b/lapack-netlib/SRC/zlalsd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlamswlq.c b/lapack-netlib/SRC/zlamswlq.c
index af40d70f5d..6ce2f20b75 100644
--- a/lapack-netlib/SRC/zlamswlq.c
+++ b/lapack-netlib/SRC/zlamswlq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlamtsqr.c b/lapack-netlib/SRC/zlamtsqr.c
index cf2fd49e38..ed8bd4fc36 100644
--- a/lapack-netlib/SRC/zlamtsqr.c
+++ b/lapack-netlib/SRC/zlamtsqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlangb.c b/lapack-netlib/SRC/zlangb.c
index 6cd82d7ad1..7a57d6ed99 100644
--- a/lapack-netlib/SRC/zlangb.c
+++ b/lapack-netlib/SRC/zlangb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlange.c b/lapack-netlib/SRC/zlange.c
index 4d5c755392..4feeb0afe1 100644
--- a/lapack-netlib/SRC/zlange.c
+++ b/lapack-netlib/SRC/zlange.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlangt.c b/lapack-netlib/SRC/zlangt.c
index ef6b240a63..1eb4ecc9d7 100644
--- a/lapack-netlib/SRC/zlangt.c
+++ b/lapack-netlib/SRC/zlangt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlanhb.c b/lapack-netlib/SRC/zlanhb.c
index 9187e2fd9e..45e5e10c18 100644
--- a/lapack-netlib/SRC/zlanhb.c
+++ b/lapack-netlib/SRC/zlanhb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlanhe.c b/lapack-netlib/SRC/zlanhe.c
index 4e4392f446..737bc6060f 100644
--- a/lapack-netlib/SRC/zlanhe.c
+++ b/lapack-netlib/SRC/zlanhe.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlanhf.c b/lapack-netlib/SRC/zlanhf.c
index cce5b2bd57..b1f98040da 100644
--- a/lapack-netlib/SRC/zlanhf.c
+++ b/lapack-netlib/SRC/zlanhf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlanhp.c b/lapack-netlib/SRC/zlanhp.c
index 753514afb5..cc30fc52af 100644
--- a/lapack-netlib/SRC/zlanhp.c
+++ b/lapack-netlib/SRC/zlanhp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlanhs.c b/lapack-netlib/SRC/zlanhs.c
index a6d952e98d..8e08be671f 100644
--- a/lapack-netlib/SRC/zlanhs.c
+++ b/lapack-netlib/SRC/zlanhs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlanht.c b/lapack-netlib/SRC/zlanht.c
index b47df2e45b..90136fca13 100644
--- a/lapack-netlib/SRC/zlanht.c
+++ b/lapack-netlib/SRC/zlanht.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlansb.c b/lapack-netlib/SRC/zlansb.c
index c1291302b2..baac7031f8 100644
--- a/lapack-netlib/SRC/zlansb.c
+++ b/lapack-netlib/SRC/zlansb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlansp.c b/lapack-netlib/SRC/zlansp.c
index a27b7d730c..22d6c894a9 100644
--- a/lapack-netlib/SRC/zlansp.c
+++ b/lapack-netlib/SRC/zlansp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlansy.c b/lapack-netlib/SRC/zlansy.c
index 536511c94c..f4c7a73774 100644
--- a/lapack-netlib/SRC/zlansy.c
+++ b/lapack-netlib/SRC/zlansy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlantb.c b/lapack-netlib/SRC/zlantb.c
index 076dcc3804..24a13c189b 100644
--- a/lapack-netlib/SRC/zlantb.c
+++ b/lapack-netlib/SRC/zlantb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlantp.c b/lapack-netlib/SRC/zlantp.c
index 6e504eb69e..a102b2e630 100644
--- a/lapack-netlib/SRC/zlantp.c
+++ b/lapack-netlib/SRC/zlantp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlantr.c b/lapack-netlib/SRC/zlantr.c
index 778689d9ab..504d2c6546 100644
--- a/lapack-netlib/SRC/zlantr.c
+++ b/lapack-netlib/SRC/zlantr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlapll.c b/lapack-netlib/SRC/zlapll.c
index 7eb7598ce1..ef955d5996 100644
--- a/lapack-netlib/SRC/zlapll.c
+++ b/lapack-netlib/SRC/zlapll.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlapmr.c b/lapack-netlib/SRC/zlapmr.c
index 3895f65197..9e42dc5c6d 100644
--- a/lapack-netlib/SRC/zlapmr.c
+++ b/lapack-netlib/SRC/zlapmr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlapmt.c b/lapack-netlib/SRC/zlapmt.c
index 93a398986c..e64653a1bc 100644
--- a/lapack-netlib/SRC/zlapmt.c
+++ b/lapack-netlib/SRC/zlapmt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqgb.c b/lapack-netlib/SRC/zlaqgb.c
index f27b900968..2b016ab750 100644
--- a/lapack-netlib/SRC/zlaqgb.c
+++ b/lapack-netlib/SRC/zlaqgb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqge.c b/lapack-netlib/SRC/zlaqge.c
index 3842ed5c91..5fab7e4895 100644
--- a/lapack-netlib/SRC/zlaqge.c
+++ b/lapack-netlib/SRC/zlaqge.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqhb.c b/lapack-netlib/SRC/zlaqhb.c
index bc31968c00..24c25fe716 100644
--- a/lapack-netlib/SRC/zlaqhb.c
+++ b/lapack-netlib/SRC/zlaqhb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqhe.c b/lapack-netlib/SRC/zlaqhe.c
index 9940976380..456d8e2411 100644
--- a/lapack-netlib/SRC/zlaqhe.c
+++ b/lapack-netlib/SRC/zlaqhe.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqhp.c b/lapack-netlib/SRC/zlaqhp.c
index 843d69036a..f76b643fde 100644
--- a/lapack-netlib/SRC/zlaqhp.c
+++ b/lapack-netlib/SRC/zlaqhp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqp2.c b/lapack-netlib/SRC/zlaqp2.c
index a85160bbc0..e64846e71f 100644
--- a/lapack-netlib/SRC/zlaqp2.c
+++ b/lapack-netlib/SRC/zlaqp2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqp2rk.c b/lapack-netlib/SRC/zlaqp2rk.c
index 0d38e71fbf..f72b6ef177 100644
--- a/lapack-netlib/SRC/zlaqp2rk.c
+++ b/lapack-netlib/SRC/zlaqp2rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqp3rk.c b/lapack-netlib/SRC/zlaqp3rk.c
index cb44e4d34e..73213ec3b3 100644
--- a/lapack-netlib/SRC/zlaqp3rk.c
+++ b/lapack-netlib/SRC/zlaqp3rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqps.c b/lapack-netlib/SRC/zlaqps.c
index 19fda2a091..f31ba46de0 100644
--- a/lapack-netlib/SRC/zlaqps.c
+++ b/lapack-netlib/SRC/zlaqps.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqr0.c b/lapack-netlib/SRC/zlaqr0.c
index 4c8ece3724..bf3b93612a 100644
--- a/lapack-netlib/SRC/zlaqr0.c
+++ b/lapack-netlib/SRC/zlaqr0.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqr1.c b/lapack-netlib/SRC/zlaqr1.c
index c0b702645c..42c841926d 100644
--- a/lapack-netlib/SRC/zlaqr1.c
+++ b/lapack-netlib/SRC/zlaqr1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqr2.c b/lapack-netlib/SRC/zlaqr2.c
index dee1cf49bc..e73590628d 100644
--- a/lapack-netlib/SRC/zlaqr2.c
+++ b/lapack-netlib/SRC/zlaqr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqr3.c b/lapack-netlib/SRC/zlaqr3.c
index a07baaa37c..c445f9d005 100644
--- a/lapack-netlib/SRC/zlaqr3.c
+++ b/lapack-netlib/SRC/zlaqr3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqr4.c b/lapack-netlib/SRC/zlaqr4.c
index 97be063dce..1158c55ad1 100644
--- a/lapack-netlib/SRC/zlaqr4.c
+++ b/lapack-netlib/SRC/zlaqr4.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqr5.c b/lapack-netlib/SRC/zlaqr5.c
index 1aacd4c7e0..8ed00a35b9 100644
--- a/lapack-netlib/SRC/zlaqr5.c
+++ b/lapack-netlib/SRC/zlaqr5.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqsb.c b/lapack-netlib/SRC/zlaqsb.c
index eac5347541..c7af51cbe5 100644
--- a/lapack-netlib/SRC/zlaqsb.c
+++ b/lapack-netlib/SRC/zlaqsb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqsp.c b/lapack-netlib/SRC/zlaqsp.c
index 22758cefa7..c896bcf88d 100644
--- a/lapack-netlib/SRC/zlaqsp.c
+++ b/lapack-netlib/SRC/zlaqsp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqsy.c b/lapack-netlib/SRC/zlaqsy.c
index 8089d2eb67..b14f94b2c1 100644
--- a/lapack-netlib/SRC/zlaqsy.c
+++ b/lapack-netlib/SRC/zlaqsy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqz0.c b/lapack-netlib/SRC/zlaqz0.c
index d05923a46d..7856e080ff 100644
--- a/lapack-netlib/SRC/zlaqz0.c
+++ b/lapack-netlib/SRC/zlaqz0.c
@@ -19,7 +19,28 @@
#undef I
#endif
-typedef int integer;
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
+
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqz1.c b/lapack-netlib/SRC/zlaqz1.c
index d05923a46d..7856e080ff 100644
--- a/lapack-netlib/SRC/zlaqz1.c
+++ b/lapack-netlib/SRC/zlaqz1.c
@@ -19,7 +19,28 @@
#undef I
#endif
-typedef int integer;
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
+
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqz2.c b/lapack-netlib/SRC/zlaqz2.c
index d05923a46d..7856e080ff 100644
--- a/lapack-netlib/SRC/zlaqz2.c
+++ b/lapack-netlib/SRC/zlaqz2.c
@@ -19,7 +19,28 @@
#undef I
#endif
-typedef int integer;
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
+
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaqz3.c b/lapack-netlib/SRC/zlaqz3.c
index d05923a46d..7856e080ff 100644
--- a/lapack-netlib/SRC/zlaqz3.c
+++ b/lapack-netlib/SRC/zlaqz3.c
@@ -19,7 +19,28 @@
#undef I
#endif
-typedef int integer;
+#if defined(_WIN64)
+typedef long long BLASLONG;
+typedef unsigned long long BLASULONG;
+#else
+typedef long BLASLONG;
+typedef unsigned long BLASULONG;
+#endif
+
+#ifdef LAPACK_ILP64
+typedef BLASLONG blasint;
+#if defined(_WIN64)
+#define blasabs(x) llabs(x)
+#else
+#define blasabs(x) labs(x)
+#endif
+#else
+typedef int blasint;
+#define blasabs(x) abs(x)
+#endif
+
+typedef blasint integer;
+
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
@@ -33,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -236,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlar1v.c b/lapack-netlib/SRC/zlar1v.c
index fa9c6147a2..609e8a95c5 100644
--- a/lapack-netlib/SRC/zlar1v.c
+++ b/lapack-netlib/SRC/zlar1v.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlar2v.c b/lapack-netlib/SRC/zlar2v.c
index 8654cdde45..b138a26364 100644
--- a/lapack-netlib/SRC/zlar2v.c
+++ b/lapack-netlib/SRC/zlar2v.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarcm.c b/lapack-netlib/SRC/zlarcm.c
index 5ce71fdf97..34c861a592 100644
--- a/lapack-netlib/SRC/zlarcm.c
+++ b/lapack-netlib/SRC/zlarcm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarf.c b/lapack-netlib/SRC/zlarf.c
index 67f8c9756a..fcc88eab4d 100644
--- a/lapack-netlib/SRC/zlarf.c
+++ b/lapack-netlib/SRC/zlarf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarfb.c b/lapack-netlib/SRC/zlarfb.c
index 14d36bc1bd..0d0b2400db 100644
--- a/lapack-netlib/SRC/zlarfb.c
+++ b/lapack-netlib/SRC/zlarfb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarfb_gett.c b/lapack-netlib/SRC/zlarfb_gett.c
index 71f4a749db..47ff064548 100644
--- a/lapack-netlib/SRC/zlarfb_gett.c
+++ b/lapack-netlib/SRC/zlarfb_gett.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarfg.c b/lapack-netlib/SRC/zlarfg.c
index 9696b3ef4a..099c685bc7 100644
--- a/lapack-netlib/SRC/zlarfg.c
+++ b/lapack-netlib/SRC/zlarfg.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarfgp.c b/lapack-netlib/SRC/zlarfgp.c
index 00d3f2042a..3a891c19f1 100644
--- a/lapack-netlib/SRC/zlarfgp.c
+++ b/lapack-netlib/SRC/zlarfgp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarft.c b/lapack-netlib/SRC/zlarft.c
index f24e62d380..31d17ca5f8 100644
--- a/lapack-netlib/SRC/zlarft.c
+++ b/lapack-netlib/SRC/zlarft.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarfx.c b/lapack-netlib/SRC/zlarfx.c
index 782699a663..f4a3767d24 100644
--- a/lapack-netlib/SRC/zlarfx.c
+++ b/lapack-netlib/SRC/zlarfx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarfy.c b/lapack-netlib/SRC/zlarfy.c
index e5df36f34b..280dcbb38f 100644
--- a/lapack-netlib/SRC/zlarfy.c
+++ b/lapack-netlib/SRC/zlarfy.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlargv.c b/lapack-netlib/SRC/zlargv.c
index 2fc7080e2f..89926d0343 100644
--- a/lapack-netlib/SRC/zlargv.c
+++ b/lapack-netlib/SRC/zlargv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarnv.c b/lapack-netlib/SRC/zlarnv.c
index 9b7d4b173d..b7a0117692 100644
--- a/lapack-netlib/SRC/zlarnv.c
+++ b/lapack-netlib/SRC/zlarnv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarrv.c b/lapack-netlib/SRC/zlarrv.c
index 8dda3d097c..672df9ab82 100644
--- a/lapack-netlib/SRC/zlarrv.c
+++ b/lapack-netlib/SRC/zlarrv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarscl2.c b/lapack-netlib/SRC/zlarscl2.c
index 2493468e78..871f25afbe 100644
--- a/lapack-netlib/SRC/zlarscl2.c
+++ b/lapack-netlib/SRC/zlarscl2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlartg.c b/lapack-netlib/SRC/zlartg.c
index f8f7260258..ede5b489a7 100644
--- a/lapack-netlib/SRC/zlartg.c
+++ b/lapack-netlib/SRC/zlartg.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlartv.c b/lapack-netlib/SRC/zlartv.c
index b578b8bf74..2bccb7924d 100644
--- a/lapack-netlib/SRC/zlartv.c
+++ b/lapack-netlib/SRC/zlartv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarz.c b/lapack-netlib/SRC/zlarz.c
index e4a4ea2541..a1c6308924 100644
--- a/lapack-netlib/SRC/zlarz.c
+++ b/lapack-netlib/SRC/zlarz.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarzb.c b/lapack-netlib/SRC/zlarzb.c
index 5416b5e348..132c2ecf5f 100644
--- a/lapack-netlib/SRC/zlarzb.c
+++ b/lapack-netlib/SRC/zlarzb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlarzt.c b/lapack-netlib/SRC/zlarzt.c
index 036c7209ed..70c76cd5a8 100644
--- a/lapack-netlib/SRC/zlarzt.c
+++ b/lapack-netlib/SRC/zlarzt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlascl.c b/lapack-netlib/SRC/zlascl.c
index 73b2f29ffa..0e06e9bc42 100644
--- a/lapack-netlib/SRC/zlascl.c
+++ b/lapack-netlib/SRC/zlascl.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlascl2.c b/lapack-netlib/SRC/zlascl2.c
index 076bab027c..a5f6562a2f 100644
--- a/lapack-netlib/SRC/zlascl2.c
+++ b/lapack-netlib/SRC/zlascl2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaset.c b/lapack-netlib/SRC/zlaset.c
index 9e3f21d728..a579a01d36 100644
--- a/lapack-netlib/SRC/zlaset.c
+++ b/lapack-netlib/SRC/zlaset.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlasr.c b/lapack-netlib/SRC/zlasr.c
index 983f7b3d3f..c30626ca36 100644
--- a/lapack-netlib/SRC/zlasr.c
+++ b/lapack-netlib/SRC/zlasr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlassq.c b/lapack-netlib/SRC/zlassq.c
index 5e9fade410..2ccd8be98c 100644
--- a/lapack-netlib/SRC/zlassq.c
+++ b/lapack-netlib/SRC/zlassq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaswlq.c b/lapack-netlib/SRC/zlaswlq.c
index aa46bfa292..8fccd02d45 100644
--- a/lapack-netlib/SRC/zlaswlq.c
+++ b/lapack-netlib/SRC/zlaswlq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaswp.c b/lapack-netlib/SRC/zlaswp.c
index 84616be2b0..eee4de061c 100644
--- a/lapack-netlib/SRC/zlaswp.c
+++ b/lapack-netlib/SRC/zlaswp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlasyf.c b/lapack-netlib/SRC/zlasyf.c
index f52e18b6a2..cc26f87e04 100644
--- a/lapack-netlib/SRC/zlasyf.c
+++ b/lapack-netlib/SRC/zlasyf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlasyf_aa.c b/lapack-netlib/SRC/zlasyf_aa.c
index 6a769f996f..d5bc9fe1aa 100644
--- a/lapack-netlib/SRC/zlasyf_aa.c
+++ b/lapack-netlib/SRC/zlasyf_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlasyf_rk.c b/lapack-netlib/SRC/zlasyf_rk.c
index a8690e3b09..f388372b24 100644
--- a/lapack-netlib/SRC/zlasyf_rk.c
+++ b/lapack-netlib/SRC/zlasyf_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlasyf_rook.c b/lapack-netlib/SRC/zlasyf_rook.c
index 09ff4c3040..6c1302aeb0 100644
--- a/lapack-netlib/SRC/zlasyf_rook.c
+++ b/lapack-netlib/SRC/zlasyf_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlat2c.c b/lapack-netlib/SRC/zlat2c.c
index a11ce7f970..a3a2de70d2 100644
--- a/lapack-netlib/SRC/zlat2c.c
+++ b/lapack-netlib/SRC/zlat2c.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlatbs.c b/lapack-netlib/SRC/zlatbs.c
index f862c1488d..33e73dbf2e 100644
--- a/lapack-netlib/SRC/zlatbs.c
+++ b/lapack-netlib/SRC/zlatbs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlatdf.c b/lapack-netlib/SRC/zlatdf.c
index 125fc1752d..a207a62cb7 100644
--- a/lapack-netlib/SRC/zlatdf.c
+++ b/lapack-netlib/SRC/zlatdf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlatps.c b/lapack-netlib/SRC/zlatps.c
index f73d72e719..125cc4425e 100644
--- a/lapack-netlib/SRC/zlatps.c
+++ b/lapack-netlib/SRC/zlatps.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlatrd.c b/lapack-netlib/SRC/zlatrd.c
index 81a3479f7f..9a6cf3b13a 100644
--- a/lapack-netlib/SRC/zlatrd.c
+++ b/lapack-netlib/SRC/zlatrd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlatrs.c b/lapack-netlib/SRC/zlatrs.c
index 71122e2cc1..6bd493c1fb 100644
--- a/lapack-netlib/SRC/zlatrs.c
+++ b/lapack-netlib/SRC/zlatrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlatrs3.c b/lapack-netlib/SRC/zlatrs3.c
index 0afc8d26cb..dddf96eea8 100644
--- a/lapack-netlib/SRC/zlatrs3.c
+++ b/lapack-netlib/SRC/zlatrs3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -263,7 +263,7 @@ static int my_expfunc(double *x) {int e; (void)frexp(*x,&e); return e;}
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlatrz.c b/lapack-netlib/SRC/zlatrz.c
index 69be8eaa8f..3c2b754fd6 100644
--- a/lapack-netlib/SRC/zlatrz.c
+++ b/lapack-netlib/SRC/zlatrz.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlatsqr.c b/lapack-netlib/SRC/zlatsqr.c
index 7e98a62037..baa0e5511f 100644
--- a/lapack-netlib/SRC/zlatsqr.c
+++ b/lapack-netlib/SRC/zlatsqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaunhr_col_getrfnp.c b/lapack-netlib/SRC/zlaunhr_col_getrfnp.c
index ed22ca82ec..82393ba86f 100644
--- a/lapack-netlib/SRC/zlaunhr_col_getrfnp.c
+++ b/lapack-netlib/SRC/zlaunhr_col_getrfnp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlaunhr_col_getrfnp2.c b/lapack-netlib/SRC/zlaunhr_col_getrfnp2.c
index acf2670245..91d93849d9 100644
--- a/lapack-netlib/SRC/zlaunhr_col_getrfnp2.c
+++ b/lapack-netlib/SRC/zlaunhr_col_getrfnp2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlauu2.c b/lapack-netlib/SRC/zlauu2.c
index 9a8dbea6d6..0086794da6 100644
--- a/lapack-netlib/SRC/zlauu2.c
+++ b/lapack-netlib/SRC/zlauu2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zlauum.c b/lapack-netlib/SRC/zlauum.c
index b8331beee1..0f3a5528ba 100644
--- a/lapack-netlib/SRC/zlauum.c
+++ b/lapack-netlib/SRC/zlauum.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpbcon.c b/lapack-netlib/SRC/zpbcon.c
index 36d2dac743..574e5d79f0 100644
--- a/lapack-netlib/SRC/zpbcon.c
+++ b/lapack-netlib/SRC/zpbcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpbequ.c b/lapack-netlib/SRC/zpbequ.c
index eecf4b2f82..d4b46d313e 100644
--- a/lapack-netlib/SRC/zpbequ.c
+++ b/lapack-netlib/SRC/zpbequ.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpbrfs.c b/lapack-netlib/SRC/zpbrfs.c
index 7e1166d9d0..d3f813d412 100644
--- a/lapack-netlib/SRC/zpbrfs.c
+++ b/lapack-netlib/SRC/zpbrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpbstf.c b/lapack-netlib/SRC/zpbstf.c
index c46dcb8c35..78b5d1b75a 100644
--- a/lapack-netlib/SRC/zpbstf.c
+++ b/lapack-netlib/SRC/zpbstf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpbsv.c b/lapack-netlib/SRC/zpbsv.c
index a9a19b7143..c4fe2e1e72 100644
--- a/lapack-netlib/SRC/zpbsv.c
+++ b/lapack-netlib/SRC/zpbsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpbsvx.c b/lapack-netlib/SRC/zpbsvx.c
index 83b9238833..43b4874030 100644
--- a/lapack-netlib/SRC/zpbsvx.c
+++ b/lapack-netlib/SRC/zpbsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpbtf2.c b/lapack-netlib/SRC/zpbtf2.c
index f050b96021..3454ca6f72 100644
--- a/lapack-netlib/SRC/zpbtf2.c
+++ b/lapack-netlib/SRC/zpbtf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpbtrf.c b/lapack-netlib/SRC/zpbtrf.c
index 268d1c1017..6dfc68947a 100644
--- a/lapack-netlib/SRC/zpbtrf.c
+++ b/lapack-netlib/SRC/zpbtrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpbtrs.c b/lapack-netlib/SRC/zpbtrs.c
index 3e8d2cf798..e1eb3415aa 100644
--- a/lapack-netlib/SRC/zpbtrs.c
+++ b/lapack-netlib/SRC/zpbtrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpftrf.c b/lapack-netlib/SRC/zpftrf.c
index f2231e3318..1c01e97b7a 100644
--- a/lapack-netlib/SRC/zpftrf.c
+++ b/lapack-netlib/SRC/zpftrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpftri.c b/lapack-netlib/SRC/zpftri.c
index 52ab6aff53..2e00453907 100644
--- a/lapack-netlib/SRC/zpftri.c
+++ b/lapack-netlib/SRC/zpftri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpftrs.c b/lapack-netlib/SRC/zpftrs.c
index 26aaaa61cf..7206231ff3 100644
--- a/lapack-netlib/SRC/zpftrs.c
+++ b/lapack-netlib/SRC/zpftrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpocon.c b/lapack-netlib/SRC/zpocon.c
index 4eecb13160..51305a415d 100644
--- a/lapack-netlib/SRC/zpocon.c
+++ b/lapack-netlib/SRC/zpocon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpoequ.c b/lapack-netlib/SRC/zpoequ.c
index e3fcc48920..59ff410db5 100644
--- a/lapack-netlib/SRC/zpoequ.c
+++ b/lapack-netlib/SRC/zpoequ.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpoequb.c b/lapack-netlib/SRC/zpoequb.c
index 54c36e7721..c323ec60c7 100644
--- a/lapack-netlib/SRC/zpoequb.c
+++ b/lapack-netlib/SRC/zpoequb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zporfs.c b/lapack-netlib/SRC/zporfs.c
index 9b963c44a1..aebda152ef 100644
--- a/lapack-netlib/SRC/zporfs.c
+++ b/lapack-netlib/SRC/zporfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zporfsx.c b/lapack-netlib/SRC/zporfsx.c
index aa3ac4f728..61885f2fe1 100644
--- a/lapack-netlib/SRC/zporfsx.c
+++ b/lapack-netlib/SRC/zporfsx.c
@@ -54,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -257,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zposv.c b/lapack-netlib/SRC/zposv.c
index a577d5315c..cc8fbf5818 100644
--- a/lapack-netlib/SRC/zposv.c
+++ b/lapack-netlib/SRC/zposv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zposvx.c b/lapack-netlib/SRC/zposvx.c
index 10032d7582..b8a0150eff 100644
--- a/lapack-netlib/SRC/zposvx.c
+++ b/lapack-netlib/SRC/zposvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zposvxx.c b/lapack-netlib/SRC/zposvxx.c
index b6473cf983..a62619cbf6 100644
--- a/lapack-netlib/SRC/zposvxx.c
+++ b/lapack-netlib/SRC/zposvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpotf2.c b/lapack-netlib/SRC/zpotf2.c
index 594f338025..c4c8c77ff7 100644
--- a/lapack-netlib/SRC/zpotf2.c
+++ b/lapack-netlib/SRC/zpotf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpotrf.c b/lapack-netlib/SRC/zpotrf.c
index 99dd13bdec..37d1babb77 100644
--- a/lapack-netlib/SRC/zpotrf.c
+++ b/lapack-netlib/SRC/zpotrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpotrf2.c b/lapack-netlib/SRC/zpotrf2.c
index 0b773aae6d..0520c7fe52 100644
--- a/lapack-netlib/SRC/zpotrf2.c
+++ b/lapack-netlib/SRC/zpotrf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpotri.c b/lapack-netlib/SRC/zpotri.c
index 92b0f844bd..f4f5d76178 100644
--- a/lapack-netlib/SRC/zpotri.c
+++ b/lapack-netlib/SRC/zpotri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpotrs.c b/lapack-netlib/SRC/zpotrs.c
index ddbe496e5a..c01deca93e 100644
--- a/lapack-netlib/SRC/zpotrs.c
+++ b/lapack-netlib/SRC/zpotrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zppcon.c b/lapack-netlib/SRC/zppcon.c
index 541c330afe..e44f73a496 100644
--- a/lapack-netlib/SRC/zppcon.c
+++ b/lapack-netlib/SRC/zppcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zppequ.c b/lapack-netlib/SRC/zppequ.c
index 7b7d7be22f..04d5955ab3 100644
--- a/lapack-netlib/SRC/zppequ.c
+++ b/lapack-netlib/SRC/zppequ.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpprfs.c b/lapack-netlib/SRC/zpprfs.c
index 652d53cbc0..80bca1606c 100644
--- a/lapack-netlib/SRC/zpprfs.c
+++ b/lapack-netlib/SRC/zpprfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zppsv.c b/lapack-netlib/SRC/zppsv.c
index 4788368fcf..46784aded8 100644
--- a/lapack-netlib/SRC/zppsv.c
+++ b/lapack-netlib/SRC/zppsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zppsvx.c b/lapack-netlib/SRC/zppsvx.c
index ff1cb299e8..2b34465726 100644
--- a/lapack-netlib/SRC/zppsvx.c
+++ b/lapack-netlib/SRC/zppsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpptrf.c b/lapack-netlib/SRC/zpptrf.c
index 8e099c203c..c595af7e09 100644
--- a/lapack-netlib/SRC/zpptrf.c
+++ b/lapack-netlib/SRC/zpptrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpptri.c b/lapack-netlib/SRC/zpptri.c
index 215e343793..f05e6e6bb7 100644
--- a/lapack-netlib/SRC/zpptri.c
+++ b/lapack-netlib/SRC/zpptri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpptrs.c b/lapack-netlib/SRC/zpptrs.c
index 4ede1c717a..7c88d70ff1 100644
--- a/lapack-netlib/SRC/zpptrs.c
+++ b/lapack-netlib/SRC/zpptrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpstf2.c b/lapack-netlib/SRC/zpstf2.c
index 9fa691324c..4d563869e3 100644
--- a/lapack-netlib/SRC/zpstf2.c
+++ b/lapack-netlib/SRC/zpstf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpstrf.c b/lapack-netlib/SRC/zpstrf.c
index 056f93b46c..806b4ba20d 100644
--- a/lapack-netlib/SRC/zpstrf.c
+++ b/lapack-netlib/SRC/zpstrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zptcon.c b/lapack-netlib/SRC/zptcon.c
index 45e748a6ba..8496b48cc1 100644
--- a/lapack-netlib/SRC/zptcon.c
+++ b/lapack-netlib/SRC/zptcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpteqr.c b/lapack-netlib/SRC/zpteqr.c
index e557bcc7c6..578aa77392 100644
--- a/lapack-netlib/SRC/zpteqr.c
+++ b/lapack-netlib/SRC/zpteqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zptrfs.c b/lapack-netlib/SRC/zptrfs.c
index 3bf4915774..a59ac5cdcd 100644
--- a/lapack-netlib/SRC/zptrfs.c
+++ b/lapack-netlib/SRC/zptrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zptsv.c b/lapack-netlib/SRC/zptsv.c
index 37e8534659..c08a1b8009 100644
--- a/lapack-netlib/SRC/zptsv.c
+++ b/lapack-netlib/SRC/zptsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zptsvx.c b/lapack-netlib/SRC/zptsvx.c
index 3ab57d2355..25d7420166 100644
--- a/lapack-netlib/SRC/zptsvx.c
+++ b/lapack-netlib/SRC/zptsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpttrf.c b/lapack-netlib/SRC/zpttrf.c
index e2c271f904..8069c1b223 100644
--- a/lapack-netlib/SRC/zpttrf.c
+++ b/lapack-netlib/SRC/zpttrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zpttrs.c b/lapack-netlib/SRC/zpttrs.c
index c9a0336fac..327e1bad0d 100644
--- a/lapack-netlib/SRC/zpttrs.c
+++ b/lapack-netlib/SRC/zpttrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zptts2.c b/lapack-netlib/SRC/zptts2.c
index 9b6d2fb9f9..9f80af125b 100644
--- a/lapack-netlib/SRC/zptts2.c
+++ b/lapack-netlib/SRC/zptts2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zrot.c b/lapack-netlib/SRC/zrot.c
index da9b200374..f553491829 100644
--- a/lapack-netlib/SRC/zrot.c
+++ b/lapack-netlib/SRC/zrot.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zrscl.c b/lapack-netlib/SRC/zrscl.c
index 2264b5465f..97eb3b91f1 100644
--- a/lapack-netlib/SRC/zrscl.c
+++ b/lapack-netlib/SRC/zrscl.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zspcon.c b/lapack-netlib/SRC/zspcon.c
index 21cc74cdbe..b53e45043d 100644
--- a/lapack-netlib/SRC/zspcon.c
+++ b/lapack-netlib/SRC/zspcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zspmv.c b/lapack-netlib/SRC/zspmv.c
index e0bd139b5b..66e3d008b0 100644
--- a/lapack-netlib/SRC/zspmv.c
+++ b/lapack-netlib/SRC/zspmv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zspr.c b/lapack-netlib/SRC/zspr.c
index 9aa4b9b039..d15d8ba3ec 100644
--- a/lapack-netlib/SRC/zspr.c
+++ b/lapack-netlib/SRC/zspr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsprfs.c b/lapack-netlib/SRC/zsprfs.c
index 2a8b995824..5998f7a438 100644
--- a/lapack-netlib/SRC/zsprfs.c
+++ b/lapack-netlib/SRC/zsprfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zspsv.c b/lapack-netlib/SRC/zspsv.c
index 31c89538e5..9de93d297f 100644
--- a/lapack-netlib/SRC/zspsv.c
+++ b/lapack-netlib/SRC/zspsv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zspsvx.c b/lapack-netlib/SRC/zspsvx.c
index f51ca179eb..5df091420b 100644
--- a/lapack-netlib/SRC/zspsvx.c
+++ b/lapack-netlib/SRC/zspsvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsptrf.c b/lapack-netlib/SRC/zsptrf.c
index e423f831e8..9d22637511 100644
--- a/lapack-netlib/SRC/zsptrf.c
+++ b/lapack-netlib/SRC/zsptrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsptri.c b/lapack-netlib/SRC/zsptri.c
index 7a3d976313..e8ec90fdb5 100644
--- a/lapack-netlib/SRC/zsptri.c
+++ b/lapack-netlib/SRC/zsptri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsptrs.c b/lapack-netlib/SRC/zsptrs.c
index 45cb7a79af..9717f795d3 100644
--- a/lapack-netlib/SRC/zsptrs.c
+++ b/lapack-netlib/SRC/zsptrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zstedc.c b/lapack-netlib/SRC/zstedc.c
index b757471331..85e3d67165 100644
--- a/lapack-netlib/SRC/zstedc.c
+++ b/lapack-netlib/SRC/zstedc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zstegr.c b/lapack-netlib/SRC/zstegr.c
index d685404cdc..c307a04578 100644
--- a/lapack-netlib/SRC/zstegr.c
+++ b/lapack-netlib/SRC/zstegr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zstein.c b/lapack-netlib/SRC/zstein.c
index bbe439c485..7fb3a13aca 100644
--- a/lapack-netlib/SRC/zstein.c
+++ b/lapack-netlib/SRC/zstein.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zstemr.c b/lapack-netlib/SRC/zstemr.c
index 28af7cff56..90e22f3049 100644
--- a/lapack-netlib/SRC/zstemr.c
+++ b/lapack-netlib/SRC/zstemr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsteqr.c b/lapack-netlib/SRC/zsteqr.c
index 42782baab0..87a496d3ae 100644
--- a/lapack-netlib/SRC/zsteqr.c
+++ b/lapack-netlib/SRC/zsteqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsycon.c b/lapack-netlib/SRC/zsycon.c
index 2842546af9..92676d76ac 100644
--- a/lapack-netlib/SRC/zsycon.c
+++ b/lapack-netlib/SRC/zsycon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsycon_3.c b/lapack-netlib/SRC/zsycon_3.c
index cd0bf7f96c..9e70198c2d 100644
--- a/lapack-netlib/SRC/zsycon_3.c
+++ b/lapack-netlib/SRC/zsycon_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsycon_rook.c b/lapack-netlib/SRC/zsycon_rook.c
index 0fe88cbdb7..0198a76692 100644
--- a/lapack-netlib/SRC/zsycon_rook.c
+++ b/lapack-netlib/SRC/zsycon_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsyconv.c b/lapack-netlib/SRC/zsyconv.c
index b0acec29a5..24d1e02ac7 100644
--- a/lapack-netlib/SRC/zsyconv.c
+++ b/lapack-netlib/SRC/zsyconv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsyconvf.c b/lapack-netlib/SRC/zsyconvf.c
index 1313bb4e65..84d710b81b 100644
--- a/lapack-netlib/SRC/zsyconvf.c
+++ b/lapack-netlib/SRC/zsyconvf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsyconvf_rook.c b/lapack-netlib/SRC/zsyconvf_rook.c
index 05cefa81a2..06b44c7c1d 100644
--- a/lapack-netlib/SRC/zsyconvf_rook.c
+++ b/lapack-netlib/SRC/zsyconvf_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsyequb.c b/lapack-netlib/SRC/zsyequb.c
index 9f740710f6..12535c8bf9 100644
--- a/lapack-netlib/SRC/zsyequb.c
+++ b/lapack-netlib/SRC/zsyequb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsymv.c b/lapack-netlib/SRC/zsymv.c
index 7729d3f439..1eca75bd97 100644
--- a/lapack-netlib/SRC/zsymv.c
+++ b/lapack-netlib/SRC/zsymv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsyr.c b/lapack-netlib/SRC/zsyr.c
index bacc1cf549..27cf8e8d90 100644
--- a/lapack-netlib/SRC/zsyr.c
+++ b/lapack-netlib/SRC/zsyr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsyrfs.c b/lapack-netlib/SRC/zsyrfs.c
index 31a54c1209..2c46ef6e8a 100644
--- a/lapack-netlib/SRC/zsyrfs.c
+++ b/lapack-netlib/SRC/zsyrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsyrfsx.c b/lapack-netlib/SRC/zsyrfsx.c
index aa3ac4f728..61885f2fe1 100644
--- a/lapack-netlib/SRC/zsyrfsx.c
+++ b/lapack-netlib/SRC/zsyrfsx.c
@@ -54,8 +54,8 @@ static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -257,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsysv.c b/lapack-netlib/SRC/zsysv.c
index ffa5a09f9f..5bf2fada11 100644
--- a/lapack-netlib/SRC/zsysv.c
+++ b/lapack-netlib/SRC/zsysv.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsysv_aa.c b/lapack-netlib/SRC/zsysv_aa.c
index 2b226200ea..f27b1f96aa 100644
--- a/lapack-netlib/SRC/zsysv_aa.c
+++ b/lapack-netlib/SRC/zsysv_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsysv_aa_2stage.c b/lapack-netlib/SRC/zsysv_aa_2stage.c
index d2ed5e3c8f..5f8fc82f8c 100644
--- a/lapack-netlib/SRC/zsysv_aa_2stage.c
+++ b/lapack-netlib/SRC/zsysv_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsysv_rk.c b/lapack-netlib/SRC/zsysv_rk.c
index 01a75aaec8..d38c78e0b7 100644
--- a/lapack-netlib/SRC/zsysv_rk.c
+++ b/lapack-netlib/SRC/zsysv_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsysv_rook.c b/lapack-netlib/SRC/zsysv_rook.c
index c0ea7bb1f7..161a511365 100644
--- a/lapack-netlib/SRC/zsysv_rook.c
+++ b/lapack-netlib/SRC/zsysv_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsysvx.c b/lapack-netlib/SRC/zsysvx.c
index 29302ff767..39d23fd5f5 100644
--- a/lapack-netlib/SRC/zsysvx.c
+++ b/lapack-netlib/SRC/zsysvx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsysvxx.c b/lapack-netlib/SRC/zsysvxx.c
index ff18cc709c..f3c0f95d06 100644
--- a/lapack-netlib/SRC/zsysvxx.c
+++ b/lapack-netlib/SRC/zsysvxx.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsyswapr.c b/lapack-netlib/SRC/zsyswapr.c
index 86f925d1a5..1d5772cd93 100644
--- a/lapack-netlib/SRC/zsyswapr.c
+++ b/lapack-netlib/SRC/zsyswapr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytf2.c b/lapack-netlib/SRC/zsytf2.c
index 7d84395dfa..3fba2c67ab 100644
--- a/lapack-netlib/SRC/zsytf2.c
+++ b/lapack-netlib/SRC/zsytf2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytf2_rk.c b/lapack-netlib/SRC/zsytf2_rk.c
index 61596a9962..68a28e0048 100644
--- a/lapack-netlib/SRC/zsytf2_rk.c
+++ b/lapack-netlib/SRC/zsytf2_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytf2_rook.c b/lapack-netlib/SRC/zsytf2_rook.c
index 0ffd6dd784..eb3b1b2750 100644
--- a/lapack-netlib/SRC/zsytf2_rook.c
+++ b/lapack-netlib/SRC/zsytf2_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytrf.c b/lapack-netlib/SRC/zsytrf.c
index 9aac589ad5..c13bcdb106 100644
--- a/lapack-netlib/SRC/zsytrf.c
+++ b/lapack-netlib/SRC/zsytrf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytrf_aa.c b/lapack-netlib/SRC/zsytrf_aa.c
index 29a3dcb7c4..1b260572c1 100644
--- a/lapack-netlib/SRC/zsytrf_aa.c
+++ b/lapack-netlib/SRC/zsytrf_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytrf_aa_2stage.c b/lapack-netlib/SRC/zsytrf_aa_2stage.c
index a3d6a39b6a..44178bc43c 100644
--- a/lapack-netlib/SRC/zsytrf_aa_2stage.c
+++ b/lapack-netlib/SRC/zsytrf_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytrf_rk.c b/lapack-netlib/SRC/zsytrf_rk.c
index a87821837c..fe5607a022 100644
--- a/lapack-netlib/SRC/zsytrf_rk.c
+++ b/lapack-netlib/SRC/zsytrf_rk.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytrf_rook.c b/lapack-netlib/SRC/zsytrf_rook.c
index 6c02245a2d..cf9a7940a5 100644
--- a/lapack-netlib/SRC/zsytrf_rook.c
+++ b/lapack-netlib/SRC/zsytrf_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytri.c b/lapack-netlib/SRC/zsytri.c
index cf9a702518..4b9e1418f7 100644
--- a/lapack-netlib/SRC/zsytri.c
+++ b/lapack-netlib/SRC/zsytri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytri2.c b/lapack-netlib/SRC/zsytri2.c
index 31f65bdaca..1899883a1c 100644
--- a/lapack-netlib/SRC/zsytri2.c
+++ b/lapack-netlib/SRC/zsytri2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytri2x.c b/lapack-netlib/SRC/zsytri2x.c
index cacd30379c..4462ed6de3 100644
--- a/lapack-netlib/SRC/zsytri2x.c
+++ b/lapack-netlib/SRC/zsytri2x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytri_3.c b/lapack-netlib/SRC/zsytri_3.c
index 9a1fe7b6d4..c36fa5e86e 100644
--- a/lapack-netlib/SRC/zsytri_3.c
+++ b/lapack-netlib/SRC/zsytri_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytri_3x.c b/lapack-netlib/SRC/zsytri_3x.c
index e5575d2937..7c214afcaf 100644
--- a/lapack-netlib/SRC/zsytri_3x.c
+++ b/lapack-netlib/SRC/zsytri_3x.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytri_rook.c b/lapack-netlib/SRC/zsytri_rook.c
index 2899d12f0e..2e956e3a50 100644
--- a/lapack-netlib/SRC/zsytri_rook.c
+++ b/lapack-netlib/SRC/zsytri_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytrs.c b/lapack-netlib/SRC/zsytrs.c
index a31b3e9f24..d3b41ebfe7 100644
--- a/lapack-netlib/SRC/zsytrs.c
+++ b/lapack-netlib/SRC/zsytrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytrs2.c b/lapack-netlib/SRC/zsytrs2.c
index b377b7f5da..9a52a245bc 100644
--- a/lapack-netlib/SRC/zsytrs2.c
+++ b/lapack-netlib/SRC/zsytrs2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytrs_3.c b/lapack-netlib/SRC/zsytrs_3.c
index 7d1763c041..c296b6ba32 100644
--- a/lapack-netlib/SRC/zsytrs_3.c
+++ b/lapack-netlib/SRC/zsytrs_3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytrs_aa.c b/lapack-netlib/SRC/zsytrs_aa.c
index 7983cd087b..00e03d9828 100644
--- a/lapack-netlib/SRC/zsytrs_aa.c
+++ b/lapack-netlib/SRC/zsytrs_aa.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytrs_aa_2stage.c b/lapack-netlib/SRC/zsytrs_aa_2stage.c
index 0bb91f9406..0641f49b04 100644
--- a/lapack-netlib/SRC/zsytrs_aa_2stage.c
+++ b/lapack-netlib/SRC/zsytrs_aa_2stage.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zsytrs_rook.c b/lapack-netlib/SRC/zsytrs_rook.c
index 2a01c9461a..994bbf5cc7 100644
--- a/lapack-netlib/SRC/zsytrs_rook.c
+++ b/lapack-netlib/SRC/zsytrs_rook.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztbcon.c b/lapack-netlib/SRC/ztbcon.c
index 5fcd4e0b2a..7fedf5966a 100644
--- a/lapack-netlib/SRC/ztbcon.c
+++ b/lapack-netlib/SRC/ztbcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztbrfs.c b/lapack-netlib/SRC/ztbrfs.c
index a34d2fae84..96b9eb9cbe 100644
--- a/lapack-netlib/SRC/ztbrfs.c
+++ b/lapack-netlib/SRC/ztbrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztbtrs.c b/lapack-netlib/SRC/ztbtrs.c
index 25c365744d..2391f4bba7 100644
--- a/lapack-netlib/SRC/ztbtrs.c
+++ b/lapack-netlib/SRC/ztbtrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztfsm.c b/lapack-netlib/SRC/ztfsm.c
index f96df7d01e..f6cb622fb7 100644
--- a/lapack-netlib/SRC/ztfsm.c
+++ b/lapack-netlib/SRC/ztfsm.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztftri.c b/lapack-netlib/SRC/ztftri.c
index 8a69fb3136..05aee16c6b 100644
--- a/lapack-netlib/SRC/ztftri.c
+++ b/lapack-netlib/SRC/ztftri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztfttp.c b/lapack-netlib/SRC/ztfttp.c
index 4b5372f9e5..c206a32f5a 100644
--- a/lapack-netlib/SRC/ztfttp.c
+++ b/lapack-netlib/SRC/ztfttp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztfttr.c b/lapack-netlib/SRC/ztfttr.c
index fd4be1edc3..6bf640c0e3 100644
--- a/lapack-netlib/SRC/ztfttr.c
+++ b/lapack-netlib/SRC/ztfttr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztgevc.c b/lapack-netlib/SRC/ztgevc.c
index b9af414f8b..c804aa8bd0 100644
--- a/lapack-netlib/SRC/ztgevc.c
+++ b/lapack-netlib/SRC/ztgevc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztgex2.c b/lapack-netlib/SRC/ztgex2.c
index c11096b232..87a3fb8fe1 100644
--- a/lapack-netlib/SRC/ztgex2.c
+++ b/lapack-netlib/SRC/ztgex2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztgexc.c b/lapack-netlib/SRC/ztgexc.c
index 9b0a524a80..398b645b6f 100644
--- a/lapack-netlib/SRC/ztgexc.c
+++ b/lapack-netlib/SRC/ztgexc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztgsen.c b/lapack-netlib/SRC/ztgsen.c
index 8484a391b4..e4e3801534 100644
--- a/lapack-netlib/SRC/ztgsen.c
+++ b/lapack-netlib/SRC/ztgsen.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztgsja.c b/lapack-netlib/SRC/ztgsja.c
index e2253749f3..e1bed2af6e 100644
--- a/lapack-netlib/SRC/ztgsja.c
+++ b/lapack-netlib/SRC/ztgsja.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztgsna.c b/lapack-netlib/SRC/ztgsna.c
index 797943f449..0e5ee68d49 100644
--- a/lapack-netlib/SRC/ztgsna.c
+++ b/lapack-netlib/SRC/ztgsna.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztgsy2.c b/lapack-netlib/SRC/ztgsy2.c
index 0dab499914..63ef528e18 100644
--- a/lapack-netlib/SRC/ztgsy2.c
+++ b/lapack-netlib/SRC/ztgsy2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztgsyl.c b/lapack-netlib/SRC/ztgsyl.c
index 3b11a13acb..0f8d3ed954 100644
--- a/lapack-netlib/SRC/ztgsyl.c
+++ b/lapack-netlib/SRC/ztgsyl.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztpcon.c b/lapack-netlib/SRC/ztpcon.c
index 2224c2cef7..806b2b0c31 100644
--- a/lapack-netlib/SRC/ztpcon.c
+++ b/lapack-netlib/SRC/ztpcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztplqt.c b/lapack-netlib/SRC/ztplqt.c
index c21618cfee..9bac887e70 100644
--- a/lapack-netlib/SRC/ztplqt.c
+++ b/lapack-netlib/SRC/ztplqt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztplqt2.c b/lapack-netlib/SRC/ztplqt2.c
index ac9a4a1009..8f2abc22e7 100644
--- a/lapack-netlib/SRC/ztplqt2.c
+++ b/lapack-netlib/SRC/ztplqt2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztpmlqt.c b/lapack-netlib/SRC/ztpmlqt.c
index 10adc30cca..a917fc59e2 100644
--- a/lapack-netlib/SRC/ztpmlqt.c
+++ b/lapack-netlib/SRC/ztpmlqt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztpmqrt.c b/lapack-netlib/SRC/ztpmqrt.c
index 7118487bd3..4efc3d5a4a 100644
--- a/lapack-netlib/SRC/ztpmqrt.c
+++ b/lapack-netlib/SRC/ztpmqrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztpqrt.c b/lapack-netlib/SRC/ztpqrt.c
index ce4688f95f..f122c648f6 100644
--- a/lapack-netlib/SRC/ztpqrt.c
+++ b/lapack-netlib/SRC/ztpqrt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztpqrt2.c b/lapack-netlib/SRC/ztpqrt2.c
index 659937549a..de2431fec7 100644
--- a/lapack-netlib/SRC/ztpqrt2.c
+++ b/lapack-netlib/SRC/ztpqrt2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztprfb.c b/lapack-netlib/SRC/ztprfb.c
index 558b6e0d14..63c72a2819 100644
--- a/lapack-netlib/SRC/ztprfb.c
+++ b/lapack-netlib/SRC/ztprfb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztprfs.c b/lapack-netlib/SRC/ztprfs.c
index a979964b1d..1833cea188 100644
--- a/lapack-netlib/SRC/ztprfs.c
+++ b/lapack-netlib/SRC/ztprfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztptri.c b/lapack-netlib/SRC/ztptri.c
index 1778f4fdd4..ad8e804202 100644
--- a/lapack-netlib/SRC/ztptri.c
+++ b/lapack-netlib/SRC/ztptri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztptrs.c b/lapack-netlib/SRC/ztptrs.c
index 072b8dcd26..296218894f 100644
--- a/lapack-netlib/SRC/ztptrs.c
+++ b/lapack-netlib/SRC/ztptrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztpttf.c b/lapack-netlib/SRC/ztpttf.c
index 420fa0275f..07e6888d34 100644
--- a/lapack-netlib/SRC/ztpttf.c
+++ b/lapack-netlib/SRC/ztpttf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztpttr.c b/lapack-netlib/SRC/ztpttr.c
index 0f12558545..54b334e32a 100644
--- a/lapack-netlib/SRC/ztpttr.c
+++ b/lapack-netlib/SRC/ztpttr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztrcon.c b/lapack-netlib/SRC/ztrcon.c
index 1f5e58fe4b..dfd926a3cd 100644
--- a/lapack-netlib/SRC/ztrcon.c
+++ b/lapack-netlib/SRC/ztrcon.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztrevc.c b/lapack-netlib/SRC/ztrevc.c
index 3f1b5a96e2..5e43feed1c 100644
--- a/lapack-netlib/SRC/ztrevc.c
+++ b/lapack-netlib/SRC/ztrevc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztrevc3.c b/lapack-netlib/SRC/ztrevc3.c
index 8a4e723f8f..3b2c097a09 100644
--- a/lapack-netlib/SRC/ztrevc3.c
+++ b/lapack-netlib/SRC/ztrevc3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztrexc.c b/lapack-netlib/SRC/ztrexc.c
index aac01362c3..e47ce5cebd 100644
--- a/lapack-netlib/SRC/ztrexc.c
+++ b/lapack-netlib/SRC/ztrexc.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztrrfs.c b/lapack-netlib/SRC/ztrrfs.c
index e7b8020deb..c6767a17c4 100644
--- a/lapack-netlib/SRC/ztrrfs.c
+++ b/lapack-netlib/SRC/ztrrfs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztrsen.c b/lapack-netlib/SRC/ztrsen.c
index 117e562496..3edf169fc0 100644
--- a/lapack-netlib/SRC/ztrsen.c
+++ b/lapack-netlib/SRC/ztrsen.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztrsna.c b/lapack-netlib/SRC/ztrsna.c
index 26b8bdc0cd..ecd2158ec8 100644
--- a/lapack-netlib/SRC/ztrsna.c
+++ b/lapack-netlib/SRC/ztrsna.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztrsyl.c b/lapack-netlib/SRC/ztrsyl.c
index af8f9e761d..d2cd587709 100644
--- a/lapack-netlib/SRC/ztrsyl.c
+++ b/lapack-netlib/SRC/ztrsyl.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztrsyl3.c b/lapack-netlib/SRC/ztrsyl3.c
index 09719e1d95..48d957d493 100644
--- a/lapack-netlib/SRC/ztrsyl3.c
+++ b/lapack-netlib/SRC/ztrsyl3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -264,7 +264,7 @@ static int my_expfunc(double *x) {int e; (void)frexp(*x,&e); return e;}
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztrti2.c b/lapack-netlib/SRC/ztrti2.c
index dbd3db68ee..09160b444b 100644
--- a/lapack-netlib/SRC/ztrti2.c
+++ b/lapack-netlib/SRC/ztrti2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztrtri.c b/lapack-netlib/SRC/ztrtri.c
index be2f6acbb4..882d6473bd 100644
--- a/lapack-netlib/SRC/ztrtri.c
+++ b/lapack-netlib/SRC/ztrtri.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztrtrs.c b/lapack-netlib/SRC/ztrtrs.c
index 6d1f71a043..fbb9ed500b 100644
--- a/lapack-netlib/SRC/ztrtrs.c
+++ b/lapack-netlib/SRC/ztrtrs.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztrttf.c b/lapack-netlib/SRC/ztrttf.c
index 692e5e8450..3035fa3186 100644
--- a/lapack-netlib/SRC/ztrttf.c
+++ b/lapack-netlib/SRC/ztrttf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztrttp.c b/lapack-netlib/SRC/ztrttp.c
index 95624b1dba..86a551b431 100644
--- a/lapack-netlib/SRC/ztrttp.c
+++ b/lapack-netlib/SRC/ztrttp.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/ztzrzf.c b/lapack-netlib/SRC/ztzrzf.c
index 6d03d2d545..936c1e7aa3 100644
--- a/lapack-netlib/SRC/ztzrzf.c
+++ b/lapack-netlib/SRC/ztzrzf.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunbdb.c b/lapack-netlib/SRC/zunbdb.c
index 5d9d3541af..f0f0b6e51e 100644
--- a/lapack-netlib/SRC/zunbdb.c
+++ b/lapack-netlib/SRC/zunbdb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunbdb1.c b/lapack-netlib/SRC/zunbdb1.c
index 1759c26021..022c655206 100644
--- a/lapack-netlib/SRC/zunbdb1.c
+++ b/lapack-netlib/SRC/zunbdb1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunbdb2.c b/lapack-netlib/SRC/zunbdb2.c
index 0b0f9e6cdb..2a2144079c 100644
--- a/lapack-netlib/SRC/zunbdb2.c
+++ b/lapack-netlib/SRC/zunbdb2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunbdb3.c b/lapack-netlib/SRC/zunbdb3.c
index 4c6354a74e..f203511e67 100644
--- a/lapack-netlib/SRC/zunbdb3.c
+++ b/lapack-netlib/SRC/zunbdb3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunbdb4.c b/lapack-netlib/SRC/zunbdb4.c
index db8bb894e9..b514743bd7 100644
--- a/lapack-netlib/SRC/zunbdb4.c
+++ b/lapack-netlib/SRC/zunbdb4.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunbdb5.c b/lapack-netlib/SRC/zunbdb5.c
index c92452ad27..cd7413d59d 100644
--- a/lapack-netlib/SRC/zunbdb5.c
+++ b/lapack-netlib/SRC/zunbdb5.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunbdb6.c b/lapack-netlib/SRC/zunbdb6.c
index e68eb562b2..943df37dcb 100644
--- a/lapack-netlib/SRC/zunbdb6.c
+++ b/lapack-netlib/SRC/zunbdb6.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zuncsd.c b/lapack-netlib/SRC/zuncsd.c
index 2e8cef7993..d9c4e4d349 100644
--- a/lapack-netlib/SRC/zuncsd.c
+++ b/lapack-netlib/SRC/zuncsd.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zuncsd2by1.c b/lapack-netlib/SRC/zuncsd2by1.c
index 23b894d9ac..6771f28690 100644
--- a/lapack-netlib/SRC/zuncsd2by1.c
+++ b/lapack-netlib/SRC/zuncsd2by1.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zung2l.c b/lapack-netlib/SRC/zung2l.c
index fccecb341d..b8b67f43c0 100644
--- a/lapack-netlib/SRC/zung2l.c
+++ b/lapack-netlib/SRC/zung2l.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zung2r.c b/lapack-netlib/SRC/zung2r.c
index 75d48a91ae..fce138cf02 100644
--- a/lapack-netlib/SRC/zung2r.c
+++ b/lapack-netlib/SRC/zung2r.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zungbr.c b/lapack-netlib/SRC/zungbr.c
index 7033dc2bf8..77e73ad64a 100644
--- a/lapack-netlib/SRC/zungbr.c
+++ b/lapack-netlib/SRC/zungbr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunghr.c b/lapack-netlib/SRC/zunghr.c
index b0b60567de..93fe8c95eb 100644
--- a/lapack-netlib/SRC/zunghr.c
+++ b/lapack-netlib/SRC/zunghr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zungl2.c b/lapack-netlib/SRC/zungl2.c
index ea0fe66fc1..dd4d8bb096 100644
--- a/lapack-netlib/SRC/zungl2.c
+++ b/lapack-netlib/SRC/zungl2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunglq.c b/lapack-netlib/SRC/zunglq.c
index 2075177a72..173419e136 100644
--- a/lapack-netlib/SRC/zunglq.c
+++ b/lapack-netlib/SRC/zunglq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zungql.c b/lapack-netlib/SRC/zungql.c
index 0d5fa891f9..5b58fe3908 100644
--- a/lapack-netlib/SRC/zungql.c
+++ b/lapack-netlib/SRC/zungql.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zungqr.c b/lapack-netlib/SRC/zungqr.c
index 74c6b3cf69..66fa83f86d 100644
--- a/lapack-netlib/SRC/zungqr.c
+++ b/lapack-netlib/SRC/zungqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zungr2.c b/lapack-netlib/SRC/zungr2.c
index e527607f91..4b984c36da 100644
--- a/lapack-netlib/SRC/zungr2.c
+++ b/lapack-netlib/SRC/zungr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zungrq.c b/lapack-netlib/SRC/zungrq.c
index 03f8b67a9b..1f521e1aab 100644
--- a/lapack-netlib/SRC/zungrq.c
+++ b/lapack-netlib/SRC/zungrq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zungtr.c b/lapack-netlib/SRC/zungtr.c
index d42c84c75c..a34b750ea9 100644
--- a/lapack-netlib/SRC/zungtr.c
+++ b/lapack-netlib/SRC/zungtr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zungtsqr.c b/lapack-netlib/SRC/zungtsqr.c
index 5b49a37ceb..ef4cf3788c 100644
--- a/lapack-netlib/SRC/zungtsqr.c
+++ b/lapack-netlib/SRC/zungtsqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zungtsqr_row.c b/lapack-netlib/SRC/zungtsqr_row.c
index d23eac0ccf..a7b482fa06 100644
--- a/lapack-netlib/SRC/zungtsqr_row.c
+++ b/lapack-netlib/SRC/zungtsqr_row.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunhr_col.c b/lapack-netlib/SRC/zunhr_col.c
index 935a0c7693..646da04141 100644
--- a/lapack-netlib/SRC/zunhr_col.c
+++ b/lapack-netlib/SRC/zunhr_col.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunm22.c b/lapack-netlib/SRC/zunm22.c
index 1d07b56329..1faeb77b2e 100644
--- a/lapack-netlib/SRC/zunm22.c
+++ b/lapack-netlib/SRC/zunm22.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunm2l.c b/lapack-netlib/SRC/zunm2l.c
index 9748d4d213..2efbfc9589 100644
--- a/lapack-netlib/SRC/zunm2l.c
+++ b/lapack-netlib/SRC/zunm2l.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunm2r.c b/lapack-netlib/SRC/zunm2r.c
index 9e4e90ecb6..766dae02ec 100644
--- a/lapack-netlib/SRC/zunm2r.c
+++ b/lapack-netlib/SRC/zunm2r.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunmbr.c b/lapack-netlib/SRC/zunmbr.c
index 5fb8cbe051..8cd84a65ad 100644
--- a/lapack-netlib/SRC/zunmbr.c
+++ b/lapack-netlib/SRC/zunmbr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunmhr.c b/lapack-netlib/SRC/zunmhr.c
index 76e8aad0c9..d606c59a1f 100644
--- a/lapack-netlib/SRC/zunmhr.c
+++ b/lapack-netlib/SRC/zunmhr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunml2.c b/lapack-netlib/SRC/zunml2.c
index e4d071d292..2cd325172e 100644
--- a/lapack-netlib/SRC/zunml2.c
+++ b/lapack-netlib/SRC/zunml2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunmlq.c b/lapack-netlib/SRC/zunmlq.c
index b9e8e02626..d451c5c341 100644
--- a/lapack-netlib/SRC/zunmlq.c
+++ b/lapack-netlib/SRC/zunmlq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunmql.c b/lapack-netlib/SRC/zunmql.c
index da7c16c612..35274978a3 100644
--- a/lapack-netlib/SRC/zunmql.c
+++ b/lapack-netlib/SRC/zunmql.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunmqr.c b/lapack-netlib/SRC/zunmqr.c
index b3470b9c1d..1db1a0258e 100644
--- a/lapack-netlib/SRC/zunmqr.c
+++ b/lapack-netlib/SRC/zunmqr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunmr2.c b/lapack-netlib/SRC/zunmr2.c
index cf0cd013d4..51b1502386 100644
--- a/lapack-netlib/SRC/zunmr2.c
+++ b/lapack-netlib/SRC/zunmr2.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunmr3.c b/lapack-netlib/SRC/zunmr3.c
index 0ca68e2a52..129630a800 100644
--- a/lapack-netlib/SRC/zunmr3.c
+++ b/lapack-netlib/SRC/zunmr3.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunmrq.c b/lapack-netlib/SRC/zunmrq.c
index 30ccf40df2..3206e74052 100644
--- a/lapack-netlib/SRC/zunmrq.c
+++ b/lapack-netlib/SRC/zunmrq.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunmrz.c b/lapack-netlib/SRC/zunmrz.c
index 728db22d0e..d41b9085cb 100644
--- a/lapack-netlib/SRC/zunmrz.c
+++ b/lapack-netlib/SRC/zunmrz.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zunmtr.c b/lapack-netlib/SRC/zunmtr.c
index 55b93d3348..520370cb32 100644
--- a/lapack-netlib/SRC/zunmtr.c
+++ b/lapack-netlib/SRC/zunmtr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zupgtr.c b/lapack-netlib/SRC/zupgtr.c
index 671de3e58c..6cb7c70b02 100644
--- a/lapack-netlib/SRC/zupgtr.c
+++ b/lapack-netlib/SRC/zupgtr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/SRC/zupmtr.c b/lapack-netlib/SRC/zupmtr.c
index 2a67a791b7..a51d54620e 100644
--- a/lapack-netlib/SRC/zupmtr.c
+++ b/lapack-netlib/SRC/zupmtr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -260,7 +260,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
diff --git a/lapack-netlib/TESTING/LIN/cchkqp3rk.f b/lapack-netlib/TESTING/LIN/cchkqp3rk.f
index 79d6add72e..b794d4664c 100644
--- a/lapack-netlib/TESTING/LIN/cchkqp3rk.f
+++ b/lapack-netlib/TESTING/LIN/cchkqp3rk.f
@@ -608,6 +608,9 @@ SUBROUTINE CCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
CALL CLACPY( 'All', M, NRHS, COPYB, LDA,
$ B, LDA )
CALL ICOPY( N, IWORK( 1 ), 1, IWORK( N+1 ), 1 )
+ DO I = 1, NTESTS
+ RESULT( I ) = ZERO
+ END DO
*
ABSTOL = -1.0
RELTOl = -1.0
@@ -652,16 +655,6 @@ SUBROUTINE CCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
RESULT( 1 ) = CQRT12( M, N, A, LDA, S, WORK,
$ LWORK , RWORK )
*
- DO T = 1, 1
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'CGEQP3RK', M, N,
- $ NRHS, KMAX, ABSTOL, RELTOL, NB, NX,
- $ IMAT, T, RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
NRUN = NRUN + 1
*
* End test 1
@@ -675,7 +668,7 @@ SUBROUTINE CCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
* 1-norm( A*P - Q*R ) / ( max(M,N) * 1-norm(A) * EPS )
*
RESULT( 2 ) = CQPT01( M, N, KFACT, COPYA, A, LDA, TAU,
- $ IWORK( N+1 ), WORK, LWORK )
+ $ IWORK( N+1 ), WORK, LWORK )
*
* Compute test 3:
*
@@ -684,21 +677,8 @@ SUBROUTINE CCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
* 1-norm( Q**T * Q - I ) / ( M * EPS )
*
RESULT( 3 ) = CQRT11( M, KFACT, A, LDA, TAU, WORK,
- $ LWORK )
+ $ LWORK )
*
-* Print information about the tests that did not pass
-* the threshold.
-*
- DO T = 2, 3
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'CGEQP3RK', M, N,
- $ NRHS, KMAX, ABSTOL, RELTOL,
- $ NB, NX, IMAT, T, RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
NRUN = NRUN + 2
*
* Compute test 4:
@@ -717,8 +697,8 @@ SUBROUTINE CCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
*
DO J = 1, KFACT-1, 1
*
- DTEMP = (( ABS( A( (J-1)*M+J ) ) -
- $ ABS( A( (J)*M+J+1 ) ) ) /
+ DTEMP = (( ABS( A( (J-1)*LDA+J ) ) -
+ $ ABS( A( (J)*LDA+J+1 ) ) ) /
$ ABS( A(1) ) )
*
IF( DTEMP.LT.ZERO ) THEN
@@ -727,20 +707,6 @@ SUBROUTINE CCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
*
END DO
*
-* Print information about the tests that did not
-* pass the threshold.
-*
- DO T = 4, 4
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'CGEQP3RK',
- $ M, N, NRHS, KMAX, ABSTOL, RELTOL,
- $ NB, NX, IMAT, T,
- $ RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
NRUN = NRUN + 1
*
* End test 4.
@@ -762,42 +728,41 @@ SUBROUTINE CCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
*
LWORK_MQR = MAX(1, NRHS)
CALL CUNMQR( 'Left', 'Conjugate transpose',
- $ M, NRHS, KFACT, A, LDA, TAU, B, LDA,
- $ WORK, LWORK_MQR, INFO )
+ $ M, NRHS, KFACT, A, LDA, TAU, B, LDA,
+ $ WORK, LWORK_MQR, INFO )
*
DO I = 1, NRHS
*
* Compare N+J-th column of A and J-column of B.
*
CALL CAXPY( M, -CONE, A( ( N+I-1 )*LDA+1 ), 1,
- $ B( ( I-1 )*LDA+1 ), 1 )
+ $ B( ( I-1 )*LDA+1 ), 1 )
END DO
*
- RESULT( 5 ) =
- $ ABS(
- $ CLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) /
- $ ( REAL( M )*SLAMCH( 'Epsilon' ) )
- $ )
-*
-* Print information about the tests that did not pass
-* the threshold.
-*
- DO T = 5, 5
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'CGEQP3RK', M, N,
- $ NRHS, KMAX, ABSTOL, RELTOL,
- $ NB, NX, IMAT, T, RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
+ RESULT( 5 ) = ABS(
+ $ CLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) /
+ $ ( REAL( M )*SLAMCH( 'Epsilon' ) ) )
+*
NRUN = NRUN + 1
*
* End compute test 5.
*
END IF
*
+* Print information about the tests that did not pass
+* the threshold.
+*
+ DO T = 1, NTESTS
+ IF( RESULT( T ).GE.THRESH ) THEN
+ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+ $ CALL ALAHD( NOUT, PATH )
+ WRITE( NOUT, FMT = 9999 ) 'CGEQP3RK', M, N,
+ $ NRHS, KMAX, ABSTOL, RELTOL,
+ $ NB, NX, IMAT, T, RESULT( T )
+ NFAIL = NFAIL + 1
+ END IF
+ END DO
+*
* END DO KMAX = 1, MIN(M,N)+1
*
END DO
diff --git a/lapack-netlib/TESTING/LIN/dchkqp3rk.f b/lapack-netlib/TESTING/LIN/dchkqp3rk.f
index 434d2067e2..5046e50a98 100644
--- a/lapack-netlib/TESTING/LIN/dchkqp3rk.f
+++ b/lapack-netlib/TESTING/LIN/dchkqp3rk.f
@@ -605,6 +605,9 @@ SUBROUTINE DCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
CALL DLACPY( 'All', M, NRHS, COPYB, LDA,
$ B, LDA )
CALL ICOPY( N, IWORK( 1 ), 1, IWORK( N+1 ), 1 )
+ DO I = 1, NTESTS
+ RESULT( I ) = ZERO
+ END DO
*
ABSTOL = -1.0
RELTOL = -1.0
@@ -648,16 +651,6 @@ SUBROUTINE DCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
RESULT( 1 ) = DQRT12( M, N, A, LDA, S, WORK,
$ LWORK )
*
- DO T = 1, 1
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'DGEQP3RK', M, N,
- $ NRHS, KMAX, ABSTOL, RELTOL, NB, NX,
- $ IMAT, T, RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
NRUN = NRUN + 1
*
* End test 1
@@ -671,7 +664,7 @@ SUBROUTINE DCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
* 1-norm( A*P - Q*R ) / ( max(M,N) * 1-norm(A) * EPS )
*
RESULT( 2 ) = DQPT01( M, N, KFACT, COPYA, A, LDA, TAU,
- $ IWORK( N+1 ), WORK, LWORK )
+ $ IWORK( N+1 ), WORK, LWORK )
*
* Compute test 3:
*
@@ -680,21 +673,8 @@ SUBROUTINE DCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
* 1-norm( Q**T * Q - I ) / ( M * EPS )
*
RESULT( 3 ) = DQRT11( M, KFACT, A, LDA, TAU, WORK,
- $ LWORK )
-*
-* Print information about the tests that did not pass
-* the threshold.
+ $ LWORK )
*
- DO T = 2, 3
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'DGEQP3RK', M, N,
- $ NRHS, KMAX, ABSTOL, RELTOL,
- $ NB, NX, IMAT, T, RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
NRUN = NRUN + 2
*
* Compute test 4:
@@ -713,8 +693,8 @@ SUBROUTINE DCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
*
DO J = 1, KFACT-1, 1
- DTEMP = (( ABS( A( (J-1)*M+J ) ) -
- $ ABS( A( (J)*M+J+1 ) ) ) /
+ DTEMP = (( ABS( A( (J-1)*LDA+J ) ) -
+ $ ABS( A( (J)*LDA+J+1 ) ) ) /
$ ABS( A(1) ) )
*
IF( DTEMP.LT.ZERO ) THEN
@@ -723,20 +703,6 @@ SUBROUTINE DCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
*
END DO
*
-* Print information about the tests that did not
-* pass the threshold.
-*
- DO T = 4, 4
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'DGEQP3RK',
- $ M, N, NRHS, KMAX, ABSTOL, RELTOL,
- $ NB, NX, IMAT, T,
- $ RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
NRUN = NRUN + 1
*
* End test 4.
@@ -758,42 +724,41 @@ SUBROUTINE DCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
*
LWORK_MQR = MAX(1, NRHS)
CALL DORMQR( 'Left', 'Transpose',
- $ M, NRHS, KFACT, A, LDA, TAU, B, LDA,
- $ WORK, LWORK_MQR, INFO )
+ $ M, NRHS, KFACT, A, LDA, TAU, B, LDA,
+ $ WORK, LWORK_MQR, INFO )
*
DO I = 1, NRHS
*
* Compare N+J-th column of A and J-column of B.
*
CALL DAXPY( M, -ONE, A( ( N+I-1 )*LDA+1 ), 1,
- $ B( ( I-1 )*LDA+1 ), 1 )
+ $ B( ( I-1 )*LDA+1 ), 1 )
END DO
*
- RESULT( 5 ) =
- $ ABS(
- $ DLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) /
- $ ( DBLE( M )*DLAMCH( 'Epsilon' ) )
- $ )
-*
-* Print information about the tests that did not pass
-* the threshold.
-*
- DO T = 5, 5
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'DGEQP3RK', M, N,
- $ NRHS, KMAX, ABSTOL, RELTOL,
- $ NB, NX, IMAT, T, RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
+ RESULT( 5 ) = ABS(
+ $ DLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) /
+ $ ( DBLE( M )*DLAMCH( 'Epsilon' ) ) )
+*
NRUN = NRUN + 1
*
* End compute test 5.
*
END IF
*
+* Print information about the tests that did not
+* pass the threshold.
+*
+ DO T = 1, NTESTS
+ IF( RESULT( T ).GE.THRESH ) THEN
+ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+ $ CALL ALAHD( NOUT, PATH )
+ WRITE( NOUT, FMT = 9999 ) 'DGEQP3RK', M, N,
+ $ NRHS, KMAX, ABSTOL, RELTOL, NB, NX,
+ $ IMAT, T, RESULT( T )
+ NFAIL = NFAIL + 1
+ END IF
+ END DO
+*
* END DO KMAX = 1, MIN(M,N)+1
*
END DO
diff --git a/lapack-netlib/TESTING/LIN/schkqp3rk.f b/lapack-netlib/TESTING/LIN/schkqp3rk.f
index 36cf9370ea..c5ce7ff609 100644
--- a/lapack-netlib/TESTING/LIN/schkqp3rk.f
+++ b/lapack-netlib/TESTING/LIN/schkqp3rk.f
@@ -604,6 +604,9 @@ SUBROUTINE SCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
CALL SLACPY( 'All', M, NRHS, COPYB, LDA,
$ B, LDA )
CALL ICOPY( N, IWORK( 1 ), 1, IWORK( N+1 ), 1 )
+ DO I = 1, NTESTS
+ RESULT( I ) = ZERO
+ END DO
*
ABSTOL = -1.0
RELTOL = -1.0
@@ -647,16 +650,6 @@ SUBROUTINE SCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
RESULT( 1 ) = SQRT12( M, N, A, LDA, S, WORK,
$ LWORK )
*
- DO T = 1, 1
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'SGEQP3RK', M, N,
- $ NRHS, KMAX, ABSTOL, RELTOL, NB, NX,
- $ IMAT, T, RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
NRUN = NRUN + 1
*
* End test 1
@@ -670,7 +663,7 @@ SUBROUTINE SCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
* 1-norm( A*P - Q*R ) / ( max(M,N) * 1-norm(A) * EPS )
*
RESULT( 2 ) = SQPT01( M, N, KFACT, COPYA, A, LDA, TAU,
- $ IWORK( N+1 ), WORK, LWORK )
+ $ IWORK( N+1 ), WORK, LWORK )
*
* Compute test 3:
*
@@ -679,21 +672,8 @@ SUBROUTINE SCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
* 1-norm( Q**T * Q - I ) / ( M * EPS )
*
RESULT( 3 ) = SQRT11( M, KFACT, A, LDA, TAU, WORK,
- $ LWORK )
+ $ LWORK )
*
-* Print information about the tests that did not pass
-* the threshold.
-*
- DO T = 2, 3
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'SGEQP3RK', M, N,
- $ NRHS, KMAX, ABSTOL, RELTOL,
- $ NB, NX, IMAT, T, RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
NRUN = NRUN + 2
*
* Compute test 4:
@@ -712,8 +692,8 @@ SUBROUTINE SCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
*
DO J = 1, KFACT-1, 1
- DTEMP = (( ABS( A( (J-1)*M+J ) ) -
- $ ABS( A( (J)*M+J+1 ) ) ) /
+ DTEMP = (( ABS( A( (J-1)*LDA+J ) ) -
+ $ ABS( A( (J)*LDA+J+1 ) ) ) /
$ ABS( A(1) ) )
*
IF( DTEMP.LT.ZERO ) THEN
@@ -722,20 +702,6 @@ SUBROUTINE SCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
*
END DO
*
-* Print information about the tests that did not
-* pass the threshold.
-*
- DO T = 4, 4
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'SGEQP3RK',
- $ M, N, NRHS, KMAX, ABSTOL, RELTOL,
- $ NB, NX, IMAT, T,
- $ RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
NRUN = NRUN + 1
*
* End test 4.
@@ -757,42 +723,41 @@ SUBROUTINE SCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
*
LWORK_MQR = MAX(1, NRHS)
CALL SORMQR( 'Left', 'Transpose',
- $ M, NRHS, KFACT, A, LDA, TAU, B, LDA,
- $ WORK, LWORK_MQR, INFO )
+ $ M, NRHS, KFACT, A, LDA, TAU, B, LDA,
+ $ WORK, LWORK_MQR, INFO )
*
DO I = 1, NRHS
*
* Compare N+J-th column of A and J-column of B.
*
CALL SAXPY( M, -ONE, A( ( N+I-1 )*LDA+1 ), 1,
- $ B( ( I-1 )*LDA+1 ), 1 )
+ $ B( ( I-1 )*LDA+1 ), 1 )
END DO
*
- RESULT( 5 ) =
- $ ABS(
- $ SLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) /
- $ ( REAL( M )*SLAMCH( 'Epsilon' ) )
- $ )
-*
-* Print information about the tests that did not pass
-* the threshold.
-*
- DO T = 5, 5
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'SGEQP3RK', M, N,
- $ NRHS, KMAX, ABSTOL, RELTOL,
- $ NB, NX, IMAT, T, RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
+ RESULT( 5 ) = ABS(
+ $ SLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) /
+ $ ( REAL( M )*SLAMCH( 'Epsilon' ) ) )
+*
NRUN = NRUN + 1
*
* End compute test 5.
*
END IF
*
+* Print information about the tests that did not pass
+* the threshold.
+*
+ DO T = 1, NTESTS
+ IF( RESULT( T ).GE.THRESH ) THEN
+ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+ $ CALL ALAHD( NOUT, PATH )
+ WRITE( NOUT, FMT = 9999 ) 'SGEQP3RK', M, N,
+ $ NRHS, KMAX, ABSTOL, RELTOL,
+ $ NB, NX, IMAT, T, RESULT( T )
+ NFAIL = NFAIL + 1
+ END IF
+ END DO
+*
* END DO KMAX = 1, MIN(M,N)+1
*
END DO
diff --git a/lapack-netlib/TESTING/LIN/zchkqp3rk.f b/lapack-netlib/TESTING/LIN/zchkqp3rk.f
index 302c7b1a87..5092058837 100644
--- a/lapack-netlib/TESTING/LIN/zchkqp3rk.f
+++ b/lapack-netlib/TESTING/LIN/zchkqp3rk.f
@@ -608,6 +608,9 @@ SUBROUTINE ZCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
CALL ZLACPY( 'All', M, NRHS, COPYB, LDA,
$ B, LDA )
CALL ICOPY( N, IWORK( 1 ), 1, IWORK( N+1 ), 1 )
+ DO I = 1, NTESTS
+ RESULT( I ) = ZERO
+ END DO
*
ABSTOL = -1.0
RELTOl = -1.0
@@ -652,16 +655,6 @@ SUBROUTINE ZCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
RESULT( 1 ) = ZQRT12( M, N, A, LDA, S, WORK,
$ LWORK , RWORK )
*
- DO T = 1, 1
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'ZGEQP3RK', M, N,
- $ NRHS, KMAX, ABSTOL, RELTOL, NB, NX,
- $ IMAT, T, RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
NRUN = NRUN + 1
*
* End test 1
@@ -675,7 +668,7 @@ SUBROUTINE ZCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
* 1-norm( A*P - Q*R ) / ( max(M,N) * 1-norm(A) * EPS )
*
RESULT( 2 ) = ZQPT01( M, N, KFACT, COPYA, A, LDA, TAU,
- $ IWORK( N+1 ), WORK, LWORK )
+ $ IWORK( N+1 ), WORK, LWORK )
*
* Compute test 3:
*
@@ -684,21 +677,8 @@ SUBROUTINE ZCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
* 1-norm( Q**T * Q - I ) / ( M * EPS )
*
RESULT( 3 ) = ZQRT11( M, KFACT, A, LDA, TAU, WORK,
- $ LWORK )
+ $ LWORK )
*
-* Print information about the tests that did not pass
-* the threshold.
-*
- DO T = 2, 3
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'ZGEQP3RK', M, N,
- $ NRHS, KMAX, ABSTOL, RELTOL,
- $ NB, NX, IMAT, T, RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
NRUN = NRUN + 2
*
* Compute test 4:
@@ -717,8 +697,8 @@ SUBROUTINE ZCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
*
DO J = 1, KFACT-1, 1
*
- DTEMP = (( ABS( A( (J-1)*M+J ) ) -
- $ ABS( A( (J)*M+J+1 ) ) ) /
+ DTEMP = (( ABS( A( (J-1)*LDA+J ) ) -
+ $ ABS( A( (J)*LDA+J+1 ) ) ) /
$ ABS( A(1) ) )
*
IF( DTEMP.LT.ZERO ) THEN
@@ -727,20 +707,6 @@ SUBROUTINE ZCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
*
END DO
*
-* Print information about the tests that did not
-* pass the threshold.
-*
- DO T = 4, 4
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'ZGEQP3RK',
- $ M, N, NRHS, KMAX, ABSTOL, RELTOL,
- $ NB, NX, IMAT, T,
- $ RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
NRUN = NRUN + 1
*
* End test 4.
@@ -762,42 +728,41 @@ SUBROUTINE ZCHKQP3RK( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL,
*
LWORK_MQR = MAX(1, NRHS)
CALL ZUNMQR( 'Left', 'Conjugate transpose',
- $ M, NRHS, KFACT, A, LDA, TAU, B, LDA,
- $ WORK, LWORK_MQR, INFO )
+ $ M, NRHS, KFACT, A, LDA, TAU, B, LDA,
+ $ WORK, LWORK_MQR, INFO )
*
DO I = 1, NRHS
*
* Compare N+J-th column of A and J-column of B.
*
CALL ZAXPY( M, -CONE, A( ( N+I-1 )*LDA+1 ), 1,
- $ B( ( I-1 )*LDA+1 ), 1 )
+ $ B( ( I-1 )*LDA+1 ), 1 )
END DO
*
- RESULT( 5 ) =
- $ ABS(
- $ ZLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) /
- $ ( DBLE( M )*DLAMCH( 'Epsilon' ) )
- $ )
-*
-* Print information about the tests that did not pass
-* the threshold.
-*
- DO T = 5, 5
- IF( RESULT( T ).GE.THRESH ) THEN
- IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
- $ CALL ALAHD( NOUT, PATH )
- WRITE( NOUT, FMT = 9999 ) 'ZGEQP3RK', M, N,
- $ NRHS, KMAX, ABSTOL, RELTOL,
- $ NB, NX, IMAT, T, RESULT( T )
- NFAIL = NFAIL + 1
- END IF
- END DO
+ RESULT( 5 ) = ABS(
+ $ ZLANGE( 'One-norm', M, NRHS, B, LDA, RDUMMY ) /
+ $ ( DBLE( M )*DLAMCH( 'Epsilon' ) ) )
+*
NRUN = NRUN + 1
*
* End compute test 5.
*
END IF
*
+* Print information about the tests that did not pass
+* the threshold.
+*
+ DO T = 1, NTESTS
+ IF( RESULT( T ).GE.THRESH ) THEN
+ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+ $ CALL ALAHD( NOUT, PATH )
+ WRITE( NOUT, FMT = 9999 ) 'ZGEQP3RK', M, N,
+ $ NRHS, KMAX, ABSTOL, RELTOL,
+ $ NB, NX, IMAT, T, RESULT( T )
+ NFAIL = NFAIL + 1
+ END IF
+ END DO
+*
* END DO KMAX = 1, MIN(M,N)+1
*
END DO
diff --git a/lapack-netlib/TESTING/MATGEN/clagge.c b/lapack-netlib/TESTING/MATGEN/clagge.c
index 62c33d01ed..82c4e57068 100644
--- a/lapack-netlib/TESTING/MATGEN/clagge.c
+++ b/lapack-netlib/TESTING/MATGEN/clagge.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/claghe.c b/lapack-netlib/TESTING/MATGEN/claghe.c
index 009329dd83..2696de72d9 100644
--- a/lapack-netlib/TESTING/MATGEN/claghe.c
+++ b/lapack-netlib/TESTING/MATGEN/claghe.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/clagsy.c b/lapack-netlib/TESTING/MATGEN/clagsy.c
index 5117f85db8..1921a1c904 100644
--- a/lapack-netlib/TESTING/MATGEN/clagsy.c
+++ b/lapack-netlib/TESTING/MATGEN/clagsy.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/clahilb.c b/lapack-netlib/TESTING/MATGEN/clahilb.c
index 1ee293c6f5..e20f928cb6 100644
--- a/lapack-netlib/TESTING/MATGEN/clahilb.c
+++ b/lapack-netlib/TESTING/MATGEN/clahilb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/clakf2.c b/lapack-netlib/TESTING/MATGEN/clakf2.c
index 2b1b4e9053..2964aa0c2a 100644
--- a/lapack-netlib/TESTING/MATGEN/clakf2.c
+++ b/lapack-netlib/TESTING/MATGEN/clakf2.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/clarge.c b/lapack-netlib/TESTING/MATGEN/clarge.c
index 25801da89e..25a4a2f014 100644
--- a/lapack-netlib/TESTING/MATGEN/clarge.c
+++ b/lapack-netlib/TESTING/MATGEN/clarge.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/clarnd.c b/lapack-netlib/TESTING/MATGEN/clarnd.c
index 26a22a3e0c..745f1865ee 100644
--- a/lapack-netlib/TESTING/MATGEN/clarnd.c
+++ b/lapack-netlib/TESTING/MATGEN/clarnd.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* > \brief \b CLARND */
diff --git a/lapack-netlib/TESTING/MATGEN/claror.c b/lapack-netlib/TESTING/MATGEN/claror.c
index b0d73f37cd..b09b8c729c 100644
--- a/lapack-netlib/TESTING/MATGEN/claror.c
+++ b/lapack-netlib/TESTING/MATGEN/claror.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/clarot.c b/lapack-netlib/TESTING/MATGEN/clarot.c
index bd5f01cd3d..7fd602ee4f 100644
--- a/lapack-netlib/TESTING/MATGEN/clarot.c
+++ b/lapack-netlib/TESTING/MATGEN/clarot.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/clatm1.c b/lapack-netlib/TESTING/MATGEN/clatm1.c
index 2651091c82..6387553022 100644
--- a/lapack-netlib/TESTING/MATGEN/clatm1.c
+++ b/lapack-netlib/TESTING/MATGEN/clatm1.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
static float spow_ui(float x, integer n) {
float pow=1.0; unsigned long int u;
diff --git a/lapack-netlib/TESTING/MATGEN/clatm2.c b/lapack-netlib/TESTING/MATGEN/clatm2.c
index 2dceff4971..92717b2fef 100644
--- a/lapack-netlib/TESTING/MATGEN/clatm2.c
+++ b/lapack-netlib/TESTING/MATGEN/clatm2.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* > \brief \b CLATM2 */
diff --git a/lapack-netlib/TESTING/MATGEN/clatm3.c b/lapack-netlib/TESTING/MATGEN/clatm3.c
index fcd8dbfcb0..997a980072 100644
--- a/lapack-netlib/TESTING/MATGEN/clatm3.c
+++ b/lapack-netlib/TESTING/MATGEN/clatm3.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* > \brief \b CLATM3 */
diff --git a/lapack-netlib/TESTING/MATGEN/clatm5.c b/lapack-netlib/TESTING/MATGEN/clatm5.c
index 8fbc1c0a62..3cdfbc7d57 100644
--- a/lapack-netlib/TESTING/MATGEN/clatm5.c
+++ b/lapack-netlib/TESTING/MATGEN/clatm5.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/clatm6.c b/lapack-netlib/TESTING/MATGEN/clatm6.c
index f6992a3625..cdb79cc52b 100644
--- a/lapack-netlib/TESTING/MATGEN/clatm6.c
+++ b/lapack-netlib/TESTING/MATGEN/clatm6.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/clatme.c b/lapack-netlib/TESTING/MATGEN/clatme.c
index fd0aec8ec6..572b7c6072 100644
--- a/lapack-netlib/TESTING/MATGEN/clatme.c
+++ b/lapack-netlib/TESTING/MATGEN/clatme.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/clatmr.c b/lapack-netlib/TESTING/MATGEN/clatmr.c
index 2f987f7443..9ecbb802f3 100644
--- a/lapack-netlib/TESTING/MATGEN/clatmr.c
+++ b/lapack-netlib/TESTING/MATGEN/clatmr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/clatms.c b/lapack-netlib/TESTING/MATGEN/clatms.c
index 006b33b7a3..a20825e02e 100644
--- a/lapack-netlib/TESTING/MATGEN/clatms.c
+++ b/lapack-netlib/TESTING/MATGEN/clatms.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/clatmt.c b/lapack-netlib/TESTING/MATGEN/clatmt.c
index f6a8428618..3abf958c7a 100644
--- a/lapack-netlib/TESTING/MATGEN/clatmt.c
+++ b/lapack-netlib/TESTING/MATGEN/clatmt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/dlagge.c b/lapack-netlib/TESTING/MATGEN/dlagge.c
index 5482c3ff6d..7f50ea8793 100644
--- a/lapack-netlib/TESTING/MATGEN/dlagge.c
+++ b/lapack-netlib/TESTING/MATGEN/dlagge.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/dlagsy.c b/lapack-netlib/TESTING/MATGEN/dlagsy.c
index efcbe3f998..9665e54431 100644
--- a/lapack-netlib/TESTING/MATGEN/dlagsy.c
+++ b/lapack-netlib/TESTING/MATGEN/dlagsy.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/dlahilb.c b/lapack-netlib/TESTING/MATGEN/dlahilb.c
index d671adee6a..2ab0aae05e 100644
--- a/lapack-netlib/TESTING/MATGEN/dlahilb.c
+++ b/lapack-netlib/TESTING/MATGEN/dlahilb.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/dlakf2.c b/lapack-netlib/TESTING/MATGEN/dlakf2.c
index b4a09204ba..6103ead635 100644
--- a/lapack-netlib/TESTING/MATGEN/dlakf2.c
+++ b/lapack-netlib/TESTING/MATGEN/dlakf2.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/dlaran.c b/lapack-netlib/TESTING/MATGEN/dlaran.c
index f13ada8340..1fa9579393 100644
--- a/lapack-netlib/TESTING/MATGEN/dlaran.c
+++ b/lapack-netlib/TESTING/MATGEN/dlaran.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* > \brief \b DLARAN */
diff --git a/lapack-netlib/TESTING/MATGEN/dlarge.c b/lapack-netlib/TESTING/MATGEN/dlarge.c
index 5cc7fbce85..7d3761383d 100644
--- a/lapack-netlib/TESTING/MATGEN/dlarge.c
+++ b/lapack-netlib/TESTING/MATGEN/dlarge.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/dlarnd.c b/lapack-netlib/TESTING/MATGEN/dlarnd.c
index 3119097bf7..0e6c33521e 100644
--- a/lapack-netlib/TESTING/MATGEN/dlarnd.c
+++ b/lapack-netlib/TESTING/MATGEN/dlarnd.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* > \brief \b DLARND */
diff --git a/lapack-netlib/TESTING/MATGEN/dlaror.c b/lapack-netlib/TESTING/MATGEN/dlaror.c
index fdd126174c..baad70256b 100644
--- a/lapack-netlib/TESTING/MATGEN/dlaror.c
+++ b/lapack-netlib/TESTING/MATGEN/dlaror.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/dlarot.c b/lapack-netlib/TESTING/MATGEN/dlarot.c
index 3eadf15c62..c858e7596b 100644
--- a/lapack-netlib/TESTING/MATGEN/dlarot.c
+++ b/lapack-netlib/TESTING/MATGEN/dlarot.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/dlatm1.c b/lapack-netlib/TESTING/MATGEN/dlatm1.c
index aa58300a36..86f1cd2b92 100644
--- a/lapack-netlib/TESTING/MATGEN/dlatm1.c
+++ b/lapack-netlib/TESTING/MATGEN/dlatm1.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
static double dpow_ui(double x, integer n) {
double pow=1.0; unsigned long int u;
diff --git a/lapack-netlib/TESTING/MATGEN/dlatm2.c b/lapack-netlib/TESTING/MATGEN/dlatm2.c
index 7491e98298..081e906149 100644
--- a/lapack-netlib/TESTING/MATGEN/dlatm2.c
+++ b/lapack-netlib/TESTING/MATGEN/dlatm2.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* > \brief \b DLATM2 */
diff --git a/lapack-netlib/TESTING/MATGEN/dlatm3.c b/lapack-netlib/TESTING/MATGEN/dlatm3.c
index a9d26c7fcd..bf4b54a458 100644
--- a/lapack-netlib/TESTING/MATGEN/dlatm3.c
+++ b/lapack-netlib/TESTING/MATGEN/dlatm3.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* > \brief \b DLATM3 */
diff --git a/lapack-netlib/TESTING/MATGEN/dlatm5.c b/lapack-netlib/TESTING/MATGEN/dlatm5.c
index 7f1c364288..441050cc35 100644
--- a/lapack-netlib/TESTING/MATGEN/dlatm5.c
+++ b/lapack-netlib/TESTING/MATGEN/dlatm5.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/dlatm6.c b/lapack-netlib/TESTING/MATGEN/dlatm6.c
index 0b3fbb42fd..f32a41113c 100644
--- a/lapack-netlib/TESTING/MATGEN/dlatm6.c
+++ b/lapack-netlib/TESTING/MATGEN/dlatm6.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/dlatm7.c b/lapack-netlib/TESTING/MATGEN/dlatm7.c
index c907feff44..159c4c0241 100644
--- a/lapack-netlib/TESTING/MATGEN/dlatm7.c
+++ b/lapack-netlib/TESTING/MATGEN/dlatm7.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
static double dpow_ui(double x, integer n) {
double pow=1.0; unsigned long int u;
diff --git a/lapack-netlib/TESTING/MATGEN/dlatme.c b/lapack-netlib/TESTING/MATGEN/dlatme.c
index e29df164c8..c5c6475081 100644
--- a/lapack-netlib/TESTING/MATGEN/dlatme.c
+++ b/lapack-netlib/TESTING/MATGEN/dlatme.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/dlatmr.c b/lapack-netlib/TESTING/MATGEN/dlatmr.c
index 77e2248402..f054e98718 100644
--- a/lapack-netlib/TESTING/MATGEN/dlatmr.c
+++ b/lapack-netlib/TESTING/MATGEN/dlatmr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/dlatms.c b/lapack-netlib/TESTING/MATGEN/dlatms.c
index c9a8b226ea..6d92e1cf78 100644
--- a/lapack-netlib/TESTING/MATGEN/dlatms.c
+++ b/lapack-netlib/TESTING/MATGEN/dlatms.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/dlatmt.c b/lapack-netlib/TESTING/MATGEN/dlatmt.c
index 6b0871257c..5717e25754 100644
--- a/lapack-netlib/TESTING/MATGEN/dlatmt.c
+++ b/lapack-netlib/TESTING/MATGEN/dlatmt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/slagge.c b/lapack-netlib/TESTING/MATGEN/slagge.c
index 9213d96887..1edeadf6e6 100644
--- a/lapack-netlib/TESTING/MATGEN/slagge.c
+++ b/lapack-netlib/TESTING/MATGEN/slagge.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/slagsy.c b/lapack-netlib/TESTING/MATGEN/slagsy.c
index fad4cf5fae..9e58b6822c 100644
--- a/lapack-netlib/TESTING/MATGEN/slagsy.c
+++ b/lapack-netlib/TESTING/MATGEN/slagsy.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/slahilb.c b/lapack-netlib/TESTING/MATGEN/slahilb.c
index 7367d71a27..75a73ee0eb 100644
--- a/lapack-netlib/TESTING/MATGEN/slahilb.c
+++ b/lapack-netlib/TESTING/MATGEN/slahilb.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/slakf2.c b/lapack-netlib/TESTING/MATGEN/slakf2.c
index 388d630e10..e4fa51c5db 100644
--- a/lapack-netlib/TESTING/MATGEN/slakf2.c
+++ b/lapack-netlib/TESTING/MATGEN/slakf2.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/slaran.c b/lapack-netlib/TESTING/MATGEN/slaran.c
index af9b564128..4213d18fce 100644
--- a/lapack-netlib/TESTING/MATGEN/slaran.c
+++ b/lapack-netlib/TESTING/MATGEN/slaran.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* > \brief \b SLARAN */
diff --git a/lapack-netlib/TESTING/MATGEN/slarge.c b/lapack-netlib/TESTING/MATGEN/slarge.c
index d5fbd541c4..a984d6112c 100644
--- a/lapack-netlib/TESTING/MATGEN/slarge.c
+++ b/lapack-netlib/TESTING/MATGEN/slarge.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/slarnd.c b/lapack-netlib/TESTING/MATGEN/slarnd.c
index eabfa13c01..4c36a6570b 100644
--- a/lapack-netlib/TESTING/MATGEN/slarnd.c
+++ b/lapack-netlib/TESTING/MATGEN/slarnd.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* > \brief \b SLARND */
diff --git a/lapack-netlib/TESTING/MATGEN/slaror.c b/lapack-netlib/TESTING/MATGEN/slaror.c
index 7e3065432c..ed48b21502 100644
--- a/lapack-netlib/TESTING/MATGEN/slaror.c
+++ b/lapack-netlib/TESTING/MATGEN/slaror.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/slarot.c b/lapack-netlib/TESTING/MATGEN/slarot.c
index 8d2f51f928..91f72ff2d2 100644
--- a/lapack-netlib/TESTING/MATGEN/slarot.c
+++ b/lapack-netlib/TESTING/MATGEN/slarot.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/slatm1.c b/lapack-netlib/TESTING/MATGEN/slatm1.c
index 8acbdfa3e7..6399d5ffb8 100644
--- a/lapack-netlib/TESTING/MATGEN/slatm1.c
+++ b/lapack-netlib/TESTING/MATGEN/slatm1.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
static float spow_ui(float x, integer n) {
float pow=1.0; unsigned long int u;
diff --git a/lapack-netlib/TESTING/MATGEN/slatm2.c b/lapack-netlib/TESTING/MATGEN/slatm2.c
index 833ee5dea3..538b441bcd 100644
--- a/lapack-netlib/TESTING/MATGEN/slatm2.c
+++ b/lapack-netlib/TESTING/MATGEN/slatm2.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -260,7 +257,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* > \brief \b SLATM2 */
diff --git a/lapack-netlib/TESTING/MATGEN/slatm3.c b/lapack-netlib/TESTING/MATGEN/slatm3.c
index cdf96ef518..92649f3b8a 100644
--- a/lapack-netlib/TESTING/MATGEN/slatm3.c
+++ b/lapack-netlib/TESTING/MATGEN/slatm3.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* > \brief \b SLATM3 */
diff --git a/lapack-netlib/TESTING/MATGEN/slatm5.c b/lapack-netlib/TESTING/MATGEN/slatm5.c
index 9122bc0414..a7e059ca58 100644
--- a/lapack-netlib/TESTING/MATGEN/slatm5.c
+++ b/lapack-netlib/TESTING/MATGEN/slatm5.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/slatm6.c b/lapack-netlib/TESTING/MATGEN/slatm6.c
index 6e3306d295..84cbaadfc5 100644
--- a/lapack-netlib/TESTING/MATGEN/slatm6.c
+++ b/lapack-netlib/TESTING/MATGEN/slatm6.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/slatm7.c b/lapack-netlib/TESTING/MATGEN/slatm7.c
index 5ea2e32f6a..d0eee2206e 100644
--- a/lapack-netlib/TESTING/MATGEN/slatm7.c
+++ b/lapack-netlib/TESTING/MATGEN/slatm7.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
static float spow_ui(float x, integer n) {
float pow=1.0; unsigned long int u;
diff --git a/lapack-netlib/TESTING/MATGEN/slatme.c b/lapack-netlib/TESTING/MATGEN/slatme.c
index 126c42121d..56a3c251a8 100644
--- a/lapack-netlib/TESTING/MATGEN/slatme.c
+++ b/lapack-netlib/TESTING/MATGEN/slatme.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/slatmr.c b/lapack-netlib/TESTING/MATGEN/slatmr.c
index cc227a9d81..ddd5702dca 100644
--- a/lapack-netlib/TESTING/MATGEN/slatmr.c
+++ b/lapack-netlib/TESTING/MATGEN/slatmr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/slatms.c b/lapack-netlib/TESTING/MATGEN/slatms.c
index 95f0058583..6fd71c8627 100644
--- a/lapack-netlib/TESTING/MATGEN/slatms.c
+++ b/lapack-netlib/TESTING/MATGEN/slatms.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/slatmt.c b/lapack-netlib/TESTING/MATGEN/slatmt.c
index cd1c3c7c14..c1a8f0b807 100644
--- a/lapack-netlib/TESTING/MATGEN/slatmt.c
+++ b/lapack-netlib/TESTING/MATGEN/slatmt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/zlagge.c b/lapack-netlib/TESTING/MATGEN/zlagge.c
index 56d0318e2f..d13afa91c3 100644
--- a/lapack-netlib/TESTING/MATGEN/zlagge.c
+++ b/lapack-netlib/TESTING/MATGEN/zlagge.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/zlaghe.c b/lapack-netlib/TESTING/MATGEN/zlaghe.c
index 63a8a05d6a..c9fccb89a4 100644
--- a/lapack-netlib/TESTING/MATGEN/zlaghe.c
+++ b/lapack-netlib/TESTING/MATGEN/zlaghe.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/zlagsy.c b/lapack-netlib/TESTING/MATGEN/zlagsy.c
index 8804bfbcef..1445a670fa 100644
--- a/lapack-netlib/TESTING/MATGEN/zlagsy.c
+++ b/lapack-netlib/TESTING/MATGEN/zlagsy.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/zlahilb.c b/lapack-netlib/TESTING/MATGEN/zlahilb.c
index ff3d065259..a8e0ebb068 100644
--- a/lapack-netlib/TESTING/MATGEN/zlahilb.c
+++ b/lapack-netlib/TESTING/MATGEN/zlahilb.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/zlakf2.c b/lapack-netlib/TESTING/MATGEN/zlakf2.c
index 4c08bd112d..f558bad21a 100644
--- a/lapack-netlib/TESTING/MATGEN/zlakf2.c
+++ b/lapack-netlib/TESTING/MATGEN/zlakf2.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/zlarge.c b/lapack-netlib/TESTING/MATGEN/zlarge.c
index 848cde007e..e38cbe8249 100644
--- a/lapack-netlib/TESTING/MATGEN/zlarge.c
+++ b/lapack-netlib/TESTING/MATGEN/zlarge.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/zlarnd.c b/lapack-netlib/TESTING/MATGEN/zlarnd.c
index ff1bf14673..ca71aceb0a 100644
--- a/lapack-netlib/TESTING/MATGEN/zlarnd.c
+++ b/lapack-netlib/TESTING/MATGEN/zlarnd.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* > \brief \b ZLARND */
diff --git a/lapack-netlib/TESTING/MATGEN/zlaror.c b/lapack-netlib/TESTING/MATGEN/zlaror.c
index c8a84f2154..227bbbf647 100644
--- a/lapack-netlib/TESTING/MATGEN/zlaror.c
+++ b/lapack-netlib/TESTING/MATGEN/zlaror.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/zlarot.c b/lapack-netlib/TESTING/MATGEN/zlarot.c
index be951dcb5b..86b5ae759d 100644
--- a/lapack-netlib/TESTING/MATGEN/zlarot.c
+++ b/lapack-netlib/TESTING/MATGEN/zlarot.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/zlatm1.c b/lapack-netlib/TESTING/MATGEN/zlatm1.c
index 447edc2595..d3655efbd3 100644
--- a/lapack-netlib/TESTING/MATGEN/zlatm1.c
+++ b/lapack-netlib/TESTING/MATGEN/zlatm1.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
static double dpow_ui(double x, integer n) {
double pow=1.0; unsigned long int u;
diff --git a/lapack-netlib/TESTING/MATGEN/zlatm2.c b/lapack-netlib/TESTING/MATGEN/zlatm2.c
index e6fe75d066..52bc1ce7b2 100644
--- a/lapack-netlib/TESTING/MATGEN/zlatm2.c
+++ b/lapack-netlib/TESTING/MATGEN/zlatm2.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* > \brief \b ZLATM2 */
diff --git a/lapack-netlib/TESTING/MATGEN/zlatm3.c b/lapack-netlib/TESTING/MATGEN/zlatm3.c
index 6370a9d395..ec39eeb459 100644
--- a/lapack-netlib/TESTING/MATGEN/zlatm3.c
+++ b/lapack-netlib/TESTING/MATGEN/zlatm3.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* > \brief \b ZLATM3 */
diff --git a/lapack-netlib/TESTING/MATGEN/zlatm5.c b/lapack-netlib/TESTING/MATGEN/zlatm5.c
index 5ee6cc8ce1..0abc836241 100644
--- a/lapack-netlib/TESTING/MATGEN/zlatm5.c
+++ b/lapack-netlib/TESTING/MATGEN/zlatm5.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -260,7 +257,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/zlatm6.c b/lapack-netlib/TESTING/MATGEN/zlatm6.c
index f394cb1df5..7791c51a21 100644
--- a/lapack-netlib/TESTING/MATGEN/zlatm6.c
+++ b/lapack-netlib/TESTING/MATGEN/zlatm6.c
@@ -52,9 +52,6 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
@@ -259,7 +256,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/zlatme.c b/lapack-netlib/TESTING/MATGEN/zlatme.c
index 11127aa511..f22851a122 100644
--- a/lapack-netlib/TESTING/MATGEN/zlatme.c
+++ b/lapack-netlib/TESTING/MATGEN/zlatme.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/zlatmr.c b/lapack-netlib/TESTING/MATGEN/zlatmr.c
index 02a4cf16f9..254edab543 100644
--- a/lapack-netlib/TESTING/MATGEN/zlatmr.c
+++ b/lapack-netlib/TESTING/MATGEN/zlatmr.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/zlatms.c b/lapack-netlib/TESTING/MATGEN/zlatms.c
index 87f26059d5..f78cccb5b8 100644
--- a/lapack-netlib/TESTING/MATGEN/zlatms.c
+++ b/lapack-netlib/TESTING/MATGEN/zlatms.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/TESTING/MATGEN/zlatmt.c b/lapack-netlib/TESTING/MATGEN/zlatmt.c
index 64c30ec17c..9d467f44e1 100644
--- a/lapack-netlib/TESTING/MATGEN/zlatmt.c
+++ b/lapack-netlib/TESTING/MATGEN/zlatmt.c
@@ -52,8 +52,8 @@ static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
-typedef int logical;
-typedef short int shortlogical;
+typedef blasint logical;
+
typedef char logical1;
typedef char integer1;
@@ -259,7 +259,7 @@ typedef struct Namelist Namelist;
/* procedure parameter types for -A and -C++ */
-#define F2C_proc_par_types 1
+
/* Table of constant values */
diff --git a/lapack-netlib/cgbsvx.f b/lapack-netlib/cgbsvx.f
deleted file mode 100644
index eaab5682c7..0000000000
--- a/lapack-netlib/cgbsvx.f
+++ /dev/null
@@ -1,644 +0,0 @@
-*> \brief CGBSVX computes the solution to system of linear equations A * X = B for GB matrices
-*
-* =========== DOCUMENTATION ===========
-*
-* Online html documentation available at
-* http://www.netlib.org/lapack/explore-html/
-*
-*> \htmlonly
-*> Download CGBSVX + dependencies
-*>
-*> [TGZ]
-*>
-*> [ZIP]
-*>
-*> [TXT]
-*> \endhtmlonly
-*
-* Definition:
-* ===========
-*
-* SUBROUTINE CGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
-* LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
-* RCOND, FERR, BERR, WORK, RWORK, INFO )
-*
-* .. Scalar Arguments ..
-* CHARACTER EQUED, FACT, TRANS
-* INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
-* REAL RCOND
-* ..
-* .. Array Arguments ..
-* INTEGER IPIV( * )
-* REAL BERR( * ), C( * ), FERR( * ), R( * ),
-* $ RWORK( * )
-* COMPLEX AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
-* $ WORK( * ), X( LDX, * )
-* ..
-*
-*
-*> \par Purpose:
-* =============
-*>
-*> \verbatim
-*>
-*> CGBSVX uses the LU factorization to compute the solution to a complex
-*> system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
-*> where A is a band matrix of order N with KL subdiagonals and KU
-*> superdiagonals, and X and B are N-by-NRHS matrices.
-*>
-*> Error bounds on the solution and a condition estimate are also
-*> provided.
-*> \endverbatim
-*
-*> \par Description:
-* =================
-*>
-*> \verbatim
-*>
-*> The following steps are performed by this subroutine:
-*>
-*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
-*> the system:
-*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*> Whether or not the system will be equilibrated depends on the
-*> scaling of the matrix A, but if equilibration is used, A is
-*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-*> or diag(C)*B (if TRANS = 'T' or 'C').
-*>
-*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-*> matrix A (after equilibration if FACT = 'E') as
-*> A = L * U,
-*> where L is a product of permutation and unit lower triangular
-*> matrices with KL subdiagonals, and U is upper triangular with
-*> KL+KU superdiagonals.
-*>
-*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-*> returns with INFO = i. Otherwise, the factored form of A is used
-*> to estimate the condition number of the matrix A. If the
-*> reciprocal of the condition number is less than machine precision,
-*> INFO = N+1 is returned as a warning, but the routine still goes on
-*> to solve for X and compute error bounds as described below.
-*>
-*> 4. The system of equations is solved for X using the factored form
-*> of A.
-*>
-*> 5. Iterative refinement is applied to improve the computed solution
-*> matrix and calculate error bounds and backward error estimates
-*> for it.
-*>
-*> 6. If equilibration was used, the matrix X is premultiplied by
-*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-*> that it solves the original system before equilibration.
-*> \endverbatim
-*
-* Arguments:
-* ==========
-*
-*> \param[in] FACT
-*> \verbatim
-*> FACT is CHARACTER*1
-*> Specifies whether or not the factored form of the matrix A is
-*> supplied on entry, and if not, whether the matrix A should be
-*> equilibrated before it is factored.
-*> = 'F': On entry, AFB and IPIV contain the factored form of
-*> A. If EQUED is not 'N', the matrix A has been
-*> equilibrated with scaling factors given by R and C.
-*> AB, AFB, and IPIV are not modified.
-*> = 'N': The matrix A will be copied to AFB and factored.
-*> = 'E': The matrix A will be equilibrated if necessary, then
-*> copied to AFB and factored.
-*> \endverbatim
-*>
-*> \param[in] TRANS
-*> \verbatim
-*> TRANS is CHARACTER*1
-*> Specifies the form of the system of equations.
-*> = 'N': A * X = B (No transpose)
-*> = 'T': A**T * X = B (Transpose)
-*> = 'C': A**H * X = B (Conjugate transpose)
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*> N is INTEGER
-*> The number of linear equations, i.e., the order of the
-*> matrix A. N >= 0.
-*> \endverbatim
-*>
-*> \param[in] KL
-*> \verbatim
-*> KL is INTEGER
-*> The number of subdiagonals within the band of A. KL >= 0.
-*> \endverbatim
-*>
-*> \param[in] KU
-*> \verbatim
-*> KU is INTEGER
-*> The number of superdiagonals within the band of A. KU >= 0.
-*> \endverbatim
-*>
-*> \param[in] NRHS
-*> \verbatim
-*> NRHS is INTEGER
-*> The number of right hand sides, i.e., the number of columns
-*> of the matrices B and X. NRHS >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] AB
-*> \verbatim
-*> AB is COMPLEX array, dimension (LDAB,N)
-*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-*> The j-th column of A is stored in the j-th column of the
-*> array AB as follows:
-*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*>
-*> If FACT = 'F' and EQUED is not 'N', then A must have been
-*> equilibrated by the scaling factors in R and/or C. AB is not
-*> modified if FACT = 'F' or 'N', or if FACT = 'E' and
-*> EQUED = 'N' on exit.
-*>
-*> On exit, if EQUED .ne. 'N', A is scaled as follows:
-*> EQUED = 'R': A := diag(R) * A
-*> EQUED = 'C': A := A * diag(C)
-*> EQUED = 'B': A := diag(R) * A * diag(C).
-*> \endverbatim
-*>
-*> \param[in] LDAB
-*> \verbatim
-*> LDAB is INTEGER
-*> The leading dimension of the array AB. LDAB >= KL+KU+1.
-*> \endverbatim
-*>
-*> \param[in,out] AFB
-*> \verbatim
-*> AFB is COMPLEX array, dimension (LDAFB,N)
-*> If FACT = 'F', then AFB is an input argument and on entry
-*> contains details of the LU factorization of the band matrix
-*> A, as computed by CGBTRF. U is stored as an upper triangular
-*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-*> and the multipliers used during the factorization are stored
-*> in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
-*> the factored form of the equilibrated matrix A.
-*>
-*> If FACT = 'N', then AFB is an output argument and on exit
-*> returns details of the LU factorization of A.
-*>
-*> If FACT = 'E', then AFB is an output argument and on exit
-*> returns details of the LU factorization of the equilibrated
-*> matrix A (see the description of AB for the form of the
-*> equilibrated matrix).
-*> \endverbatim
-*>
-*> \param[in] LDAFB
-*> \verbatim
-*> LDAFB is INTEGER
-*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*> \endverbatim
-*>
-*> \param[in,out] IPIV
-*> \verbatim
-*> IPIV is INTEGER array, dimension (N)
-*> If FACT = 'F', then IPIV is an input argument and on entry
-*> contains the pivot indices from the factorization A = L*U
-*> as computed by CGBTRF; row i of the matrix was interchanged
-*> with row IPIV(i).
-*>
-*> If FACT = 'N', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = L*U
-*> of the original matrix A.
-*>
-*> If FACT = 'E', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = L*U
-*> of the equilibrated matrix A.
-*> \endverbatim
-*>
-*> \param[in,out] EQUED
-*> \verbatim
-*> EQUED is CHARACTER*1
-*> Specifies the form of equilibration that was done.
-*> = 'N': No equilibration (always true if FACT = 'N').
-*> = 'R': Row equilibration, i.e., A has been premultiplied by
-*> diag(R).
-*> = 'C': Column equilibration, i.e., A has been postmultiplied
-*> by diag(C).
-*> = 'B': Both row and column equilibration, i.e., A has been
-*> replaced by diag(R) * A * diag(C).
-*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
-*> output argument.
-*> \endverbatim
-*>
-*> \param[in,out] R
-*> \verbatim
-*> R is REAL array, dimension (N)
-*> The row scale factors for A. If EQUED = 'R' or 'B', A is
-*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-*> is not accessed. R is an input argument if FACT = 'F';
-*> otherwise, R is an output argument. If FACT = 'F' and
-*> EQUED = 'R' or 'B', each element of R must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] C
-*> \verbatim
-*> C is REAL array, dimension (N)
-*> The column scale factors for A. If EQUED = 'C' or 'B', A is
-*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-*> is not accessed. C is an input argument if FACT = 'F';
-*> otherwise, C is an output argument. If FACT = 'F' and
-*> EQUED = 'C' or 'B', each element of C must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] B
-*> \verbatim
-*> B is COMPLEX array, dimension (LDB,NRHS)
-*> On entry, the right hand side matrix B.
-*> On exit,
-*> if EQUED = 'N', B is not modified;
-*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-*> diag(R)*B;
-*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-*> overwritten by diag(C)*B.
-*> \endverbatim
-*>
-*> \param[in] LDB
-*> \verbatim
-*> LDB is INTEGER
-*> The leading dimension of the array B. LDB >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] X
-*> \verbatim
-*> X is COMPLEX array, dimension (LDX,NRHS)
-*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-*> to the original system of equations. Note that A and B are
-*> modified on exit if EQUED .ne. 'N', and the solution to the
-*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-*> and EQUED = 'R' or 'B'.
-*> \endverbatim
-*>
-*> \param[in] LDX
-*> \verbatim
-*> LDX is INTEGER
-*> The leading dimension of the array X. LDX >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] RCOND
-*> \verbatim
-*> RCOND is REAL
-*> The estimate of the reciprocal condition number of the matrix
-*> A after equilibration (if done). If RCOND is less than the
-*> machine precision (in particular, if RCOND = 0), the matrix
-*> is singular to working precision. This condition is
-*> indicated by a return code of INFO > 0.
-*> \endverbatim
-*>
-*> \param[out] FERR
-*> \verbatim
-*> FERR is REAL array, dimension (NRHS)
-*> The estimated forward error bound for each solution vector
-*> X(j) (the j-th column of the solution matrix X).
-*> If XTRUE is the true solution corresponding to X(j), FERR(j)
-*> is an estimated upper bound for the magnitude of the largest
-*> element in (X(j) - XTRUE) divided by the magnitude of the
-*> largest element in X(j). The estimate is as reliable as
-*> the estimate for RCOND, and is almost always a slight
-*> overestimate of the true error.
-*> \endverbatim
-*>
-*> \param[out] BERR
-*> \verbatim
-*> BERR is REAL array, dimension (NRHS)
-*> The componentwise relative backward error of each solution
-*> vector X(j) (i.e., the smallest relative change in
-*> any element of A or B that makes X(j) an exact solution).
-*> \endverbatim
-*>
-*> \param[out] WORK
-*> \verbatim
-*> WORK is COMPLEX array, dimension (2*N)
-*> \endverbatim
-*>
-*> \param[out] RWORK
-*> \verbatim
-*> RWORK is REAL array, dimension (MAX(1,N))
-*> On exit, RWORK(1) contains the reciprocal pivot growth
-*> factor norm(A)/norm(U). The "max absolute element" norm is
-*> used. If RWORK(1) is much less than 1, then the stability
-*> of the LU factorization of the (equilibrated) matrix A
-*> could be poor. This also means that the solution X, condition
-*> estimator RCOND, and forward error bound FERR could be
-*> unreliable. If factorization fails with 0 RWORK(1) contains the reciprocal pivot growth factor for the
-*> leading INFO columns of A.
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*> INFO is INTEGER
-*> = 0: successful exit
-*> < 0: if INFO = -i, the i-th argument had an illegal value
-*> > 0: if INFO = i, and i is
-*> <= N: U(i,i) is exactly zero. The factorization
-*> has been completed, but the factor U is exactly
-*> singular, so the solution and error bounds
-*> could not be computed. RCOND = 0 is returned.
-*> = N+1: U is nonsingular, but RCOND is less than machine
-*> precision, meaning that the matrix is singular
-*> to working precision. Nevertheless, the
-*> solution and error bounds are computed because
-*> there are a number of situations where the
-*> computed solution can be more accurate than the
-*> value of RCOND would suggest.
-*> \endverbatim
-*
-* Authors:
-* ========
-*
-*> \author Univ. of Tennessee
-*> \author Univ. of California Berkeley
-*> \author Univ. of Colorado Denver
-*> \author NAG Ltd.
-*
-*> \ingroup complexGBsolve
-*
-* =====================================================================
- SUBROUTINE CGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
- $ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
- $ RCOND, FERR, BERR, WORK, RWORK, INFO )
-*
-* -- LAPACK driver routine --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER EQUED, FACT, TRANS
- INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
- REAL RCOND
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL BERR( * ), C( * ), FERR( * ), R( * ),
- $ RWORK( * )
- COMPLEX AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
- $ WORK( * ), X( LDX, * )
-* ..
-*
-* =====================================================================
-* Moved setting of INFO = N+1 so INFO does not subsequently get
-* overwritten. Sven, 17 Mar 05.
-* =====================================================================
-*
-* .. Parameters ..
- REAL ZERO, ONE
- PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 )
-* ..
-* .. Local Scalars ..
- LOGICAL COLEQU, EQUIL, NOFACT, NOTRAN, ROWEQU
- CHARACTER NORM
- INTEGER I, INFEQU, J, J1, J2
- REAL AMAX, ANORM, BIGNUM, COLCND, RCMAX, RCMIN,
- $ ROWCND, RPVGRW, SMLNUM
-* ..
-* .. External Functions ..
- LOGICAL LSAME
- REAL CLANGB, CLANTB, SLAMCH
- EXTERNAL LSAME, CLANGB, CLANTB, SLAMCH
-* ..
-* .. External Subroutines ..
- EXTERNAL CCOPY, CGBCON, CGBEQU, CGBRFS, CGBTRF, CGBTRS,
- $ CLACPY, CLAQGB, XERBLA
-* ..
-* .. Intrinsic Functions ..
- INTRINSIC ABS, MAX, MIN
-* ..
-* .. Executable Statements ..
-*
- INFO = 0
- NOFACT = LSAME( FACT, 'N' )
- EQUIL = LSAME( FACT, 'E' )
- NOTRAN = LSAME( TRANS, 'N' )
- IF( NOFACT .OR. EQUIL ) THEN
- EQUED = 'N'
- ROWEQU = .FALSE.
- COLEQU = .FALSE.
- ELSE
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- SMLNUM = SLAMCH( 'Safe minimum' )
- BIGNUM = ONE / SMLNUM
- END IF
-*
-* Test the input parameters.
-*
- IF( .NOT.NOFACT .AND. .NOT.EQUIL .AND. .NOT.LSAME( FACT, 'F' ) )
- $ THEN
- INFO = -1
- ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
- $ LSAME( TRANS, 'C' ) ) THEN
- INFO = -2
- ELSE IF( N.LT.0 ) THEN
- INFO = -3
- ELSE IF( KL.LT.0 ) THEN
- INFO = -4
- ELSE IF( KU.LT.0 ) THEN
- INFO = -5
- ELSE IF( NRHS.LT.0 ) THEN
- INFO = -6
- ELSE IF( LDAB.LT.KL+KU+1 ) THEN
- INFO = -8
- ELSE IF( LDAFB.LT.2*KL+KU+1 ) THEN
- INFO = -10
- ELSE IF( LSAME( FACT, 'F' ) .AND. .NOT.
- $ ( ROWEQU .OR. COLEQU .OR. LSAME( EQUED, 'N' ) ) ) THEN
- INFO = -12
- ELSE
- IF( ROWEQU ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 10 J = 1, N
- RCMIN = MIN( RCMIN, R( J ) )
- RCMAX = MAX( RCMAX, R( J ) )
- 10 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -13
- ELSE IF( N.GT.0 ) THEN
- ROWCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- ROWCND = ONE
- END IF
- END IF
- IF( COLEQU .AND. INFO.EQ.0 ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 20 J = 1, N
- RCMIN = MIN( RCMIN, C( J ) )
- RCMAX = MAX( RCMAX, C( J ) )
- 20 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -14
- ELSE IF( N.GT.0 ) THEN
- COLCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- COLCND = ONE
- END IF
- END IF
- IF( INFO.EQ.0 ) THEN
- IF( LDB.LT.MAX( 1, N ) ) THEN
- INFO = -16
- ELSE IF( LDX.LT.MAX( 1, N ) ) THEN
- INFO = -18
- END IF
- END IF
- END IF
-*
- IF( INFO.NE.0 ) THEN
- CALL XERBLA( 'CGBSVX', -INFO )
- RETURN
- END IF
-*
- IF( EQUIL ) THEN
-*
-* Compute row and column scalings to equilibrate the matrix A.
-*
- CALL CGBEQU( N, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
- $ AMAX, INFEQU )
- IF( INFEQU.EQ.0 ) THEN
-*
-* Equilibrate the matrix.
-*
- CALL CLAQGB( N, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
- $ AMAX, EQUED )
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- END IF
- END IF
-*
-* Scale the right hand side.
-*
- IF( NOTRAN ) THEN
- IF( ROWEQU ) THEN
- DO 40 J = 1, NRHS
- DO 30 I = 1, N
- B( I, J ) = R( I )*B( I, J )
- 30 CONTINUE
- 40 CONTINUE
- END IF
- ELSE IF( COLEQU ) THEN
- DO 60 J = 1, NRHS
- DO 50 I = 1, N
- B( I, J ) = C( I )*B( I, J )
- 50 CONTINUE
- 60 CONTINUE
- END IF
-*
- IF( NOFACT .OR. EQUIL ) THEN
-*
-* Compute the LU factorization of the band matrix A.
-*
- DO 70 J = 1, N
- J1 = MAX( J-KU, 1 )
- J2 = MIN( J+KL, N )
- CALL CCOPY( J2-J1+1, AB( KU+1-J+J1, J ), 1,
- $ AFB( KL+KU+1-J+J1, J ), 1 )
- 70 CONTINUE
-*
- CALL CGBTRF( N, N, KL, KU, AFB, LDAFB, IPIV, INFO )
-*
-* Return if INFO is non-zero.
-*
- IF( INFO.GT.0 ) THEN
-*
-* Compute the reciprocal pivot growth factor of the
-* leading rank-deficient INFO columns of A.
-*
- ANORM = ZERO
- DO 90 J = 1, INFO
- DO 80 I = MAX( KU+2-J, 1 ), MIN( N+KU+1-J, KL+KU+1 )
- ANORM = MAX( ANORM, ABS( AB( I, J ) ) )
- 80 CONTINUE
- 90 CONTINUE
- RPVGRW = CLANTB( 'M', 'U', 'N', INFO, MIN( INFO-1, KL+KU ),
- $ AFB( MAX( 1, KL+KU+2-INFO ), 1 ), LDAFB,
- $ RWORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = ANORM / RPVGRW
- END IF
- RWORK( 1 ) = RPVGRW
- RCOND = ZERO
- RETURN
- END IF
- END IF
-*
-* Compute the norm of the matrix A and the
-* reciprocal pivot growth factor RPVGRW.
-*
- IF( NOTRAN ) THEN
- NORM = '1'
- ELSE
- NORM = 'I'
- END IF
- ANORM = CLANGB( NORM, N, KL, KU, AB, LDAB, RWORK )
- RPVGRW = CLANTB( 'M', 'U', 'N', N, KL+KU, AFB, LDAFB, RWORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = CLANGB( 'M', N, KL, KU, AB, LDAB, RWORK ) / RPVGRW
- END IF
-*
-* Compute the reciprocal of the condition number of A.
-*
- CALL CGBCON( NORM, N, KL, KU, AFB, LDAFB, IPIV, ANORM, RCOND,
- $ WORK, RWORK, INFO )
-*
-* Compute the solution matrix X.
-*
- CALL CLACPY( 'Full', N, NRHS, B, LDB, X, LDX )
- CALL CGBTRS( TRANS, N, KL, KU, NRHS, AFB, LDAFB, IPIV, X, LDX,
- $ INFO )
-*
-* Use iterative refinement to improve the computed solution and
-* compute error bounds and backward error estimates for it.
-*
- CALL CGBRFS( TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB, IPIV,
- $ B, LDB, X, LDX, FERR, BERR, WORK, RWORK, INFO )
-*
-* Transform the solution matrix X to a solution of the original
-* system.
-*
- IF( NOTRAN ) THEN
- IF( COLEQU ) THEN
- DO 110 J = 1, NRHS
- DO 100 I = 1, N
- X( I, J ) = C( I )*X( I, J )
- 100 CONTINUE
- 110 CONTINUE
- DO 120 J = 1, NRHS
- FERR( J ) = FERR( J ) / COLCND
- 120 CONTINUE
- END IF
- ELSE IF( ROWEQU ) THEN
- DO 140 J = 1, NRHS
- DO 130 I = 1, N
- X( I, J ) = R( I )*X( I, J )
- 130 CONTINUE
- 140 CONTINUE
- DO 150 J = 1, NRHS
- FERR( J ) = FERR( J ) / ROWCND
- 150 CONTINUE
- END IF
-*
-* Set INFO = N+1 if the matrix is singular to working precision.
-*
- IF( RCOND.LT.SLAMCH( 'Epsilon' ) )
- $ INFO = N + 1
-*
- RWORK( 1 ) = RPVGRW
- RETURN
-*
-* End of CGBSVX
-*
- END
diff --git a/lapack-netlib/cgejsv.f b/lapack-netlib/cgejsv.f
deleted file mode 100644
index 51a6cee4e1..0000000000
--- a/lapack-netlib/cgejsv.f
+++ /dev/null
@@ -1,2232 +0,0 @@
-*> \brief \b CGEJSV
-*
-* =========== DOCUMENTATION ===========
-*
-* Online html documentation available at
-* http://www.netlib.org/lapack/explore-html/
-*
-*> \htmlonly
-*> Download CGEJSV + dependencies
-*>
-*> [TGZ]
-*>
-*> [ZIP]
-*>
-*> [TXT]
-*> \endhtmlonly
-*
-* Definition:
-* ===========
-*
-* SUBROUTINE CGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
-* M, N, A, LDA, SVA, U, LDU, V, LDV,
-* CWORK, LWORK, RWORK, LRWORK, IWORK, INFO )
-*
-* .. Scalar Arguments ..
-* IMPLICIT NONE
-* INTEGER INFO, LDA, LDU, LDV, LWORK, M, N
-* ..
-* .. Array Arguments ..
-* COMPLEX A( LDA, * ), U( LDU, * ), V( LDV, * ), CWORK( LWORK )
-* REAL SVA( N ), RWORK( LRWORK )
-* INTEGER IWORK( * )
-* CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
-* ..
-*
-*
-*> \par Purpose:
-* =============
-*>
-*> \verbatim
-*>
-*> CGEJSV computes the singular value decomposition (SVD) of a complex M-by-N
-*> matrix [A], where M >= N. The SVD of [A] is written as
-*>
-*> [A] = [U] * [SIGMA] * [V]^*,
-*>
-*> where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N
-*> diagonal elements, [U] is an M-by-N (or M-by-M) unitary matrix, and
-*> [V] is an N-by-N unitary matrix. The diagonal elements of [SIGMA] are
-*> the singular values of [A]. The columns of [U] and [V] are the left and
-*> the right singular vectors of [A], respectively. The matrices [U] and [V]
-*> are computed and stored in the arrays U and V, respectively. The diagonal
-*> of [SIGMA] is computed and stored in the array SVA.
-*> \endverbatim
-*>
-*> Arguments:
-*> ==========
-*>
-*> \param[in] JOBA
-*> \verbatim
-*> JOBA is CHARACTER*1
-*> Specifies the level of accuracy:
-*> = 'C': This option works well (high relative accuracy) if A = B * D,
-*> with well-conditioned B and arbitrary diagonal matrix D.
-*> The accuracy cannot be spoiled by COLUMN scaling. The
-*> accuracy of the computed output depends on the condition of
-*> B, and the procedure aims at the best theoretical accuracy.
-*> The relative error max_{i=1:N}|d sigma_i| / sigma_i is
-*> bounded by f(M,N)*epsilon* cond(B), independent of D.
-*> The input matrix is preprocessed with the QRF with column
-*> pivoting. This initial preprocessing and preconditioning by
-*> a rank revealing QR factorization is common for all values of
-*> JOBA. Additional actions are specified as follows:
-*> = 'E': Computation as with 'C' with an additional estimate of the
-*> condition number of B. It provides a realistic error bound.
-*> = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings
-*> D1, D2, and well-conditioned matrix C, this option gives
-*> higher accuracy than the 'C' option. If the structure of the
-*> input matrix is not known, and relative accuracy is
-*> desirable, then this option is advisable. The input matrix A
-*> is preprocessed with QR factorization with FULL (row and
-*> column) pivoting.
-*> = 'G': Computation as with 'F' with an additional estimate of the
-*> condition number of B, where A=B*D. If A has heavily weighted
-*> rows, then using this condition number gives too pessimistic
-*> error bound.
-*> = 'A': Small singular values are not well determined by the data
-*> and are considered as noisy; the matrix is treated as
-*> numerically rank deficient. The error in the computed
-*> singular values is bounded by f(m,n)*epsilon*||A||.
-*> The computed SVD A = U * S * V^* restores A up to
-*> f(m,n)*epsilon*||A||.
-*> This gives the procedure the licence to discard (set to zero)
-*> all singular values below N*epsilon*||A||.
-*> = 'R': Similar as in 'A'. Rank revealing property of the initial
-*> QR factorization is used do reveal (using triangular factor)
-*> a gap sigma_{r+1} < epsilon * sigma_r in which case the
-*> numerical RANK is declared to be r. The SVD is computed with
-*> absolute error bounds, but more accurately than with 'A'.
-*> \endverbatim
-*>
-*> \param[in] JOBU
-*> \verbatim
-*> JOBU is CHARACTER*1
-*> Specifies whether to compute the columns of U:
-*> = 'U': N columns of U are returned in the array U.
-*> = 'F': full set of M left sing. vectors is returned in the array U.
-*> = 'W': U may be used as workspace of length M*N. See the description
-*> of U.
-*> = 'N': U is not computed.
-*> \endverbatim
-*>
-*> \param[in] JOBV
-*> \verbatim
-*> JOBV is CHARACTER*1
-*> Specifies whether to compute the matrix V:
-*> = 'V': N columns of V are returned in the array V; Jacobi rotations
-*> are not explicitly accumulated.
-*> = 'J': N columns of V are returned in the array V, but they are
-*> computed as the product of Jacobi rotations, if JOBT = 'N'.
-*> = 'W': V may be used as workspace of length N*N. See the description
-*> of V.
-*> = 'N': V is not computed.
-*> \endverbatim
-*>
-*> \param[in] JOBR
-*> \verbatim
-*> JOBR is CHARACTER*1
-*> Specifies the RANGE for the singular values. Issues the licence to
-*> set to zero small positive singular values if they are outside
-*> specified range. If A .NE. 0 is scaled so that the largest singular
-*> value of c*A is around SQRT(BIG), BIG=SLAMCH('O'), then JOBR issues
-*> the licence to kill columns of A whose norm in c*A is less than
-*> SQRT(SFMIN) (for JOBR = 'R'), or less than SMALL=SFMIN/EPSLN,
-*> where SFMIN=SLAMCH('S'), EPSLN=SLAMCH('E').
-*> = 'N': Do not kill small columns of c*A. This option assumes that
-*> BLAS and QR factorizations and triangular solvers are
-*> implemented to work in that range. If the condition of A
-*> is greater than BIG, use CGESVJ.
-*> = 'R': RESTRICTED range for sigma(c*A) is [SQRT(SFMIN), SQRT(BIG)]
-*> (roughly, as described above). This option is recommended.
-*> ===========================
-*> For computing the singular values in the FULL range [SFMIN,BIG]
-*> use CGESVJ.
-*> \endverbatim
-*>
-*> \param[in] JOBT
-*> \verbatim
-*> JOBT is CHARACTER*1
-*> If the matrix is square then the procedure may determine to use
-*> transposed A if A^* seems to be better with respect to convergence.
-*> If the matrix is not square, JOBT is ignored.
-*> The decision is based on two values of entropy over the adjoint
-*> orbit of A^* * A. See the descriptions of RWORK(6) and RWORK(7).
-*> = 'T': transpose if entropy test indicates possibly faster
-*> convergence of Jacobi process if A^* is taken as input. If A is
-*> replaced with A^*, then the row pivoting is included automatically.
-*> = 'N': do not speculate.
-*> The option 'T' can be used to compute only the singular values, or
-*> the full SVD (U, SIGMA and V). For only one set of singular vectors
-*> (U or V), the caller should provide both U and V, as one of the
-*> matrices is used as workspace if the matrix A is transposed.
-*> The implementer can easily remove this constraint and make the
-*> code more complicated. See the descriptions of U and V.
-*> In general, this option is considered experimental, and 'N'; should
-*> be preferred. This is subject to changes in the future.
-*> \endverbatim
-*>
-*> \param[in] JOBP
-*> \verbatim
-*> JOBP is CHARACTER*1
-*> Issues the licence to introduce structured perturbations to drown
-*> denormalized numbers. This licence should be active if the
-*> denormals are poorly implemented, causing slow computation,
-*> especially in cases of fast convergence (!). For details see [1,2].
-*> For the sake of simplicity, this perturbations are included only
-*> when the full SVD or only the singular values are requested. The
-*> implementer/user can easily add the perturbation for the cases of
-*> computing one set of singular vectors.
-*> = 'P': introduce perturbation
-*> = 'N': do not perturb
-*> \endverbatim
-*>
-*> \param[in] M
-*> \verbatim
-*> M is INTEGER
-*> The number of rows of the input matrix A. M >= 0.
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*> N is INTEGER
-*> The number of columns of the input matrix A. M >= N >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] A
-*> \verbatim
-*> A is COMPLEX array, dimension (LDA,N)
-*> On entry, the M-by-N matrix A.
-*> \endverbatim
-*>
-*> \param[in] LDA
-*> \verbatim
-*> LDA is INTEGER
-*> The leading dimension of the array A. LDA >= max(1,M).
-*> \endverbatim
-*>
-*> \param[out] SVA
-*> \verbatim
-*> SVA is REAL array, dimension (N)
-*> On exit,
-*> - For RWORK(1)/RWORK(2) = ONE: The singular values of A. During
-*> the computation SVA contains Euclidean column norms of the
-*> iterated matrices in the array A.
-*> - For RWORK(1) .NE. RWORK(2): The singular values of A are
-*> (RWORK(1)/RWORK(2)) * SVA(1:N). This factored form is used if
-*> sigma_max(A) overflows or if small singular values have been
-*> saved from underflow by scaling the input matrix A.
-*> - If JOBR='R' then some of the singular values may be returned
-*> as exact zeros obtained by "set to zero" because they are
-*> below the numerical rank threshold or are denormalized numbers.
-*> \endverbatim
-*>
-*> \param[out] U
-*> \verbatim
-*> U is COMPLEX array, dimension ( LDU, N ) or ( LDU, M )
-*> If JOBU = 'U', then U contains on exit the M-by-N matrix of
-*> the left singular vectors.
-*> If JOBU = 'F', then U contains on exit the M-by-M matrix of
-*> the left singular vectors, including an ONB
-*> of the orthogonal complement of the Range(A).
-*> If JOBU = 'W' .AND. (JOBV = 'V' .AND. JOBT = 'T' .AND. M = N),
-*> then U is used as workspace if the procedure
-*> replaces A with A^*. In that case, [V] is computed
-*> in U as left singular vectors of A^* and then
-*> copied back to the V array. This 'W' option is just
-*> a reminder to the caller that in this case U is
-*> reserved as workspace of length N*N.
-*> If JOBU = 'N' U is not referenced, unless JOBT='T'.
-*> \endverbatim
-*>
-*> \param[in] LDU
-*> \verbatim
-*> LDU is INTEGER
-*> The leading dimension of the array U, LDU >= 1.
-*> IF JOBU = 'U' or 'F' or 'W', then LDU >= M.
-*> \endverbatim
-*>
-*> \param[out] V
-*> \verbatim
-*> V is COMPLEX array, dimension ( LDV, N )
-*> If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of
-*> the right singular vectors;
-*> If JOBV = 'W', AND (JOBU = 'U' AND JOBT = 'T' AND M = N),
-*> then V is used as workspace if the pprocedure
-*> replaces A with A^*. In that case, [U] is computed
-*> in V as right singular vectors of A^* and then
-*> copied back to the U array. This 'W' option is just
-*> a reminder to the caller that in this case V is
-*> reserved as workspace of length N*N.
-*> If JOBV = 'N' V is not referenced, unless JOBT='T'.
-*> \endverbatim
-*>
-*> \param[in] LDV
-*> \verbatim
-*> LDV is INTEGER
-*> The leading dimension of the array V, LDV >= 1.
-*> If JOBV = 'V' or 'J' or 'W', then LDV >= N.
-*> \endverbatim
-*>
-*> \param[out] CWORK
-*> \verbatim
-*> CWORK is COMPLEX array, dimension (MAX(2,LWORK))
-*> If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or
-*> LRWORK=-1), then on exit CWORK(1) contains the required length of
-*> CWORK for the job parameters used in the call.
-*> \endverbatim
-*>
-*> \param[in] LWORK
-*> \verbatim
-*> LWORK is INTEGER
-*> Length of CWORK to confirm proper allocation of workspace.
-*> LWORK depends on the job:
-*>
-*> 1. If only SIGMA is needed ( JOBU = 'N', JOBV = 'N' ) and
-*> 1.1 .. no scaled condition estimate required (JOBA.NE.'E'.AND.JOBA.NE.'G'):
-*> LWORK >= 2*N+1. This is the minimal requirement.
-*> ->> For optimal performance (blocked code) the optimal value
-*> is LWORK >= N + (N+1)*NB. Here NB is the optimal
-*> block size for CGEQP3 and CGEQRF.
-*> In general, optimal LWORK is computed as
-*> LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CGEQRF), LWORK(CGESVJ)).
-*> 1.2. .. an estimate of the scaled condition number of A is
-*> required (JOBA='E', or 'G'). In this case, LWORK the minimal
-*> requirement is LWORK >= N*N + 2*N.
-*> ->> For optimal performance (blocked code) the optimal value
-*> is LWORK >= max(N+(N+1)*NB, N*N+2*N)=N**2+2*N.
-*> In general, the optimal length LWORK is computed as
-*> LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CGEQRF), LWORK(CGESVJ),
-*> N*N+LWORK(CPOCON)).
-*> 2. If SIGMA and the right singular vectors are needed (JOBV = 'V'),
-*> (JOBU = 'N')
-*> 2.1 .. no scaled condition estimate requested (JOBE = 'N'):
-*> -> the minimal requirement is LWORK >= 3*N.
-*> -> For optimal performance,
-*> LWORK >= max(N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,
-*> where NB is the optimal block size for CGEQP3, CGEQRF, CGELQF,
-*> CUNMLQ. In general, the optimal length LWORK is computed as
-*> LWORK >= max(N+LWORK(CGEQP3), N+LWORK(CGESVJ),
-*> N+LWORK(CGELQF), 2*N+LWORK(CGEQRF), N+LWORK(CUNMLQ)).
-*> 2.2 .. an estimate of the scaled condition number of A is
-*> required (JOBA='E', or 'G').
-*> -> the minimal requirement is LWORK >= 3*N.
-*> -> For optimal performance,
-*> LWORK >= max(N+(N+1)*NB, 2*N,2*N+N*NB)=2*N+N*NB,
-*> where NB is the optimal block size for CGEQP3, CGEQRF, CGELQF,
-*> CUNMLQ. In general, the optimal length LWORK is computed as
-*> LWORK >= max(N+LWORK(CGEQP3), LWORK(CPOCON), N+LWORK(CGESVJ),
-*> N+LWORK(CGELQF), 2*N+LWORK(CGEQRF), N+LWORK(CUNMLQ)).
-*> 3. If SIGMA and the left singular vectors are needed
-*> 3.1 .. no scaled condition estimate requested (JOBE = 'N'):
-*> -> the minimal requirement is LWORK >= 3*N.
-*> -> For optimal performance:
-*> if JOBU = 'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,
-*> where NB is the optimal block size for CGEQP3, CGEQRF, CUNMQR.
-*> In general, the optimal length LWORK is computed as
-*> LWORK >= max(N+LWORK(CGEQP3), 2*N+LWORK(CGEQRF), N+LWORK(CUNMQR)).
-*> 3.2 .. an estimate of the scaled condition number of A is
-*> required (JOBA='E', or 'G').
-*> -> the minimal requirement is LWORK >= 3*N.
-*> -> For optimal performance:
-*> if JOBU = 'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,
-*> where NB is the optimal block size for CGEQP3, CGEQRF, CUNMQR.
-*> In general, the optimal length LWORK is computed as
-*> LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CPOCON),
-*> 2*N+LWORK(CGEQRF), N+LWORK(CUNMQR)).
-*>
-*> 4. If the full SVD is needed: (JOBU = 'U' or JOBU = 'F') and
-*> 4.1. if JOBV = 'V'
-*> the minimal requirement is LWORK >= 5*N+2*N*N.
-*> 4.2. if JOBV = 'J' the minimal requirement is
-*> LWORK >= 4*N+N*N.
-*> In both cases, the allocated CWORK can accommodate blocked runs
-*> of CGEQP3, CGEQRF, CGELQF, CUNMQR, CUNMLQ.
-*>
-*> If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or
-*> LRWORK=-1), then on exit CWORK(1) contains the optimal and CWORK(2) contains the
-*> minimal length of CWORK for the job parameters used in the call.
-*> \endverbatim
-*>
-*> \param[out] RWORK
-*> \verbatim
-*> RWORK is REAL array, dimension (MAX(7,LRWORK))
-*> On exit,
-*> RWORK(1) = Determines the scaling factor SCALE = RWORK(2) / RWORK(1)
-*> such that SCALE*SVA(1:N) are the computed singular values
-*> of A. (See the description of SVA().)
-*> RWORK(2) = See the description of RWORK(1).
-*> RWORK(3) = SCONDA is an estimate for the condition number of
-*> column equilibrated A. (If JOBA = 'E' or 'G')
-*> SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1).
-*> It is computed using CPOCON. It holds
-*> N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA
-*> where R is the triangular factor from the QRF of A.
-*> However, if R is truncated and the numerical rank is
-*> determined to be strictly smaller than N, SCONDA is
-*> returned as -1, thus indicating that the smallest
-*> singular values might be lost.
-*>
-*> If full SVD is needed, the following two condition numbers are
-*> useful for the analysis of the algorithm. They are provided for
-*> a developer/implementer who is familiar with the details of
-*> the method.
-*>
-*> RWORK(4) = an estimate of the scaled condition number of the
-*> triangular factor in the first QR factorization.
-*> RWORK(5) = an estimate of the scaled condition number of the
-*> triangular factor in the second QR factorization.
-*> The following two parameters are computed if JOBT = 'T'.
-*> They are provided for a developer/implementer who is familiar
-*> with the details of the method.
-*> RWORK(6) = the entropy of A^* * A :: this is the Shannon entropy
-*> of diag(A^* * A) / Trace(A^* * A) taken as point in the
-*> probability simplex.
-*> RWORK(7) = the entropy of A * A^*. (See the description of RWORK(6).)
-*> If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or
-*> LRWORK=-1), then on exit RWORK(1) contains the required length of
-*> RWORK for the job parameters used in the call.
-*> \endverbatim
-*>
-*> \param[in] LRWORK
-*> \verbatim
-*> LRWORK is INTEGER
-*> Length of RWORK to confirm proper allocation of workspace.
-*> LRWORK depends on the job:
-*>
-*> 1. If only the singular values are requested i.e. if
-*> LSAME(JOBU,'N') .AND. LSAME(JOBV,'N')
-*> then:
-*> 1.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
-*> then: LRWORK = max( 7, 2 * M ).
-*> 1.2. Otherwise, LRWORK = max( 7, N ).
-*> 2. If singular values with the right singular vectors are requested
-*> i.e. if
-*> (LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) .AND.
-*> .NOT.(LSAME(JOBU,'U').OR.LSAME(JOBU,'F'))
-*> then:
-*> 2.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
-*> then LRWORK = max( 7, 2 * M ).
-*> 2.2. Otherwise, LRWORK = max( 7, N ).
-*> 3. If singular values with the left singular vectors are requested, i.e. if
-*> (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND.
-*> .NOT.(LSAME(JOBV,'V').OR.LSAME(JOBV,'J'))
-*> then:
-*> 3.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
-*> then LRWORK = max( 7, 2 * M ).
-*> 3.2. Otherwise, LRWORK = max( 7, N ).
-*> 4. If singular values with both the left and the right singular vectors
-*> are requested, i.e. if
-*> (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND.
-*> (LSAME(JOBV,'V').OR.LSAME(JOBV,'J'))
-*> then:
-*> 4.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
-*> then LRWORK = max( 7, 2 * M ).
-*> 4.2. Otherwise, LRWORK = max( 7, N ).
-*>
-*> If, on entry, LRWORK = -1 or LWORK=-1, a workspace query is assumed and
-*> the length of RWORK is returned in RWORK(1).
-*> \endverbatim
-*>
-*> \param[out] IWORK
-*> \verbatim
-*> IWORK is INTEGER array, of dimension at least 4, that further depends
-*> on the job:
-*>
-*> 1. If only the singular values are requested then:
-*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') )
-*> then the length of IWORK is N+M; otherwise the length of IWORK is N.
-*> 2. If the singular values and the right singular vectors are requested then:
-*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') )
-*> then the length of IWORK is N+M; otherwise the length of IWORK is N.
-*> 3. If the singular values and the left singular vectors are requested then:
-*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') )
-*> then the length of IWORK is N+M; otherwise the length of IWORK is N.
-*> 4. If the singular values with both the left and the right singular vectors
-*> are requested, then:
-*> 4.1. If LSAME(JOBV,'J') the length of IWORK is determined as follows:
-*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') )
-*> then the length of IWORK is N+M; otherwise the length of IWORK is N.
-*> 4.2. If LSAME(JOBV,'V') the length of IWORK is determined as follows:
-*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') )
-*> then the length of IWORK is 2*N+M; otherwise the length of IWORK is 2*N.
-*>
-*> On exit,
-*> IWORK(1) = the numerical rank determined after the initial
-*> QR factorization with pivoting. See the descriptions
-*> of JOBA and JOBR.
-*> IWORK(2) = the number of the computed nonzero singular values
-*> IWORK(3) = if nonzero, a warning message:
-*> If IWORK(3) = 1 then some of the column norms of A
-*> were denormalized floats. The requested high accuracy
-*> is not warranted by the data.
-*> IWORK(4) = 1 or -1. If IWORK(4) = 1, then the procedure used A^* to
-*> do the job as specified by the JOB parameters.
-*> If the call to CGEJSV is a workspace query (indicated by LWORK = -1 and
-*> LRWORK = -1), then on exit IWORK(1) contains the required length of
-*> IWORK for the job parameters used in the call.
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*> INFO is INTEGER
-*> < 0: if INFO = -i, then the i-th argument had an illegal value.
-*> = 0: successful exit;
-*> > 0: CGEJSV did not converge in the maximal allowed number
-*> of sweeps. The computed values may be inaccurate.
-*> \endverbatim
-*
-* Authors:
-* ========
-*
-*> \author Univ. of Tennessee
-*> \author Univ. of California Berkeley
-*> \author Univ. of Colorado Denver
-*> \author NAG Ltd.
-*
-*> \ingroup complexGEsing
-*
-*> \par Further Details:
-* =====================
-*>
-*> \verbatim
-*> CGEJSV implements a preconditioned Jacobi SVD algorithm. It uses CGEQP3,
-*> CGEQRF, and CGELQF as preprocessors and preconditioners. Optionally, an
-*> additional row pivoting can be used as a preprocessor, which in some
-*> cases results in much higher accuracy. An example is matrix A with the
-*> structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned
-*> diagonal matrices and C is well-conditioned matrix. In that case, complete
-*> pivoting in the first QR factorizations provides accuracy dependent on the
-*> condition number of C, and independent of D1, D2. Such higher accuracy is
-*> not completely understood theoretically, but it works well in practice.
-*> Further, if A can be written as A = B*D, with well-conditioned B and some
-*> diagonal D, then the high accuracy is guaranteed, both theoretically and
-*> in software, independent of D. For more details see [1], [2].
-*> The computational range for the singular values can be the full range
-*> ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS
-*> & LAPACK routines called by CGEJSV are implemented to work in that range.
-*> If that is not the case, then the restriction for safe computation with
-*> the singular values in the range of normalized IEEE numbers is that the
-*> spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not
-*> overflow. This code (CGEJSV) is best used in this restricted range,
-*> meaning that singular values of magnitude below ||A||_2 / SLAMCH('O') are
-*> returned as zeros. See JOBR for details on this.
-*> Further, this implementation is somewhat slower than the one described
-*> in [1,2] due to replacement of some non-LAPACK components, and because
-*> the choice of some tuning parameters in the iterative part (CGESVJ) is
-*> left to the implementer on a particular machine.
-*> The rank revealing QR factorization (in this code: CGEQP3) should be
-*> implemented as in [3]. We have a new version of CGEQP3 under development
-*> that is more robust than the current one in LAPACK, with a cleaner cut in
-*> rank deficient cases. It will be available in the SIGMA library [4].
-*> If M is much larger than N, it is obvious that the initial QRF with
-*> column pivoting can be preprocessed by the QRF without pivoting. That
-*> well known trick is not used in CGEJSV because in some cases heavy row
-*> weighting can be treated with complete pivoting. The overhead in cases
-*> M much larger than N is then only due to pivoting, but the benefits in
-*> terms of accuracy have prevailed. The implementer/user can incorporate
-*> this extra QRF step easily. The implementer can also improve data movement
-*> (matrix transpose, matrix copy, matrix transposed copy) - this
-*> implementation of CGEJSV uses only the simplest, naive data movement.
-*> \endverbatim
-*
-*> \par Contributor:
-* ==================
-*>
-*> Zlatko Drmac (Zagreb, Croatia)
-*
-*> \par References:
-* ================
-*>
-*> \verbatim
-*>
-*> [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.
-*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.
-*> LAPACK Working note 169.
-*> [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.
-*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.
-*> LAPACK Working note 170.
-*> [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR
-*> factorization software - a case study.
-*> ACM Trans. Math. Softw. Vol. 35, No 2 (2008), pp. 1-28.
-*> LAPACK Working note 176.
-*> [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,
-*> QSVD, (H,K)-SVD computations.
-*> Department of Mathematics, University of Zagreb, 2008, 2016.
-*> \endverbatim
-*
-*> \par Bugs, examples and comments:
-* =================================
-*>
-*> Please report all bugs and send interesting examples and/or comments to
-*> drmac@math.hr. Thank you.
-*>
-* =====================================================================
- SUBROUTINE CGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
- $ M, N, A, LDA, SVA, U, LDU, V, LDV,
- $ CWORK, LWORK, RWORK, LRWORK, IWORK, INFO )
-*
-* -- LAPACK computational routine --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- IMPLICIT NONE
- INTEGER INFO, LDA, LDU, LDV, LWORK, LRWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), U( LDU, * ), V( LDV, * ), CWORK( LWORK )
- REAL SVA( N ), RWORK( LRWORK )
- INTEGER IWORK( * )
- CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
-* ..
-*
-* ===========================================================================
-*
-* .. Local Parameters ..
- REAL ZERO, ONE
- PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 )
- COMPLEX CZERO, CONE
- PARAMETER ( CZERO = ( 0.0E0, 0.0E0 ), CONE = ( 1.0E0, 0.0E0 ) )
-* ..
-* .. Local Scalars ..
- COMPLEX CTEMP
- REAL AAPP, AAQQ, AATMAX, AATMIN, BIG, BIG1, COND_OK,
- $ CONDR1, CONDR2, ENTRA, ENTRAT, EPSLN, MAXPRJ, SCALEM,
- $ SCONDA, SFMIN, SMALL, TEMP1, USCAL1, USCAL2, XSC
- INTEGER IERR, N1, NR, NUMRANK, p, q, WARNING
- LOGICAL ALMORT, DEFR, ERREST, GOSCAL, JRACC, KILL, LQUERY,
- $ LSVEC, L2ABER, L2KILL, L2PERT, L2RANK, L2TRAN, NOSCAL,
- $ ROWPIV, RSVEC, TRANSP
-*
- INTEGER OPTWRK, MINWRK, MINRWRK, MINIWRK
- INTEGER LWCON, LWLQF, LWQP3, LWQRF, LWUNMLQ, LWUNMQR, LWUNMQRM,
- $ LWSVDJ, LWSVDJV, LRWQP3, LRWCON, LRWSVDJ, IWOFF
- INTEGER LWRK_CGELQF, LWRK_CGEQP3, LWRK_CGEQP3N, LWRK_CGEQRF,
- $ LWRK_CGESVJ, LWRK_CGESVJV, LWRK_CGESVJU, LWRK_CUNMLQ,
- $ LWRK_CUNMQR, LWRK_CUNMQRM
-* ..
-* .. Local Arrays
- COMPLEX CDUMMY(1)
- REAL RDUMMY(1)
-*
-* .. Intrinsic Functions ..
- INTRINSIC ABS, CMPLX, CONJG, ALOG, MAX, MIN, REAL, NINT, SQRT
-* ..
-* .. External Functions ..
- REAL SLAMCH, SCNRM2
- INTEGER ISAMAX, ICAMAX
- LOGICAL LSAME
- EXTERNAL ISAMAX, ICAMAX, LSAME, SLAMCH, SCNRM2
-* ..
-* .. External Subroutines ..
- EXTERNAL SLASSQ, CCOPY, CGELQF, CGEQP3, CGEQRF, CLACPY, CLAPMR,
- $ CLASCL, SLASCL, CLASET, CLASSQ, CLASWP, CUNGQR, CUNMLQ,
- $ CUNMQR, CPOCON, SSCAL, CSSCAL, CSWAP, CTRSM, CLACGV,
- $ XERBLA
-*
- EXTERNAL CGESVJ
-* ..
-*
-* Test the input arguments
-*
- LSVEC = LSAME( JOBU, 'U' ) .OR. LSAME( JOBU, 'F' )
- JRACC = LSAME( JOBV, 'J' )
- RSVEC = LSAME( JOBV, 'V' ) .OR. JRACC
- ROWPIV = LSAME( JOBA, 'F' ) .OR. LSAME( JOBA, 'G' )
- L2RANK = LSAME( JOBA, 'R' )
- L2ABER = LSAME( JOBA, 'A' )
- ERREST = LSAME( JOBA, 'E' ) .OR. LSAME( JOBA, 'G' )
- L2TRAN = LSAME( JOBT, 'T' ) .AND. ( M .EQ. N )
- L2KILL = LSAME( JOBR, 'R' )
- DEFR = LSAME( JOBR, 'N' )
- L2PERT = LSAME( JOBP, 'P' )
-*
- LQUERY = ( LWORK .EQ. -1 ) .OR. ( LRWORK .EQ. -1 )
-*
- IF ( .NOT.(ROWPIV .OR. L2RANK .OR. L2ABER .OR.
- $ ERREST .OR. LSAME( JOBA, 'C' ) )) THEN
- INFO = - 1
- ELSE IF ( .NOT.( LSVEC .OR. LSAME( JOBU, 'N' ) .OR.
- $ ( LSAME( JOBU, 'W' ) .AND. RSVEC .AND. L2TRAN ) ) ) THEN
- INFO = - 2
- ELSE IF ( .NOT.( RSVEC .OR. LSAME( JOBV, 'N' ) .OR.
- $ ( LSAME( JOBV, 'W' ) .AND. LSVEC .AND. L2TRAN ) ) ) THEN
- INFO = - 3
- ELSE IF ( .NOT. ( L2KILL .OR. DEFR ) ) THEN
- INFO = - 4
- ELSE IF ( .NOT. ( LSAME(JOBT,'T') .OR. LSAME(JOBT,'N') ) ) THEN
- INFO = - 5
- ELSE IF ( .NOT. ( L2PERT .OR. LSAME( JOBP, 'N' ) ) ) THEN
- INFO = - 6
- ELSE IF ( M .LT. 0 ) THEN
- INFO = - 7
- ELSE IF ( ( N .LT. 0 ) .OR. ( N .GT. M ) ) THEN
- INFO = - 8
- ELSE IF ( LDA .LT. M ) THEN
- INFO = - 10
- ELSE IF ( LSVEC .AND. ( LDU .LT. M ) ) THEN
- INFO = - 13
- ELSE IF ( RSVEC .AND. ( LDV .LT. N ) ) THEN
- INFO = - 15
- ELSE
-* #:)
- INFO = 0
- END IF
-*
- IF ( INFO .EQ. 0 ) THEN
-* .. compute the minimal and the optimal workspace lengths
-* [[The expressions for computing the minimal and the optimal
-* values of LCWORK, LRWORK are written with a lot of redundancy and
-* can be simplified. However, this verbose form is useful for
-* maintenance and modifications of the code.]]
-*
-* .. minimal workspace length for CGEQP3 of an M x N matrix,
-* CGEQRF of an N x N matrix, CGELQF of an N x N matrix,
-* CUNMLQ for computing N x N matrix, CUNMQR for computing N x N
-* matrix, CUNMQR for computing M x N matrix, respectively.
- LWQP3 = N+1
- LWQRF = MAX( 1, N )
- LWLQF = MAX( 1, N )
- LWUNMLQ = MAX( 1, N )
- LWUNMQR = MAX( 1, N )
- LWUNMQRM = MAX( 1, M )
-* .. minimal workspace length for CPOCON of an N x N matrix
- LWCON = 2 * N
-* .. minimal workspace length for CGESVJ of an N x N matrix,
-* without and with explicit accumulation of Jacobi rotations
- LWSVDJ = MAX( 2 * N, 1 )
- LWSVDJV = MAX( 2 * N, 1 )
-* .. minimal REAL workspace length for CGEQP3, CPOCON, CGESVJ
- LRWQP3 = 2 * N
- LRWCON = N
- LRWSVDJ = N
- IF ( LQUERY ) THEN
- CALL CGEQP3( M, N, A, LDA, IWORK, CDUMMY, CDUMMY, -1,
- $ RDUMMY, IERR )
- LWRK_CGEQP3 = INT( CDUMMY(1) )
- CALL CGEQRF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR )
- LWRK_CGEQRF = INT( CDUMMY(1) )
- CALL CGELQF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR )
- LWRK_CGELQF = INT( CDUMMY(1) )
- END IF
- MINWRK = 2
- OPTWRK = 2
- MINIWRK = N
- IF ( .NOT. (LSVEC .OR. RSVEC ) ) THEN
-* .. minimal and optimal sizes of the complex workspace if
-* only the singular values are requested
- IF ( ERREST ) THEN
- MINWRK = MAX( N+LWQP3, N**2+LWCON, N+LWQRF, LWSVDJ )
- ELSE
- MINWRK = MAX( N+LWQP3, N+LWQRF, LWSVDJ )
- END IF
- IF ( LQUERY ) THEN
- CALL CGESVJ( 'L', 'N', 'N', N, N, A, LDA, SVA, N, V,
- $ LDV, CDUMMY, -1, RDUMMY, -1, IERR )
- LWRK_CGESVJ = INT( CDUMMY(1) )
- IF ( ERREST ) THEN
- OPTWRK = MAX( N+LWRK_CGEQP3, N**2+LWCON,
- $ N+LWRK_CGEQRF, LWRK_CGESVJ )
- ELSE
- OPTWRK = MAX( N+LWRK_CGEQP3, N+LWRK_CGEQRF,
- $ LWRK_CGESVJ )
- END IF
- END IF
- IF ( L2TRAN .OR. ROWPIV ) THEN
- IF ( ERREST ) THEN
- MINRWRK = MAX( 7, 2*M, LRWQP3, LRWCON, LRWSVDJ )
- ELSE
- MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ )
- END IF
- ELSE
- IF ( ERREST ) THEN
- MINRWRK = MAX( 7, LRWQP3, LRWCON, LRWSVDJ )
- ELSE
- MINRWRK = MAX( 7, LRWQP3, LRWSVDJ )
- END IF
- END IF
- IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
- ELSE IF ( RSVEC .AND. (.NOT.LSVEC) ) THEN
-* .. minimal and optimal sizes of the complex workspace if the
-* singular values and the right singular vectors are requested
- IF ( ERREST ) THEN
- MINWRK = MAX( N+LWQP3, LWCON, LWSVDJ, N+LWLQF,
- $ 2*N+LWQRF, N+LWSVDJ, N+LWUNMLQ )
- ELSE
- MINWRK = MAX( N+LWQP3, LWSVDJ, N+LWLQF, 2*N+LWQRF,
- $ N+LWSVDJ, N+LWUNMLQ )
- END IF
- IF ( LQUERY ) THEN
- CALL CGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A,
- $ LDA, CDUMMY, -1, RDUMMY, -1, IERR )
- LWRK_CGESVJ = INT( CDUMMY(1) )
- CALL CUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY,
- $ V, LDV, CDUMMY, -1, IERR )
- LWRK_CUNMLQ = INT( CDUMMY(1) )
- IF ( ERREST ) THEN
- OPTWRK = MAX( N+LWRK_CGEQP3, LWCON, LWRK_CGESVJ,
- $ N+LWRK_CGELQF, 2*N+LWRK_CGEQRF,
- $ N+LWRK_CGESVJ, N+LWRK_CUNMLQ )
- ELSE
- OPTWRK = MAX( N+LWRK_CGEQP3, LWRK_CGESVJ,N+LWRK_CGELQF,
- $ 2*N+LWRK_CGEQRF, N+LWRK_CGESVJ,
- $ N+LWRK_CUNMLQ )
- END IF
- END IF
- IF ( L2TRAN .OR. ROWPIV ) THEN
- IF ( ERREST ) THEN
- MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON )
- ELSE
- MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ )
- END IF
- ELSE
- IF ( ERREST ) THEN
- MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )
- ELSE
- MINRWRK = MAX( 7, LRWQP3, LRWSVDJ )
- END IF
- END IF
- IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
- ELSE IF ( LSVEC .AND. (.NOT.RSVEC) ) THEN
-* .. minimal and optimal sizes of the complex workspace if the
-* singular values and the left singular vectors are requested
- IF ( ERREST ) THEN
- MINWRK = N + MAX( LWQP3,LWCON,N+LWQRF,LWSVDJ,LWUNMQRM )
- ELSE
- MINWRK = N + MAX( LWQP3, N+LWQRF, LWSVDJ, LWUNMQRM )
- END IF
- IF ( LQUERY ) THEN
- CALL CGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A,
- $ LDA, CDUMMY, -1, RDUMMY, -1, IERR )
- LWRK_CGESVJ = INT( CDUMMY(1) )
- CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,
- $ LDU, CDUMMY, -1, IERR )
- LWRK_CUNMQRM = INT( CDUMMY(1) )
- IF ( ERREST ) THEN
- OPTWRK = N + MAX( LWRK_CGEQP3, LWCON, N+LWRK_CGEQRF,
- $ LWRK_CGESVJ, LWRK_CUNMQRM )
- ELSE
- OPTWRK = N + MAX( LWRK_CGEQP3, N+LWRK_CGEQRF,
- $ LWRK_CGESVJ, LWRK_CUNMQRM )
- END IF
- END IF
- IF ( L2TRAN .OR. ROWPIV ) THEN
- IF ( ERREST ) THEN
- MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON )
- ELSE
- MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ )
- END IF
- ELSE
- IF ( ERREST ) THEN
- MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )
- ELSE
- MINRWRK = MAX( 7, LRWQP3, LRWSVDJ )
- END IF
- END IF
- IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
- ELSE
-* .. minimal and optimal sizes of the complex workspace if the
-* full SVD is requested
- IF ( .NOT. JRACC ) THEN
- IF ( ERREST ) THEN
- MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+N**2+LWCON,
- $ 2*N+LWQRF, 2*N+LWQP3,
- $ 2*N+N**2+N+LWLQF, 2*N+N**2+N+N**2+LWCON,
- $ 2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV,
- $ 2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ,
- $ N+N**2+LWSVDJ, N+LWUNMQRM )
- ELSE
- MINWRK = MAX( N+LWQP3, 2*N+N**2+LWCON,
- $ 2*N+LWQRF, 2*N+LWQP3,
- $ 2*N+N**2+N+LWLQF, 2*N+N**2+N+N**2+LWCON,
- $ 2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV,
- $ 2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ,
- $ N+N**2+LWSVDJ, N+LWUNMQRM )
- END IF
- MINIWRK = MINIWRK + N
- IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
- ELSE
- IF ( ERREST ) THEN
- MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+LWQRF,
- $ 2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR,
- $ N+LWUNMQRM )
- ELSE
- MINWRK = MAX( N+LWQP3, 2*N+LWQRF,
- $ 2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR,
- $ N+LWUNMQRM )
- END IF
- IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
- END IF
- IF ( LQUERY ) THEN
- CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,
- $ LDU, CDUMMY, -1, IERR )
- LWRK_CUNMQRM = INT( CDUMMY(1) )
- CALL CUNMQR( 'L', 'N', N, N, N, A, LDA, CDUMMY, U,
- $ LDU, CDUMMY, -1, IERR )
- LWRK_CUNMQR = INT( CDUMMY(1) )
- IF ( .NOT. JRACC ) THEN
- CALL CGEQP3( N,N, A, LDA, IWORK, CDUMMY,CDUMMY, -1,
- $ RDUMMY, IERR )
- LWRK_CGEQP3N = INT( CDUMMY(1) )
- CALL CGESVJ( 'L', 'U', 'N', N, N, U, LDU, SVA,
- $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
- LWRK_CGESVJ = INT( CDUMMY(1) )
- CALL CGESVJ( 'U', 'U', 'N', N, N, U, LDU, SVA,
- $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
- LWRK_CGESVJU = INT( CDUMMY(1) )
- CALL CGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA,
- $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
- LWRK_CGESVJV = INT( CDUMMY(1) )
- CALL CUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY,
- $ V, LDV, CDUMMY, -1, IERR )
- LWRK_CUNMLQ = INT( CDUMMY(1) )
- IF ( ERREST ) THEN
- OPTWRK = MAX( N+LWRK_CGEQP3, N+LWCON,
- $ 2*N+N**2+LWCON, 2*N+LWRK_CGEQRF,
- $ 2*N+LWRK_CGEQP3N,
- $ 2*N+N**2+N+LWRK_CGELQF,
- $ 2*N+N**2+N+N**2+LWCON,
- $ 2*N+N**2+N+LWRK_CGESVJ,
- $ 2*N+N**2+N+LWRK_CGESVJV,
- $ 2*N+N**2+N+LWRK_CUNMQR,
- $ 2*N+N**2+N+LWRK_CUNMLQ,
- $ N+N**2+LWRK_CGESVJU,
- $ N+LWRK_CUNMQRM )
- ELSE
- OPTWRK = MAX( N+LWRK_CGEQP3,
- $ 2*N+N**2+LWCON, 2*N+LWRK_CGEQRF,
- $ 2*N+LWRK_CGEQP3N,
- $ 2*N+N**2+N+LWRK_CGELQF,
- $ 2*N+N**2+N+N**2+LWCON,
- $ 2*N+N**2+N+LWRK_CGESVJ,
- $ 2*N+N**2+N+LWRK_CGESVJV,
- $ 2*N+N**2+N+LWRK_CUNMQR,
- $ 2*N+N**2+N+LWRK_CUNMLQ,
- $ N+N**2+LWRK_CGESVJU,
- $ N+LWRK_CUNMQRM )
- END IF
- ELSE
- CALL CGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA,
- $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
- LWRK_CGESVJV = INT( CDUMMY(1) )
- CALL CUNMQR( 'L', 'N', N, N, N, CDUMMY, N, CDUMMY,
- $ V, LDV, CDUMMY, -1, IERR )
- LWRK_CUNMQR = INT( CDUMMY(1) )
- CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,
- $ LDU, CDUMMY, -1, IERR )
- LWRK_CUNMQRM = INT( CDUMMY(1) )
- IF ( ERREST ) THEN
- OPTWRK = MAX( N+LWRK_CGEQP3, N+LWCON,
- $ 2*N+LWRK_CGEQRF, 2*N+N**2,
- $ 2*N+N**2+LWRK_CGESVJV,
- $ 2*N+N**2+N+LWRK_CUNMQR,N+LWRK_CUNMQRM )
- ELSE
- OPTWRK = MAX( N+LWRK_CGEQP3, 2*N+LWRK_CGEQRF,
- $ 2*N+N**2, 2*N+N**2+LWRK_CGESVJV,
- $ 2*N+N**2+N+LWRK_CUNMQR,
- $ N+LWRK_CUNMQRM )
- END IF
- END IF
- END IF
- IF ( L2TRAN .OR. ROWPIV ) THEN
- MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON )
- ELSE
- MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )
- END IF
- END IF
- MINWRK = MAX( 2, MINWRK )
- OPTWRK = MAX( OPTWRK, MINWRK )
- IF ( LWORK .LT. MINWRK .AND. (.NOT.LQUERY) ) INFO = - 17
- IF ( LRWORK .LT. MINRWRK .AND. (.NOT.LQUERY) ) INFO = - 19
- END IF
-*
- IF ( INFO .NE. 0 ) THEN
-* #:(
- CALL XERBLA( 'CGEJSV', - INFO )
- RETURN
- ELSE IF ( LQUERY ) THEN
- CWORK(1) = OPTWRK
- CWORK(2) = MINWRK
- RWORK(1) = MINRWRK
- IWORK(1) = MAX( 4, MINIWRK )
- RETURN
- END IF
-*
-* Quick return for void matrix (Y3K safe)
-* #:)
- IF ( ( M .EQ. 0 ) .OR. ( N .EQ. 0 ) ) THEN
- IWORK(1:4) = 0
- RWORK(1:7) = 0
- RETURN
- ENDIF
-*
-* Determine whether the matrix U should be M x N or M x M
-*
- IF ( LSVEC ) THEN
- N1 = N
- IF ( LSAME( JOBU, 'F' ) ) N1 = M
- END IF
-*
-* Set numerical parameters
-*
-*! NOTE: Make sure SLAMCH() does not fail on the target architecture.
-*
- EPSLN = SLAMCH('Epsilon')
- SFMIN = SLAMCH('SafeMinimum')
- SMALL = SFMIN / EPSLN
- BIG = SLAMCH('O')
-* BIG = ONE / SFMIN
-*
-* Initialize SVA(1:N) = diag( ||A e_i||_2 )_1^N
-*
-*(!) If necessary, scale SVA() to protect the largest norm from
-* overflow. It is possible that this scaling pushes the smallest
-* column norm left from the underflow threshold (extreme case).
-*
- SCALEM = ONE / SQRT(REAL(M)*REAL(N))
- NOSCAL = .TRUE.
- GOSCAL = .TRUE.
- DO 1874 p = 1, N
- AAPP = ZERO
- AAQQ = ONE
- CALL CLASSQ( M, A(1,p), 1, AAPP, AAQQ )
- IF ( AAPP .GT. BIG ) THEN
- INFO = - 9
- CALL XERBLA( 'CGEJSV', -INFO )
- RETURN
- END IF
- AAQQ = SQRT(AAQQ)
- IF ( ( AAPP .LT. (BIG / AAQQ) ) .AND. NOSCAL ) THEN
- SVA(p) = AAPP * AAQQ
- ELSE
- NOSCAL = .FALSE.
- SVA(p) = AAPP * ( AAQQ * SCALEM )
- IF ( GOSCAL ) THEN
- GOSCAL = .FALSE.
- CALL SSCAL( p-1, SCALEM, SVA, 1 )
- END IF
- END IF
- 1874 CONTINUE
-*
- IF ( NOSCAL ) SCALEM = ONE
-*
- AAPP = ZERO
- AAQQ = BIG
- DO 4781 p = 1, N
- AAPP = MAX( AAPP, SVA(p) )
- IF ( SVA(p) .NE. ZERO ) AAQQ = MIN( AAQQ, SVA(p) )
- 4781 CONTINUE
-*
-* Quick return for zero M x N matrix
-* #:)
- IF ( AAPP .EQ. ZERO ) THEN
- IF ( LSVEC ) CALL CLASET( 'G', M, N1, CZERO, CONE, U, LDU )
- IF ( RSVEC ) CALL CLASET( 'G', N, N, CZERO, CONE, V, LDV )
- RWORK(1) = ONE
- RWORK(2) = ONE
- IF ( ERREST ) RWORK(3) = ONE
- IF ( LSVEC .AND. RSVEC ) THEN
- RWORK(4) = ONE
- RWORK(5) = ONE
- END IF
- IF ( L2TRAN ) THEN
- RWORK(6) = ZERO
- RWORK(7) = ZERO
- END IF
- IWORK(1) = 0
- IWORK(2) = 0
- IWORK(3) = 0
- IWORK(4) = -1
- RETURN
- END IF
-*
-* Issue warning if denormalized column norms detected. Override the
-* high relative accuracy request. Issue licence to kill nonzero columns
-* (set them to zero) whose norm is less than sigma_max / BIG (roughly).
-* #:(
- WARNING = 0
- IF ( AAQQ .LE. SFMIN ) THEN
- L2RANK = .TRUE.
- L2KILL = .TRUE.
- WARNING = 1
- END IF
-*
-* Quick return for one-column matrix
-* #:)
- IF ( N .EQ. 1 ) THEN
-*
- IF ( LSVEC ) THEN
- CALL CLASCL( 'G',0,0,SVA(1),SCALEM, M,1,A(1,1),LDA,IERR )
- CALL CLACPY( 'A', M, 1, A, LDA, U, LDU )
-* computing all M left singular vectors of the M x 1 matrix
- IF ( N1 .NE. N ) THEN
- CALL CGEQRF( M, N, U,LDU, CWORK, CWORK(N+1),LWORK-N,IERR )
- CALL CUNGQR( M,N1,1, U,LDU,CWORK,CWORK(N+1),LWORK-N,IERR )
- CALL CCOPY( M, A(1,1), 1, U(1,1), 1 )
- END IF
- END IF
- IF ( RSVEC ) THEN
- V(1,1) = CONE
- END IF
- IF ( SVA(1) .LT. (BIG*SCALEM) ) THEN
- SVA(1) = SVA(1) / SCALEM
- SCALEM = ONE
- END IF
- RWORK(1) = ONE / SCALEM
- RWORK(2) = ONE
- IF ( SVA(1) .NE. ZERO ) THEN
- IWORK(1) = 1
- IF ( ( SVA(1) / SCALEM) .GE. SFMIN ) THEN
- IWORK(2) = 1
- ELSE
- IWORK(2) = 0
- END IF
- ELSE
- IWORK(1) = 0
- IWORK(2) = 0
- END IF
- IWORK(3) = 0
- IWORK(4) = -1
- IF ( ERREST ) RWORK(3) = ONE
- IF ( LSVEC .AND. RSVEC ) THEN
- RWORK(4) = ONE
- RWORK(5) = ONE
- END IF
- IF ( L2TRAN ) THEN
- RWORK(6) = ZERO
- RWORK(7) = ZERO
- END IF
- RETURN
-*
- END IF
-*
- TRANSP = .FALSE.
-*
- AATMAX = -ONE
- AATMIN = BIG
- IF ( ROWPIV .OR. L2TRAN ) THEN
-*
-* Compute the row norms, needed to determine row pivoting sequence
-* (in the case of heavily row weighted A, row pivoting is strongly
-* advised) and to collect information needed to compare the
-* structures of A * A^* and A^* * A (in the case L2TRAN.EQ..TRUE.).
-*
- IF ( L2TRAN ) THEN
- DO 1950 p = 1, M
- XSC = ZERO
- TEMP1 = ONE
- CALL CLASSQ( N, A(p,1), LDA, XSC, TEMP1 )
-* CLASSQ gets both the ell_2 and the ell_infinity norm
-* in one pass through the vector
- RWORK(M+p) = XSC * SCALEM
- RWORK(p) = XSC * (SCALEM*SQRT(TEMP1))
- AATMAX = MAX( AATMAX, RWORK(p) )
- IF (RWORK(p) .NE. ZERO)
- $ AATMIN = MIN(AATMIN,RWORK(p))
- 1950 CONTINUE
- ELSE
- DO 1904 p = 1, M
- RWORK(M+p) = SCALEM*ABS( A(p,ICAMAX(N,A(p,1),LDA)) )
- AATMAX = MAX( AATMAX, RWORK(M+p) )
- AATMIN = MIN( AATMIN, RWORK(M+p) )
- 1904 CONTINUE
- END IF
-*
- END IF
-*
-* For square matrix A try to determine whether A^* would be better
-* input for the preconditioned Jacobi SVD, with faster convergence.
-* The decision is based on an O(N) function of the vector of column
-* and row norms of A, based on the Shannon entropy. This should give
-* the right choice in most cases when the difference actually matters.
-* It may fail and pick the slower converging side.
-*
- ENTRA = ZERO
- ENTRAT = ZERO
- IF ( L2TRAN ) THEN
-*
- XSC = ZERO
- TEMP1 = ONE
- CALL SLASSQ( N, SVA, 1, XSC, TEMP1 )
- TEMP1 = ONE / TEMP1
-*
- ENTRA = ZERO
- DO 1113 p = 1, N
- BIG1 = ( ( SVA(p) / XSC )**2 ) * TEMP1
- IF ( BIG1 .NE. ZERO ) ENTRA = ENTRA + BIG1 * ALOG(BIG1)
- 1113 CONTINUE
- ENTRA = - ENTRA / ALOG(REAL(N))
-*
-* Now, SVA().^2/Trace(A^* * A) is a point in the probability simplex.
-* It is derived from the diagonal of A^* * A. Do the same with the
-* diagonal of A * A^*, compute the entropy of the corresponding
-* probability distribution. Note that A * A^* and A^* * A have the
-* same trace.
-*
- ENTRAT = ZERO
- DO 1114 p = 1, M
- BIG1 = ( ( RWORK(p) / XSC )**2 ) * TEMP1
- IF ( BIG1 .NE. ZERO ) ENTRAT = ENTRAT + BIG1 * ALOG(BIG1)
- 1114 CONTINUE
- ENTRAT = - ENTRAT / ALOG(REAL(M))
-*
-* Analyze the entropies and decide A or A^*. Smaller entropy
-* usually means better input for the algorithm.
-*
- TRANSP = ( ENTRAT .LT. ENTRA )
-*
-* If A^* is better than A, take the adjoint of A. This is allowed
-* only for square matrices, M=N.
- IF ( TRANSP ) THEN
-* In an optimal implementation, this trivial transpose
-* should be replaced with faster transpose.
- DO 1115 p = 1, N - 1
- A(p,p) = CONJG(A(p,p))
- DO 1116 q = p + 1, N
- CTEMP = CONJG(A(q,p))
- A(q,p) = CONJG(A(p,q))
- A(p,q) = CTEMP
- 1116 CONTINUE
- 1115 CONTINUE
- A(N,N) = CONJG(A(N,N))
- DO 1117 p = 1, N
- RWORK(M+p) = SVA(p)
- SVA(p) = RWORK(p)
-* previously computed row 2-norms are now column 2-norms
-* of the transposed matrix
- 1117 CONTINUE
- TEMP1 = AAPP
- AAPP = AATMAX
- AATMAX = TEMP1
- TEMP1 = AAQQ
- AAQQ = AATMIN
- AATMIN = TEMP1
- KILL = LSVEC
- LSVEC = RSVEC
- RSVEC = KILL
- IF ( LSVEC ) N1 = N
-*
- ROWPIV = .TRUE.
- END IF
-*
- END IF
-* END IF L2TRAN
-*
-* Scale the matrix so that its maximal singular value remains less
-* than SQRT(BIG) -- the matrix is scaled so that its maximal column
-* has Euclidean norm equal to SQRT(BIG/N). The only reason to keep
-* SQRT(BIG) instead of BIG is the fact that CGEJSV uses LAPACK and
-* BLAS routines that, in some implementations, are not capable of
-* working in the full interval [SFMIN,BIG] and that they may provoke
-* overflows in the intermediate results. If the singular values spread
-* from SFMIN to BIG, then CGESVJ will compute them. So, in that case,
-* one should use CGESVJ instead of CGEJSV.
- BIG1 = SQRT( BIG )
- TEMP1 = SQRT( BIG / REAL(N) )
-* >> for future updates: allow bigger range, i.e. the largest column
-* will be allowed up to BIG/N and CGESVJ will do the rest. However, for
-* this all other (LAPACK) components must allow such a range.
-* TEMP1 = BIG/REAL(N)
-* TEMP1 = BIG * EPSLN this should 'almost' work with current LAPACK components
- CALL SLASCL( 'G', 0, 0, AAPP, TEMP1, N, 1, SVA, N, IERR )
- IF ( AAQQ .GT. (AAPP * SFMIN) ) THEN
- AAQQ = ( AAQQ / AAPP ) * TEMP1
- ELSE
- AAQQ = ( AAQQ * TEMP1 ) / AAPP
- END IF
- TEMP1 = TEMP1 * SCALEM
- CALL CLASCL( 'G', 0, 0, AAPP, TEMP1, M, N, A, LDA, IERR )
-*
-* To undo scaling at the end of this procedure, multiply the
-* computed singular values with USCAL2 / USCAL1.
-*
- USCAL1 = TEMP1
- USCAL2 = AAPP
-*
- IF ( L2KILL ) THEN
-* L2KILL enforces computation of nonzero singular values in
-* the restricted range of condition number of the initial A,
-* sigma_max(A) / sigma_min(A) approx. SQRT(BIG)/SQRT(SFMIN).
- XSC = SQRT( SFMIN )
- ELSE
- XSC = SMALL
-*
-* Now, if the condition number of A is too big,
-* sigma_max(A) / sigma_min(A) .GT. SQRT(BIG/N) * EPSLN / SFMIN,
-* as a precaution measure, the full SVD is computed using CGESVJ
-* with accumulated Jacobi rotations. This provides numerically
-* more robust computation, at the cost of slightly increased run
-* time. Depending on the concrete implementation of BLAS and LAPACK
-* (i.e. how they behave in presence of extreme ill-conditioning) the
-* implementor may decide to remove this switch.
- IF ( ( AAQQ.LT.SQRT(SFMIN) ) .AND. LSVEC .AND. RSVEC ) THEN
- JRACC = .TRUE.
- END IF
-*
- END IF
- IF ( AAQQ .LT. XSC ) THEN
- DO 700 p = 1, N
- IF ( SVA(p) .LT. XSC ) THEN
- CALL CLASET( 'A', M, 1, CZERO, CZERO, A(1,p), LDA )
- SVA(p) = ZERO
- END IF
- 700 CONTINUE
- END IF
-*
-* Preconditioning using QR factorization with pivoting
-*
- IF ( ROWPIV ) THEN
-* Optional row permutation (Bjoerck row pivoting):
-* A result by Cox and Higham shows that the Bjoerck's
-* row pivoting combined with standard column pivoting
-* has similar effect as Powell-Reid complete pivoting.
-* The ell-infinity norms of A are made nonincreasing.
- IF ( ( LSVEC .AND. RSVEC ) .AND. .NOT.( JRACC ) ) THEN
- IWOFF = 2*N
- ELSE
- IWOFF = N
- END IF
- DO 1952 p = 1, M - 1
- q = ISAMAX( M-p+1, RWORK(M+p), 1 ) + p - 1
- IWORK(IWOFF+p) = q
- IF ( p .NE. q ) THEN
- TEMP1 = RWORK(M+p)
- RWORK(M+p) = RWORK(M+q)
- RWORK(M+q) = TEMP1
- END IF
- 1952 CONTINUE
- CALL CLASWP( N, A, LDA, 1, M-1, IWORK(IWOFF+1), 1 )
- END IF
-*
-* End of the preparation phase (scaling, optional sorting and
-* transposing, optional flushing of small columns).
-*
-* Preconditioning
-*
-* If the full SVD is needed, the right singular vectors are computed
-* from a matrix equation, and for that we need theoretical analysis
-* of the Businger-Golub pivoting. So we use CGEQP3 as the first RR QRF.
-* In all other cases the first RR QRF can be chosen by other criteria
-* (eg speed by replacing global with restricted window pivoting, such
-* as in xGEQPX from TOMS # 782). Good results will be obtained using
-* xGEQPX with properly (!) chosen numerical parameters.
-* Any improvement of CGEQP3 improves overall performance of CGEJSV.
-*
-* A * P1 = Q1 * [ R1^* 0]^*:
- DO 1963 p = 1, N
-* .. all columns are free columns
- IWORK(p) = 0
- 1963 CONTINUE
- CALL CGEQP3( M, N, A, LDA, IWORK, CWORK, CWORK(N+1), LWORK-N,
- $ RWORK, IERR )
-*
-* The upper triangular matrix R1 from the first QRF is inspected for
-* rank deficiency and possibilities for deflation, or possible
-* ill-conditioning. Depending on the user specified flag L2RANK,
-* the procedure explores possibilities to reduce the numerical
-* rank by inspecting the computed upper triangular factor. If
-* L2RANK or L2ABER are up, then CGEJSV will compute the SVD of
-* A + dA, where ||dA|| <= f(M,N)*EPSLN.
-*
- NR = 1
- IF ( L2ABER ) THEN
-* Standard absolute error bound suffices. All sigma_i with
-* sigma_i < N*EPSLN*||A|| are flushed to zero. This is an
-* aggressive enforcement of lower numerical rank by introducing a
-* backward error of the order of N*EPSLN*||A||.
- TEMP1 = SQRT(REAL(N))*EPSLN
- DO 3001 p = 2, N
- IF ( ABS(A(p,p)) .GE. (TEMP1*ABS(A(1,1))) ) THEN
- NR = NR + 1
- ELSE
- GO TO 3002
- END IF
- 3001 CONTINUE
- 3002 CONTINUE
- ELSE IF ( L2RANK ) THEN
-* .. similarly as above, only slightly more gentle (less aggressive).
-* Sudden drop on the diagonal of R1 is used as the criterion for
-* close-to-rank-deficient.
- TEMP1 = SQRT(SFMIN)
- DO 3401 p = 2, N
- IF ( ( ABS(A(p,p)) .LT. (EPSLN*ABS(A(p-1,p-1))) ) .OR.
- $ ( ABS(A(p,p)) .LT. SMALL ) .OR.
- $ ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3402
- NR = NR + 1
- 3401 CONTINUE
- 3402 CONTINUE
-*
- ELSE
-* The goal is high relative accuracy. However, if the matrix
-* has high scaled condition number the relative accuracy is in
-* general not feasible. Later on, a condition number estimator
-* will be deployed to estimate the scaled condition number.
-* Here we just remove the underflowed part of the triangular
-* factor. This prevents the situation in which the code is
-* working hard to get the accuracy not warranted by the data.
- TEMP1 = SQRT(SFMIN)
- DO 3301 p = 2, N
- IF ( ( ABS(A(p,p)) .LT. SMALL ) .OR.
- $ ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3302
- NR = NR + 1
- 3301 CONTINUE
- 3302 CONTINUE
-*
- END IF
-*
- ALMORT = .FALSE.
- IF ( NR .EQ. N ) THEN
- MAXPRJ = ONE
- DO 3051 p = 2, N
- TEMP1 = ABS(A(p,p)) / SVA(IWORK(p))
- MAXPRJ = MIN( MAXPRJ, TEMP1 )
- 3051 CONTINUE
- IF ( MAXPRJ**2 .GE. ONE - REAL(N)*EPSLN ) ALMORT = .TRUE.
- END IF
-*
-*
- SCONDA = - ONE
- CONDR1 = - ONE
- CONDR2 = - ONE
-*
- IF ( ERREST ) THEN
- IF ( N .EQ. NR ) THEN
- IF ( RSVEC ) THEN
-* .. V is available as workspace
- CALL CLACPY( 'U', N, N, A, LDA, V, LDV )
- DO 3053 p = 1, N
- TEMP1 = SVA(IWORK(p))
- CALL CSSCAL( p, ONE/TEMP1, V(1,p), 1 )
- 3053 CONTINUE
- IF ( LSVEC )THEN
- CALL CPOCON( 'U', N, V, LDV, ONE, TEMP1,
- $ CWORK(N+1), RWORK, IERR )
- ELSE
- CALL CPOCON( 'U', N, V, LDV, ONE, TEMP1,
- $ CWORK, RWORK, IERR )
- END IF
-*
- ELSE IF ( LSVEC ) THEN
-* .. U is available as workspace
- CALL CLACPY( 'U', N, N, A, LDA, U, LDU )
- DO 3054 p = 1, N
- TEMP1 = SVA(IWORK(p))
- CALL CSSCAL( p, ONE/TEMP1, U(1,p), 1 )
- 3054 CONTINUE
- CALL CPOCON( 'U', N, U, LDU, ONE, TEMP1,
- $ CWORK(N+1), RWORK, IERR )
- ELSE
- CALL CLACPY( 'U', N, N, A, LDA, CWORK, N )
-*[] CALL CLACPY( 'U', N, N, A, LDA, CWORK(N+1), N )
-* Change: here index shifted by N to the left, CWORK(1:N)
-* not needed for SIGMA only computation
- DO 3052 p = 1, N
- TEMP1 = SVA(IWORK(p))
-*[] CALL CSSCAL( p, ONE/TEMP1, CWORK(N+(p-1)*N+1), 1 )
- CALL CSSCAL( p, ONE/TEMP1, CWORK((p-1)*N+1), 1 )
- 3052 CONTINUE
-* .. the columns of R are scaled to have unit Euclidean lengths.
-*[] CALL CPOCON( 'U', N, CWORK(N+1), N, ONE, TEMP1,
-*[] $ CWORK(N+N*N+1), RWORK, IERR )
- CALL CPOCON( 'U', N, CWORK, N, ONE, TEMP1,
- $ CWORK(N*N+1), RWORK, IERR )
-*
- END IF
- IF ( TEMP1 .NE. ZERO ) THEN
- SCONDA = ONE / SQRT(TEMP1)
- ELSE
- SCONDA = - ONE
- END IF
-* SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1).
-* N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA
- ELSE
- SCONDA = - ONE
- END IF
- END IF
-*
- L2PERT = L2PERT .AND. ( ABS( A(1,1)/A(NR,NR) ) .GT. SQRT(BIG1) )
-* If there is no violent scaling, artificial perturbation is not needed.
-*
-* Phase 3:
-*
- IF ( .NOT. ( RSVEC .OR. LSVEC ) ) THEN
-*
-* Singular Values only
-*
-* .. transpose A(1:NR,1:N)
- DO 1946 p = 1, MIN( N-1, NR )
- CALL CCOPY( N-p, A(p,p+1), LDA, A(p+1,p), 1 )
- CALL CLACGV( N-p+1, A(p,p), 1 )
- 1946 CONTINUE
- IF ( NR .EQ. N ) A(N,N) = CONJG(A(N,N))
-*
-* The following two DO-loops introduce small relative perturbation
-* into the strict upper triangle of the lower triangular matrix.
-* Small entries below the main diagonal are also changed.
-* This modification is useful if the computing environment does not
-* provide/allow FLUSH TO ZERO underflow, for it prevents many
-* annoying denormalized numbers in case of strongly scaled matrices.
-* The perturbation is structured so that it does not introduce any
-* new perturbation of the singular values, and it does not destroy
-* the job done by the preconditioner.
-* The licence for this perturbation is in the variable L2PERT, which
-* should be .FALSE. if FLUSH TO ZERO underflow is active.
-*
- IF ( .NOT. ALMORT ) THEN
-*
- IF ( L2PERT ) THEN
-* XSC = SQRT(SMALL)
- XSC = EPSLN / REAL(N)
- DO 4947 q = 1, NR
- CTEMP = CMPLX(XSC*ABS(A(q,q)),ZERO)
- DO 4949 p = 1, N
- IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) )
- $ .OR. ( p .LT. q ) )
-* $ A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) )
- $ A(p,q) = CTEMP
- 4949 CONTINUE
- 4947 CONTINUE
- ELSE
- CALL CLASET( 'U', NR-1,NR-1, CZERO,CZERO, A(1,2),LDA )
- END IF
-*
-* .. second preconditioning using the QR factorization
-*
- CALL CGEQRF( N,NR, A,LDA, CWORK, CWORK(N+1),LWORK-N, IERR )
-*
-* .. and transpose upper to lower triangular
- DO 1948 p = 1, NR - 1
- CALL CCOPY( NR-p, A(p,p+1), LDA, A(p+1,p), 1 )
- CALL CLACGV( NR-p+1, A(p,p), 1 )
- 1948 CONTINUE
-*
- END IF
-*
-* Row-cyclic Jacobi SVD algorithm with column pivoting
-*
-* .. again some perturbation (a "background noise") is added
-* to drown denormals
- IF ( L2PERT ) THEN
-* XSC = SQRT(SMALL)
- XSC = EPSLN / REAL(N)
- DO 1947 q = 1, NR
- CTEMP = CMPLX(XSC*ABS(A(q,q)),ZERO)
- DO 1949 p = 1, NR
- IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) )
- $ .OR. ( p .LT. q ) )
-* $ A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) )
- $ A(p,q) = CTEMP
- 1949 CONTINUE
- 1947 CONTINUE
- ELSE
- CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, A(1,2), LDA )
- END IF
-*
-* .. and one-sided Jacobi rotations are started on a lower
-* triangular matrix (plus perturbation which is ignored in
-* the part which destroys triangular form (confusing?!))
-*
- CALL CGESVJ( 'L', 'N', 'N', NR, NR, A, LDA, SVA,
- $ N, V, LDV, CWORK, LWORK, RWORK, LRWORK, INFO )
-*
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
-*
-*
- ELSE IF ( ( RSVEC .AND. ( .NOT. LSVEC ) .AND. ( .NOT. JRACC ) )
- $ .OR.
- $ ( JRACC .AND. ( .NOT. LSVEC ) .AND. ( NR .NE. N ) ) ) THEN
-*
-* -> Singular Values and Right Singular Vectors <-
-*
- IF ( ALMORT ) THEN
-*
-* .. in this case NR equals N
- DO 1998 p = 1, NR
- CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
- CALL CLACGV( N-p+1, V(p,p), 1 )
- 1998 CONTINUE
- CALL CLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV )
-*
- CALL CGESVJ( 'L','U','N', N, NR, V, LDV, SVA, NR, A, LDA,
- $ CWORK, LWORK, RWORK, LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
-
- ELSE
-*
-* .. two more QR factorizations ( one QRF is not enough, two require
-* accumulated product of Jacobi rotations, three are perfect )
-*
- CALL CLASET( 'L', NR-1,NR-1, CZERO, CZERO, A(2,1), LDA )
- CALL CGELQF( NR,N, A, LDA, CWORK, CWORK(N+1), LWORK-N, IERR)
- CALL CLACPY( 'L', NR, NR, A, LDA, V, LDV )
- CALL CLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV )
- CALL CGEQRF( NR, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
- $ LWORK-2*N, IERR )
- DO 8998 p = 1, NR
- CALL CCOPY( NR-p+1, V(p,p), LDV, V(p,p), 1 )
- CALL CLACGV( NR-p+1, V(p,p), 1 )
- 8998 CONTINUE
- CALL CLASET('U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV)
-*
- CALL CGESVJ( 'L', 'U','N', NR, NR, V,LDV, SVA, NR, U,
- $ LDU, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
- IF ( NR .LT. N ) THEN
- CALL CLASET( 'A',N-NR, NR, CZERO,CZERO, V(NR+1,1), LDV )
- CALL CLASET( 'A',NR, N-NR, CZERO,CZERO, V(1,NR+1), LDV )
- CALL CLASET( 'A',N-NR,N-NR,CZERO,CONE, V(NR+1,NR+1),LDV )
- END IF
-*
- CALL CUNMLQ( 'L', 'C', N, N, NR, A, LDA, CWORK,
- $ V, LDV, CWORK(N+1), LWORK-N, IERR )
-*
- END IF
-* .. permute the rows of V
-* DO 8991 p = 1, N
-* CALL CCOPY( N, V(p,1), LDV, A(IWORK(p),1), LDA )
-* 8991 CONTINUE
-* CALL CLACPY( 'All', N, N, A, LDA, V, LDV )
- CALL CLAPMR( .FALSE., N, N, V, LDV, IWORK )
-*
- IF ( TRANSP ) THEN
- CALL CLACPY( 'A', N, N, V, LDV, U, LDU )
- END IF
-*
- ELSE IF ( JRACC .AND. (.NOT. LSVEC) .AND. ( NR.EQ. N ) ) THEN
-*
- CALL CLASET( 'L', N-1,N-1, CZERO, CZERO, A(2,1), LDA )
-*
- CALL CGESVJ( 'U','N','V', N, N, A, LDA, SVA, N, V, LDV,
- $ CWORK, LWORK, RWORK, LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
- CALL CLAPMR( .FALSE., N, N, V, LDV, IWORK )
-*
- ELSE IF ( LSVEC .AND. ( .NOT. RSVEC ) ) THEN
-*
-* .. Singular Values and Left Singular Vectors ..
-*
-* .. second preconditioning step to avoid need to accumulate
-* Jacobi rotations in the Jacobi iterations.
- DO 1965 p = 1, NR
- CALL CCOPY( N-p+1, A(p,p), LDA, U(p,p), 1 )
- CALL CLACGV( N-p+1, U(p,p), 1 )
- 1965 CONTINUE
- CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )
-*
- CALL CGEQRF( N, NR, U, LDU, CWORK(N+1), CWORK(2*N+1),
- $ LWORK-2*N, IERR )
-*
- DO 1967 p = 1, NR - 1
- CALL CCOPY( NR-p, U(p,p+1), LDU, U(p+1,p), 1 )
- CALL CLACGV( N-p+1, U(p,p), 1 )
- 1967 CONTINUE
- CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )
-*
- CALL CGESVJ( 'L', 'U', 'N', NR,NR, U, LDU, SVA, NR, A,
- $ LDA, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
-*
- IF ( NR .LT. M ) THEN
- CALL CLASET( 'A', M-NR, NR,CZERO, CZERO, U(NR+1,1), LDU )
- IF ( NR .LT. N1 ) THEN
- CALL CLASET( 'A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU )
- CALL CLASET( 'A',M-NR,N1-NR,CZERO,CONE,U(NR+1,NR+1),LDU )
- END IF
- END IF
-*
- CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
- $ LDU, CWORK(N+1), LWORK-N, IERR )
-*
- IF ( ROWPIV )
- $ CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
-*
- DO 1974 p = 1, N1
- XSC = ONE / SCNRM2( M, U(1,p), 1 )
- CALL CSSCAL( M, XSC, U(1,p), 1 )
- 1974 CONTINUE
-*
- IF ( TRANSP ) THEN
- CALL CLACPY( 'A', N, N, U, LDU, V, LDV )
- END IF
-*
- ELSE
-*
-* .. Full SVD ..
-*
- IF ( .NOT. JRACC ) THEN
-*
- IF ( .NOT. ALMORT ) THEN
-*
-* Second Preconditioning Step (QRF [with pivoting])
-* Note that the composition of TRANSPOSE, QRF and TRANSPOSE is
-* equivalent to an LQF CALL. Since in many libraries the QRF
-* seems to be better optimized than the LQF, we do explicit
-* transpose and use the QRF. This is subject to changes in an
-* optimized implementation of CGEJSV.
-*
- DO 1968 p = 1, NR
- CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
- CALL CLACGV( N-p+1, V(p,p), 1 )
- 1968 CONTINUE
-*
-* .. the following two loops perturb small entries to avoid
-* denormals in the second QR factorization, where they are
-* as good as zeros. This is done to avoid painfully slow
-* computation with denormals. The relative size of the perturbation
-* is a parameter that can be changed by the implementer.
-* This perturbation device will be obsolete on machines with
-* properly implemented arithmetic.
-* To switch it off, set L2PERT=.FALSE. To remove it from the
-* code, remove the action under L2PERT=.TRUE., leave the ELSE part.
-* The following two loops should be blocked and fused with the
-* transposed copy above.
-*
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL)
- DO 2969 q = 1, NR
- CTEMP = CMPLX(XSC*ABS( V(q,q) ),ZERO)
- DO 2968 p = 1, N
- IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 )
- $ .OR. ( p .LT. q ) )
-* $ V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) )
- $ V(p,q) = CTEMP
- IF ( p .LT. q ) V(p,q) = - V(p,q)
- 2968 CONTINUE
- 2969 CONTINUE
- ELSE
- CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV )
- END IF
-*
-* Estimate the row scaled condition number of R1
-* (If R1 is rectangular, N > NR, then the condition number
-* of the leading NR x NR submatrix is estimated.)
-*
- CALL CLACPY( 'L', NR, NR, V, LDV, CWORK(2*N+1), NR )
- DO 3950 p = 1, NR
- TEMP1 = SCNRM2(NR-p+1,CWORK(2*N+(p-1)*NR+p),1)
- CALL CSSCAL(NR-p+1,ONE/TEMP1,CWORK(2*N+(p-1)*NR+p),1)
- 3950 CONTINUE
- CALL CPOCON('L',NR,CWORK(2*N+1),NR,ONE,TEMP1,
- $ CWORK(2*N+NR*NR+1),RWORK,IERR)
- CONDR1 = ONE / SQRT(TEMP1)
-* .. here need a second opinion on the condition number
-* .. then assume worst case scenario
-* R1 is OK for inverse <=> CONDR1 .LT. REAL(N)
-* more conservative <=> CONDR1 .LT. SQRT(REAL(N))
-*
- COND_OK = SQRT(SQRT(REAL(NR)))
-*[TP] COND_OK is a tuning parameter.
-*
- IF ( CONDR1 .LT. COND_OK ) THEN
-* .. the second QRF without pivoting. Note: in an optimized
-* implementation, this QRF should be implemented as the QRF
-* of a lower triangular matrix.
-* R1^* = Q2 * R2
- CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
- $ LWORK-2*N, IERR )
-*
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL)/EPSLN
- DO 3959 p = 2, NR
- DO 3958 q = 1, p - 1
- CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),
- $ ZERO)
- IF ( ABS(V(q,p)) .LE. TEMP1 )
-* $ V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) )
- $ V(q,p) = CTEMP
- 3958 CONTINUE
- 3959 CONTINUE
- END IF
-*
- IF ( NR .NE. N )
- $ CALL CLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N )
-* .. save ...
-*
-* .. this transposed copy should be better than naive
- DO 1969 p = 1, NR - 1
- CALL CCOPY( NR-p, V(p,p+1), LDV, V(p+1,p), 1 )
- CALL CLACGV(NR-p+1, V(p,p), 1 )
- 1969 CONTINUE
- V(NR,NR)=CONJG(V(NR,NR))
-*
- CONDR2 = CONDR1
-*
- ELSE
-*
-* .. ill-conditioned case: second QRF with pivoting
-* Note that windowed pivoting would be equally good
-* numerically, and more run-time efficient. So, in
-* an optimal implementation, the next call to CGEQP3
-* should be replaced with eg. CALL CGEQPX (ACM TOMS #782)
-* with properly (carefully) chosen parameters.
-*
-* R1^* * P2 = Q2 * R2
- DO 3003 p = 1, NR
- IWORK(N+p) = 0
- 3003 CONTINUE
- CALL CGEQP3( N, NR, V, LDV, IWORK(N+1), CWORK(N+1),
- $ CWORK(2*N+1), LWORK-2*N, RWORK, IERR )
-** CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
-** $ LWORK-2*N, IERR )
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL)
- DO 3969 p = 2, NR
- DO 3968 q = 1, p - 1
- CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),
- $ ZERO)
- IF ( ABS(V(q,p)) .LE. TEMP1 )
-* $ V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) )
- $ V(q,p) = CTEMP
- 3968 CONTINUE
- 3969 CONTINUE
- END IF
-*
- CALL CLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N )
-*
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL)
- DO 8970 p = 2, NR
- DO 8971 q = 1, p - 1
- CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),
- $ ZERO)
-* V(p,q) = - TEMP1*( V(q,p) / ABS(V(q,p)) )
- V(p,q) = - CTEMP
- 8971 CONTINUE
- 8970 CONTINUE
- ELSE
- CALL CLASET( 'L',NR-1,NR-1,CZERO,CZERO,V(2,1),LDV )
- END IF
-* Now, compute R2 = L3 * Q3, the LQ factorization.
- CALL CGELQF( NR, NR, V, LDV, CWORK(2*N+N*NR+1),
- $ CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, IERR )
-* .. and estimate the condition number
- CALL CLACPY( 'L',NR,NR,V,LDV,CWORK(2*N+N*NR+NR+1),NR )
- DO 4950 p = 1, NR
- TEMP1 = SCNRM2( p, CWORK(2*N+N*NR+NR+p), NR )
- CALL CSSCAL( p, ONE/TEMP1, CWORK(2*N+N*NR+NR+p), NR )
- 4950 CONTINUE
- CALL CPOCON( 'L',NR,CWORK(2*N+N*NR+NR+1),NR,ONE,TEMP1,
- $ CWORK(2*N+N*NR+NR+NR*NR+1),RWORK,IERR )
- CONDR2 = ONE / SQRT(TEMP1)
-*
-*
- IF ( CONDR2 .GE. COND_OK ) THEN
-* .. save the Householder vectors used for Q3
-* (this overwrites the copy of R2, as it will not be
-* needed in this branch, but it does not overwritte the
-* Huseholder vectors of Q2.).
- CALL CLACPY( 'U', NR, NR, V, LDV, CWORK(2*N+1), N )
-* .. and the rest of the information on Q3 is in
-* WORK(2*N+N*NR+1:2*N+N*NR+N)
- END IF
-*
- END IF
-*
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL)
- DO 4968 q = 2, NR
- CTEMP = XSC * V(q,q)
- DO 4969 p = 1, q - 1
-* V(p,q) = - TEMP1*( V(p,q) / ABS(V(p,q)) )
- V(p,q) = - CTEMP
- 4969 CONTINUE
- 4968 CONTINUE
- ELSE
- CALL CLASET( 'U', NR-1,NR-1, CZERO,CZERO, V(1,2), LDV )
- END IF
-*
-* Second preconditioning finished; continue with Jacobi SVD
-* The input matrix is lower trinagular.
-*
-* Recover the right singular vectors as solution of a well
-* conditioned triangular matrix equation.
-*
- IF ( CONDR1 .LT. COND_OK ) THEN
-*
- CALL CGESVJ( 'L','U','N',NR,NR,V,LDV,SVA,NR,U, LDU,
- $ CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,RWORK,
- $ LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
- DO 3970 p = 1, NR
- CALL CCOPY( NR, V(1,p), 1, U(1,p), 1 )
- CALL CSSCAL( NR, SVA(p), V(1,p), 1 )
- 3970 CONTINUE
-
-* .. pick the right matrix equation and solve it
-*
- IF ( NR .EQ. N ) THEN
-* :)) .. best case, R1 is inverted. The solution of this matrix
-* equation is Q2*V2 = the product of the Jacobi rotations
-* used in CGESVJ, premultiplied with the orthogonal matrix
-* from the second QR factorization.
- CALL CTRSM('L','U','N','N', NR,NR,CONE, A,LDA, V,LDV)
- ELSE
-* .. R1 is well conditioned, but non-square. Adjoint of R2
-* is inverted to get the product of the Jacobi rotations
-* used in CGESVJ. The Q-factor from the second QR
-* factorization is then built in explicitly.
- CALL CTRSM('L','U','C','N',NR,NR,CONE,CWORK(2*N+1),
- $ N,V,LDV)
- IF ( NR .LT. N ) THEN
- CALL CLASET('A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV)
- CALL CLASET('A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV)
- CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)
- END IF
- CALL CUNMQR('L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
- $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR)
- END IF
-*
- ELSE IF ( CONDR2 .LT. COND_OK ) THEN
-*
-* The matrix R2 is inverted. The solution of the matrix equation
-* is Q3^* * V3 = the product of the Jacobi rotations (appplied to
-* the lower triangular L3 from the LQ factorization of
-* R2=L3*Q3), pre-multiplied with the transposed Q3.
- CALL CGESVJ( 'L', 'U', 'N', NR, NR, V, LDV, SVA, NR, U,
- $ LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR,
- $ RWORK, LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
- DO 3870 p = 1, NR
- CALL CCOPY( NR, V(1,p), 1, U(1,p), 1 )
- CALL CSSCAL( NR, SVA(p), U(1,p), 1 )
- 3870 CONTINUE
- CALL CTRSM('L','U','N','N',NR,NR,CONE,CWORK(2*N+1),N,
- $ U,LDU)
-* .. apply the permutation from the second QR factorization
- DO 873 q = 1, NR
- DO 872 p = 1, NR
- CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q)
- 872 CONTINUE
- DO 874 p = 1, NR
- U(p,q) = CWORK(2*N+N*NR+NR+p)
- 874 CONTINUE
- 873 CONTINUE
- IF ( NR .LT. N ) THEN
- CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )
- CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )
- CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)
- END IF
- CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
- $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
- ELSE
-* Last line of defense.
-* #:( This is a rather pathological case: no scaled condition
-* improvement after two pivoted QR factorizations. Other
-* possibility is that the rank revealing QR factorization
-* or the condition estimator has failed, or the COND_OK
-* is set very close to ONE (which is unnecessary). Normally,
-* this branch should never be executed, but in rare cases of
-* failure of the RRQR or condition estimator, the last line of
-* defense ensures that CGEJSV completes the task.
-* Compute the full SVD of L3 using CGESVJ with explicit
-* accumulation of Jacobi rotations.
- CALL CGESVJ( 'L', 'U', 'V', NR, NR, V, LDV, SVA, NR, U,
- $ LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR,
- $ RWORK, LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
- IF ( NR .LT. N ) THEN
- CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )
- CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )
- CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)
- END IF
- CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
- $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
-*
- CALL CUNMLQ( 'L', 'C', NR, NR, NR, CWORK(2*N+1), N,
- $ CWORK(2*N+N*NR+1), U, LDU, CWORK(2*N+N*NR+NR+1),
- $ LWORK-2*N-N*NR-NR, IERR )
- DO 773 q = 1, NR
- DO 772 p = 1, NR
- CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q)
- 772 CONTINUE
- DO 774 p = 1, NR
- U(p,q) = CWORK(2*N+N*NR+NR+p)
- 774 CONTINUE
- 773 CONTINUE
-*
- END IF
-*
-* Permute the rows of V using the (column) permutation from the
-* first QRF. Also, scale the columns to make them unit in
-* Euclidean norm. This applies to all cases.
-*
- TEMP1 = SQRT(REAL(N)) * EPSLN
- DO 1972 q = 1, N
- DO 972 p = 1, N
- CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q)
- 972 CONTINUE
- DO 973 p = 1, N
- V(p,q) = CWORK(2*N+N*NR+NR+p)
- 973 CONTINUE
- XSC = ONE / SCNRM2( N, V(1,q), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL CSSCAL( N, XSC, V(1,q), 1 )
- 1972 CONTINUE
-* At this moment, V contains the right singular vectors of A.
-* Next, assemble the left singular vector matrix U (M x N).
- IF ( NR .LT. M ) THEN
- CALL CLASET('A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU)
- IF ( NR .LT. N1 ) THEN
- CALL CLASET('A',NR,N1-NR,CZERO,CZERO,U(1,NR+1),LDU)
- CALL CLASET('A',M-NR,N1-NR,CZERO,CONE,
- $ U(NR+1,NR+1),LDU)
- END IF
- END IF
-*
-* The Q matrix from the first QRF is built into the left singular
-* matrix U. This applies to all cases.
-*
- CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
- $ LDU, CWORK(N+1), LWORK-N, IERR )
-
-* The columns of U are normalized. The cost is O(M*N) flops.
- TEMP1 = SQRT(REAL(M)) * EPSLN
- DO 1973 p = 1, NR
- XSC = ONE / SCNRM2( M, U(1,p), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL CSSCAL( M, XSC, U(1,p), 1 )
- 1973 CONTINUE
-*
-* If the initial QRF is computed with row pivoting, the left
-* singular vectors must be adjusted.
-*
- IF ( ROWPIV )
- $ CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
-*
- ELSE
-*
-* .. the initial matrix A has almost orthogonal columns and
-* the second QRF is not needed
-*
- CALL CLACPY( 'U', N, N, A, LDA, CWORK(N+1), N )
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL)
- DO 5970 p = 2, N
- CTEMP = XSC * CWORK( N + (p-1)*N + p )
- DO 5971 q = 1, p - 1
-* CWORK(N+(q-1)*N+p)=-TEMP1 * ( CWORK(N+(p-1)*N+q) /
-* $ ABS(CWORK(N+(p-1)*N+q)) )
- CWORK(N+(q-1)*N+p)=-CTEMP
- 5971 CONTINUE
- 5970 CONTINUE
- ELSE
- CALL CLASET( 'L',N-1,N-1,CZERO,CZERO,CWORK(N+2),N )
- END IF
-*
- CALL CGESVJ( 'U', 'U', 'N', N, N, CWORK(N+1), N, SVA,
- $ N, U, LDU, CWORK(N+N*N+1), LWORK-N-N*N, RWORK, LRWORK,
- $ INFO )
-*
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
- DO 6970 p = 1, N
- CALL CCOPY( N, CWORK(N+(p-1)*N+1), 1, U(1,p), 1 )
- CALL CSSCAL( N, SVA(p), CWORK(N+(p-1)*N+1), 1 )
- 6970 CONTINUE
-*
- CALL CTRSM( 'L', 'U', 'N', 'N', N, N,
- $ CONE, A, LDA, CWORK(N+1), N )
- DO 6972 p = 1, N
- CALL CCOPY( N, CWORK(N+p), N, V(IWORK(p),1), LDV )
- 6972 CONTINUE
- TEMP1 = SQRT(REAL(N))*EPSLN
- DO 6971 p = 1, N
- XSC = ONE / SCNRM2( N, V(1,p), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL CSSCAL( N, XSC, V(1,p), 1 )
- 6971 CONTINUE
-*
-* Assemble the left singular vector matrix U (M x N).
-*
- IF ( N .LT. M ) THEN
- CALL CLASET( 'A', M-N, N, CZERO, CZERO, U(N+1,1), LDU )
- IF ( N .LT. N1 ) THEN
- CALL CLASET('A',N, N1-N, CZERO, CZERO, U(1,N+1),LDU)
- CALL CLASET( 'A',M-N,N1-N, CZERO, CONE,U(N+1,N+1),LDU)
- END IF
- END IF
- CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
- $ LDU, CWORK(N+1), LWORK-N, IERR )
- TEMP1 = SQRT(REAL(M))*EPSLN
- DO 6973 p = 1, N1
- XSC = ONE / SCNRM2( M, U(1,p), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL CSSCAL( M, XSC, U(1,p), 1 )
- 6973 CONTINUE
-*
- IF ( ROWPIV )
- $ CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
-*
- END IF
-*
-* end of the >> almost orthogonal case << in the full SVD
-*
- ELSE
-*
-* This branch deploys a preconditioned Jacobi SVD with explicitly
-* accumulated rotations. It is included as optional, mainly for
-* experimental purposes. It does perform well, and can also be used.
-* In this implementation, this branch will be automatically activated
-* if the condition number sigma_max(A) / sigma_min(A) is predicted
-* to be greater than the overflow threshold. This is because the
-* a posteriori computation of the singular vectors assumes robust
-* implementation of BLAS and some LAPACK procedures, capable of working
-* in presence of extreme values, e.g. when the singular values spread from
-* the underflow to the overflow threshold.
-*
- DO 7968 p = 1, NR
- CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
- CALL CLACGV( N-p+1, V(p,p), 1 )
- 7968 CONTINUE
-*
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL/EPSLN)
- DO 5969 q = 1, NR
- CTEMP = CMPLX(XSC*ABS( V(q,q) ),ZERO)
- DO 5968 p = 1, N
- IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 )
- $ .OR. ( p .LT. q ) )
-* $ V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) )
- $ V(p,q) = CTEMP
- IF ( p .LT. q ) V(p,q) = - V(p,q)
- 5968 CONTINUE
- 5969 CONTINUE
- ELSE
- CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV )
- END IF
-
- CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
- $ LWORK-2*N, IERR )
- CALL CLACPY( 'L', N, NR, V, LDV, CWORK(2*N+1), N )
-*
- DO 7969 p = 1, NR
- CALL CCOPY( NR-p+1, V(p,p), LDV, U(p,p), 1 )
- CALL CLACGV( NR-p+1, U(p,p), 1 )
- 7969 CONTINUE
-
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL/EPSLN)
- DO 9970 q = 2, NR
- DO 9971 p = 1, q - 1
- CTEMP = CMPLX(XSC * MIN(ABS(U(p,p)),ABS(U(q,q))),
- $ ZERO)
-* U(p,q) = - TEMP1 * ( U(q,p) / ABS(U(q,p)) )
- U(p,q) = - CTEMP
- 9971 CONTINUE
- 9970 CONTINUE
- ELSE
- CALL CLASET('U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )
- END IF
-
- CALL CGESVJ( 'L', 'U', 'V', NR, NR, U, LDU, SVA,
- $ N, V, LDV, CWORK(2*N+N*NR+1), LWORK-2*N-N*NR,
- $ RWORK, LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
-
- IF ( NR .LT. N ) THEN
- CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )
- CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )
- CALL CLASET( 'A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV )
- END IF
-
- CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
- $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
-*
-* Permute the rows of V using the (column) permutation from the
-* first QRF. Also, scale the columns to make them unit in
-* Euclidean norm. This applies to all cases.
-*
- TEMP1 = SQRT(REAL(N)) * EPSLN
- DO 7972 q = 1, N
- DO 8972 p = 1, N
- CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q)
- 8972 CONTINUE
- DO 8973 p = 1, N
- V(p,q) = CWORK(2*N+N*NR+NR+p)
- 8973 CONTINUE
- XSC = ONE / SCNRM2( N, V(1,q), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL CSSCAL( N, XSC, V(1,q), 1 )
- 7972 CONTINUE
-*
-* At this moment, V contains the right singular vectors of A.
-* Next, assemble the left singular vector matrix U (M x N).
-*
- IF ( NR .LT. M ) THEN
- CALL CLASET( 'A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU )
- IF ( NR .LT. N1 ) THEN
- CALL CLASET('A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU)
- CALL CLASET('A',M-NR,N1-NR, CZERO, CONE,U(NR+1,NR+1),LDU)
- END IF
- END IF
-*
- CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
- $ LDU, CWORK(N+1), LWORK-N, IERR )
-*
- IF ( ROWPIV )
- $ CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
-*
-*
- END IF
- IF ( TRANSP ) THEN
-* .. swap U and V because the procedure worked on A^*
- DO 6974 p = 1, N
- CALL CSWAP( N, U(1,p), 1, V(1,p), 1 )
- 6974 CONTINUE
- END IF
-*
- END IF
-* end of the full SVD
-*
-* Undo scaling, if necessary (and possible)
-*
- IF ( USCAL2 .LE. (BIG/SVA(1))*USCAL1 ) THEN
- CALL SLASCL( 'G', 0, 0, USCAL1, USCAL2, NR, 1, SVA, N, IERR )
- USCAL1 = ONE
- USCAL2 = ONE
- END IF
-*
- IF ( NR .LT. N ) THEN
- DO 3004 p = NR+1, N
- SVA(p) = ZERO
- 3004 CONTINUE
- END IF
-*
- RWORK(1) = USCAL2 * SCALEM
- RWORK(2) = USCAL1
- IF ( ERREST ) RWORK(3) = SCONDA
- IF ( LSVEC .AND. RSVEC ) THEN
- RWORK(4) = CONDR1
- RWORK(5) = CONDR2
- END IF
- IF ( L2TRAN ) THEN
- RWORK(6) = ENTRA
- RWORK(7) = ENTRAT
- END IF
-*
- IWORK(1) = NR
- IWORK(2) = NUMRANK
- IWORK(3) = WARNING
- IF ( TRANSP ) THEN
- IWORK(4) = 1
- ELSE
- IWORK(4) = -1
- END IF
-
-*
- RETURN
-* ..
-* .. END OF CGEJSV
-* ..
- END
-*
diff --git a/lapack-netlib/cgesvx.f b/lapack-netlib/cgesvx.f
deleted file mode 100644
index 74a37e9a0e..0000000000
--- a/lapack-netlib/cgesvx.f
+++ /dev/null
@@ -1,602 +0,0 @@
-*> \brief CGESVX computes the solution to system of linear equations A * X = B for GE matrices
-*
-* =========== DOCUMENTATION ===========
-*
-* Online html documentation available at
-* http://www.netlib.org/lapack/explore-html/
-*
-*> \htmlonly
-*> Download CGESVX + dependencies
-*>
-*> [TGZ]
-*>
-*> [ZIP]
-*>
-*> [TXT]
-*> \endhtmlonly
-*
-* Definition:
-* ===========
-*
-* SUBROUTINE CGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
-* EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
-* WORK, RWORK, INFO )
-*
-* .. Scalar Arguments ..
-* CHARACTER EQUED, FACT, TRANS
-* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
-* REAL RCOND
-* ..
-* .. Array Arguments ..
-* INTEGER IPIV( * )
-* REAL BERR( * ), C( * ), FERR( * ), R( * ),
-* $ RWORK( * )
-* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
-* $ WORK( * ), X( LDX, * )
-* ..
-*
-*
-*> \par Purpose:
-* =============
-*>
-*> \verbatim
-*>
-*> CGESVX uses the LU factorization to compute the solution to a complex
-*> system of linear equations
-*> A * X = B,
-*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*>
-*> Error bounds on the solution and a condition estimate are also
-*> provided.
-*> \endverbatim
-*
-*> \par Description:
-* =================
-*>
-*> \verbatim
-*>
-*> The following steps are performed:
-*>
-*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
-*> the system:
-*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*> Whether or not the system will be equilibrated depends on the
-*> scaling of the matrix A, but if equilibration is used, A is
-*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-*> or diag(C)*B (if TRANS = 'T' or 'C').
-*>
-*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-*> matrix A (after equilibration if FACT = 'E') as
-*> A = P * L * U,
-*> where P is a permutation matrix, L is a unit lower triangular
-*> matrix, and U is upper triangular.
-*>
-*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-*> returns with INFO = i. Otherwise, the factored form of A is used
-*> to estimate the condition number of the matrix A. If the
-*> reciprocal of the condition number is less than machine precision,
-*> INFO = N+1 is returned as a warning, but the routine still goes on
-*> to solve for X and compute error bounds as described below.
-*>
-*> 4. The system of equations is solved for X using the factored form
-*> of A.
-*>
-*> 5. Iterative refinement is applied to improve the computed solution
-*> matrix and calculate error bounds and backward error estimates
-*> for it.
-*>
-*> 6. If equilibration was used, the matrix X is premultiplied by
-*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-*> that it solves the original system before equilibration.
-*> \endverbatim
-*
-* Arguments:
-* ==========
-*
-*> \param[in] FACT
-*> \verbatim
-*> FACT is CHARACTER*1
-*> Specifies whether or not the factored form of the matrix A is
-*> supplied on entry, and if not, whether the matrix A should be
-*> equilibrated before it is factored.
-*> = 'F': On entry, AF and IPIV contain the factored form of A.
-*> If EQUED is not 'N', the matrix A has been
-*> equilibrated with scaling factors given by R and C.
-*> A, AF, and IPIV are not modified.
-*> = 'N': The matrix A will be copied to AF and factored.
-*> = 'E': The matrix A will be equilibrated if necessary, then
-*> copied to AF and factored.
-*> \endverbatim
-*>
-*> \param[in] TRANS
-*> \verbatim
-*> TRANS is CHARACTER*1
-*> Specifies the form of the system of equations:
-*> = 'N': A * X = B (No transpose)
-*> = 'T': A**T * X = B (Transpose)
-*> = 'C': A**H * X = B (Conjugate transpose)
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*> N is INTEGER
-*> The number of linear equations, i.e., the order of the
-*> matrix A. N >= 0.
-*> \endverbatim
-*>
-*> \param[in] NRHS
-*> \verbatim
-*> NRHS is INTEGER
-*> The number of right hand sides, i.e., the number of columns
-*> of the matrices B and X. NRHS >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] A
-*> \verbatim
-*> A is COMPLEX array, dimension (LDA,N)
-*> On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
-*> not 'N', then A must have been equilibrated by the scaling
-*> factors in R and/or C. A is not modified if FACT = 'F' or
-*> 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*>
-*> On exit, if EQUED .ne. 'N', A is scaled as follows:
-*> EQUED = 'R': A := diag(R) * A
-*> EQUED = 'C': A := A * diag(C)
-*> EQUED = 'B': A := diag(R) * A * diag(C).
-*> \endverbatim
-*>
-*> \param[in] LDA
-*> \verbatim
-*> LDA is INTEGER
-*> The leading dimension of the array A. LDA >= max(1,N).
-*> \endverbatim
-*>
-*> \param[in,out] AF
-*> \verbatim
-*> AF is COMPLEX array, dimension (LDAF,N)
-*> If FACT = 'F', then AF is an input argument and on entry
-*> contains the factors L and U from the factorization
-*> A = P*L*U as computed by CGETRF. If EQUED .ne. 'N', then
-*> AF is the factored form of the equilibrated matrix A.
-*>
-*> If FACT = 'N', then AF is an output argument and on exit
-*> returns the factors L and U from the factorization A = P*L*U
-*> of the original matrix A.
-*>
-*> If FACT = 'E', then AF is an output argument and on exit
-*> returns the factors L and U from the factorization A = P*L*U
-*> of the equilibrated matrix A (see the description of A for
-*> the form of the equilibrated matrix).
-*> \endverbatim
-*>
-*> \param[in] LDAF
-*> \verbatim
-*> LDAF is INTEGER
-*> The leading dimension of the array AF. LDAF >= max(1,N).
-*> \endverbatim
-*>
-*> \param[in,out] IPIV
-*> \verbatim
-*> IPIV is INTEGER array, dimension (N)
-*> If FACT = 'F', then IPIV is an input argument and on entry
-*> contains the pivot indices from the factorization A = P*L*U
-*> as computed by CGETRF; row i of the matrix was interchanged
-*> with row IPIV(i).
-*>
-*> If FACT = 'N', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = P*L*U
-*> of the original matrix A.
-*>
-*> If FACT = 'E', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = P*L*U
-*> of the equilibrated matrix A.
-*> \endverbatim
-*>
-*> \param[in,out] EQUED
-*> \verbatim
-*> EQUED is CHARACTER*1
-*> Specifies the form of equilibration that was done.
-*> = 'N': No equilibration (always true if FACT = 'N').
-*> = 'R': Row equilibration, i.e., A has been premultiplied by
-*> diag(R).
-*> = 'C': Column equilibration, i.e., A has been postmultiplied
-*> by diag(C).
-*> = 'B': Both row and column equilibration, i.e., A has been
-*> replaced by diag(R) * A * diag(C).
-*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
-*> output argument.
-*> \endverbatim
-*>
-*> \param[in,out] R
-*> \verbatim
-*> R is REAL array, dimension (N)
-*> The row scale factors for A. If EQUED = 'R' or 'B', A is
-*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-*> is not accessed. R is an input argument if FACT = 'F';
-*> otherwise, R is an output argument. If FACT = 'F' and
-*> EQUED = 'R' or 'B', each element of R must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] C
-*> \verbatim
-*> C is REAL array, dimension (N)
-*> The column scale factors for A. If EQUED = 'C' or 'B', A is
-*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-*> is not accessed. C is an input argument if FACT = 'F';
-*> otherwise, C is an output argument. If FACT = 'F' and
-*> EQUED = 'C' or 'B', each element of C must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] B
-*> \verbatim
-*> B is COMPLEX array, dimension (LDB,NRHS)
-*> On entry, the N-by-NRHS right hand side matrix B.
-*> On exit,
-*> if EQUED = 'N', B is not modified;
-*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-*> diag(R)*B;
-*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-*> overwritten by diag(C)*B.
-*> \endverbatim
-*>
-*> \param[in] LDB
-*> \verbatim
-*> LDB is INTEGER
-*> The leading dimension of the array B. LDB >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] X
-*> \verbatim
-*> X is COMPLEX array, dimension (LDX,NRHS)
-*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-*> to the original system of equations. Note that A and B are
-*> modified on exit if EQUED .ne. 'N', and the solution to the
-*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-*> and EQUED = 'R' or 'B'.
-*> \endverbatim
-*>
-*> \param[in] LDX
-*> \verbatim
-*> LDX is INTEGER
-*> The leading dimension of the array X. LDX >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] RCOND
-*> \verbatim
-*> RCOND is REAL
-*> The estimate of the reciprocal condition number of the matrix
-*> A after equilibration (if done). If RCOND is less than the
-*> machine precision (in particular, if RCOND = 0), the matrix
-*> is singular to working precision. This condition is
-*> indicated by a return code of INFO > 0.
-*> \endverbatim
-*>
-*> \param[out] FERR
-*> \verbatim
-*> FERR is REAL array, dimension (NRHS)
-*> The estimated forward error bound for each solution vector
-*> X(j) (the j-th column of the solution matrix X).
-*> If XTRUE is the true solution corresponding to X(j), FERR(j)
-*> is an estimated upper bound for the magnitude of the largest
-*> element in (X(j) - XTRUE) divided by the magnitude of the
-*> largest element in X(j). The estimate is as reliable as
-*> the estimate for RCOND, and is almost always a slight
-*> overestimate of the true error.
-*> \endverbatim
-*>
-*> \param[out] BERR
-*> \verbatim
-*> BERR is REAL array, dimension (NRHS)
-*> The componentwise relative backward error of each solution
-*> vector X(j) (i.e., the smallest relative change in
-*> any element of A or B that makes X(j) an exact solution).
-*> \endverbatim
-*>
-*> \param[out] WORK
-*> \verbatim
-*> WORK is COMPLEX array, dimension (2*N)
-*> \endverbatim
-*>
-*> \param[out] RWORK
-*> \verbatim
-*> RWORK is REAL array, dimension (MAX(1,2*N))
-*> On exit, RWORK(1) contains the reciprocal pivot growth
-*> factor norm(A)/norm(U). The "max absolute element" norm is
-*> used. If RWORK(1) is much less than 1, then the stability
-*> of the LU factorization of the (equilibrated) matrix A
-*> could be poor. This also means that the solution X, condition
-*> estimator RCOND, and forward error bound FERR could be
-*> unreliable. If factorization fails with 0 RWORK(1) contains the reciprocal pivot growth factor for the
-*> leading INFO columns of A.
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*> INFO is INTEGER
-*> = 0: successful exit
-*> < 0: if INFO = -i, the i-th argument had an illegal value
-*> > 0: if INFO = i, and i is
-*> <= N: U(i,i) is exactly zero. The factorization has
-*> been completed, but the factor U is exactly
-*> singular, so the solution and error bounds
-*> could not be computed. RCOND = 0 is returned.
-*> = N+1: U is nonsingular, but RCOND is less than machine
-*> precision, meaning that the matrix is singular
-*> to working precision. Nevertheless, the
-*> solution and error bounds are computed because
-*> there are a number of situations where the
-*> computed solution can be more accurate than the
-*> value of RCOND would suggest.
-*> \endverbatim
-*
-* Authors:
-* ========
-*
-*> \author Univ. of Tennessee
-*> \author Univ. of California Berkeley
-*> \author Univ. of Colorado Denver
-*> \author NAG Ltd.
-*
-*> \ingroup complexGEsolve
-*
-* =====================================================================
- SUBROUTINE CGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
- $ EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
- $ WORK, RWORK, INFO )
-*
-* -- LAPACK driver routine --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER EQUED, FACT, TRANS
- INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
- REAL RCOND
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL BERR( * ), C( * ), FERR( * ), R( * ),
- $ RWORK( * )
- COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
- $ WORK( * ), X( LDX, * )
-* ..
-*
-* =====================================================================
-*
-* .. Parameters ..
- REAL ZERO, ONE
- PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 )
-* ..
-* .. Local Scalars ..
- LOGICAL COLEQU, EQUIL, NOFACT, NOTRAN, ROWEQU
- CHARACTER NORM
- INTEGER I, INFEQU, J
- REAL AMAX, ANORM, BIGNUM, COLCND, RCMAX, RCMIN,
- $ ROWCND, RPVGRW, SMLNUM
-* ..
-* .. External Functions ..
- LOGICAL LSAME
- REAL CLANGE, CLANTR, SLAMCH
- EXTERNAL LSAME, CLANGE, CLANTR, SLAMCH
-* ..
-* .. External Subroutines ..
- EXTERNAL CGECON, CGEEQU, CGERFS, CGETRF, CGETRS, CLACPY,
- $ CLAQGE, XERBLA
-* ..
-* .. Intrinsic Functions ..
- INTRINSIC MAX, MIN
-* ..
-* .. Executable Statements ..
-*
- INFO = 0
- NOFACT = LSAME( FACT, 'N' )
- EQUIL = LSAME( FACT, 'E' )
- NOTRAN = LSAME( TRANS, 'N' )
- IF( NOFACT .OR. EQUIL ) THEN
- EQUED = 'N'
- ROWEQU = .FALSE.
- COLEQU = .FALSE.
- ELSE
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- SMLNUM = SLAMCH( 'Safe minimum' )
- BIGNUM = ONE / SMLNUM
- END IF
-*
-* Test the input parameters.
-*
- IF( .NOT.NOFACT .AND. .NOT.EQUIL .AND. .NOT.LSAME( FACT, 'F' ) )
- $ THEN
- INFO = -1
- ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
- $ LSAME( TRANS, 'C' ) ) THEN
- INFO = -2
- ELSE IF( N.LT.0 ) THEN
- INFO = -3
- ELSE IF( NRHS.LT.0 ) THEN
- INFO = -4
- ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
- INFO = -6
- ELSE IF( LDAF.LT.MAX( 1, N ) ) THEN
- INFO = -8
- ELSE IF( LSAME( FACT, 'F' ) .AND. .NOT.
- $ ( ROWEQU .OR. COLEQU .OR. LSAME( EQUED, 'N' ) ) ) THEN
- INFO = -10
- ELSE
- IF( ROWEQU ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 10 J = 1, N
- RCMIN = MIN( RCMIN, R( J ) )
- RCMAX = MAX( RCMAX, R( J ) )
- 10 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -11
- ELSE IF( N.GT.0 ) THEN
- ROWCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- ROWCND = ONE
- END IF
- END IF
- IF( COLEQU .AND. INFO.EQ.0 ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 20 J = 1, N
- RCMIN = MIN( RCMIN, C( J ) )
- RCMAX = MAX( RCMAX, C( J ) )
- 20 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -12
- ELSE IF( N.GT.0 ) THEN
- COLCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- COLCND = ONE
- END IF
- END IF
- IF( INFO.EQ.0 ) THEN
- IF( LDB.LT.MAX( 1, N ) ) THEN
- INFO = -14
- ELSE IF( LDX.LT.MAX( 1, N ) ) THEN
- INFO = -16
- END IF
- END IF
- END IF
-*
- IF( INFO.NE.0 ) THEN
- CALL XERBLA( 'CGESVX', -INFO )
- RETURN
- END IF
-*
- IF( EQUIL ) THEN
-*
-* Compute row and column scalings to equilibrate the matrix A.
-*
- CALL CGEEQU( N, N, A, LDA, R, C, ROWCND, COLCND, AMAX, INFEQU )
- IF( INFEQU.EQ.0 ) THEN
-*
-* Equilibrate the matrix.
-*
- CALL CLAQGE( N, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
- $ EQUED )
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- END IF
- END IF
-*
-* Scale the right hand side.
-*
- IF( NOTRAN ) THEN
- IF( ROWEQU ) THEN
- DO 40 J = 1, NRHS
- DO 30 I = 1, N
- B( I, J ) = R( I )*B( I, J )
- 30 CONTINUE
- 40 CONTINUE
- END IF
- ELSE IF( COLEQU ) THEN
- DO 60 J = 1, NRHS
- DO 50 I = 1, N
- B( I, J ) = C( I )*B( I, J )
- 50 CONTINUE
- 60 CONTINUE
- END IF
-*
- IF( NOFACT .OR. EQUIL ) THEN
-*
-* Compute the LU factorization of A.
-*
- CALL CLACPY( 'Full', N, N, A, LDA, AF, LDAF )
- CALL CGETRF( N, N, AF, LDAF, IPIV, INFO )
-*
-* Return if INFO is non-zero.
-*
- IF( INFO.GT.0 ) THEN
-*
-* Compute the reciprocal pivot growth factor of the
-* leading rank-deficient INFO columns of A.
-*
- RPVGRW = CLANTR( 'M', 'U', 'N', INFO, INFO, AF, LDAF,
- $ RWORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = CLANGE( 'M', N, INFO, A, LDA, RWORK ) /
- $ RPVGRW
- END IF
- RWORK( 1 ) = RPVGRW
- RCOND = ZERO
- RETURN
- END IF
- END IF
-*
-* Compute the norm of the matrix A and the
-* reciprocal pivot growth factor RPVGRW.
-*
- IF( NOTRAN ) THEN
- NORM = '1'
- ELSE
- NORM = 'I'
- END IF
- ANORM = CLANGE( NORM, N, N, A, LDA, RWORK )
- RPVGRW = CLANTR( 'M', 'U', 'N', N, N, AF, LDAF, RWORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = CLANGE( 'M', N, N, A, LDA, RWORK ) / RPVGRW
- END IF
-*
-* Compute the reciprocal of the condition number of A.
-*
- CALL CGECON( NORM, N, AF, LDAF, ANORM, RCOND, WORK, RWORK, INFO )
-*
-* Compute the solution matrix X.
-*
- CALL CLACPY( 'Full', N, NRHS, B, LDB, X, LDX )
- CALL CGETRS( TRANS, N, NRHS, AF, LDAF, IPIV, X, LDX, INFO )
-*
-* Use iterative refinement to improve the computed solution and
-* compute error bounds and backward error estimates for it.
-*
- CALL CGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, X,
- $ LDX, FERR, BERR, WORK, RWORK, INFO )
-*
-* Transform the solution matrix X to a solution of the original
-* system.
-*
- IF( NOTRAN ) THEN
- IF( COLEQU ) THEN
- DO 80 J = 1, NRHS
- DO 70 I = 1, N
- X( I, J ) = C( I )*X( I, J )
- 70 CONTINUE
- 80 CONTINUE
- DO 90 J = 1, NRHS
- FERR( J ) = FERR( J ) / COLCND
- 90 CONTINUE
- END IF
- ELSE IF( ROWEQU ) THEN
- DO 110 J = 1, NRHS
- DO 100 I = 1, N
- X( I, J ) = R( I )*X( I, J )
- 100 CONTINUE
- 110 CONTINUE
- DO 120 J = 1, NRHS
- FERR( J ) = FERR( J ) / ROWCND
- 120 CONTINUE
- END IF
-*
-* Set INFO = N+1 if the matrix is singular to working precision.
-*
- IF( RCOND.LT.SLAMCH( 'Epsilon' ) )
- $ INFO = N + 1
-*
- RWORK( 1 ) = RPVGRW
- RETURN
-*
-* End of CGESVX
-*
- END
diff --git a/lapack-netlib/dgbsvx.f b/lapack-netlib/dgbsvx.f
deleted file mode 100644
index 0ee5eecb31..0000000000
--- a/lapack-netlib/dgbsvx.f
+++ /dev/null
@@ -1,639 +0,0 @@
-*> \brief DGBSVX computes the solution to system of linear equations A * X = B for GB matrices
-*
-* =========== DOCUMENTATION ===========
-*
-* Online html documentation available at
-* http://www.netlib.org/lapack/explore-html/
-*
-*> \htmlonly
-*> Download DGBSVX + dependencies
-*>
-*> [TGZ]
-*>
-*> [ZIP]
-*>
-*> [TXT]
-*> \endhtmlonly
-*
-* Definition:
-* ===========
-*
-* SUBROUTINE DGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
-* LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
-* RCOND, FERR, BERR, WORK, IWORK, INFO )
-*
-* .. Scalar Arguments ..
-* CHARACTER EQUED, FACT, TRANS
-* INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
-* DOUBLE PRECISION RCOND
-* ..
-* .. Array Arguments ..
-* INTEGER IPIV( * ), IWORK( * )
-* DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
-* $ BERR( * ), C( * ), FERR( * ), R( * ),
-* $ WORK( * ), X( LDX, * )
-* ..
-*
-*
-*> \par Purpose:
-* =============
-*>
-*> \verbatim
-*>
-*> DGBSVX uses the LU factorization to compute the solution to a real
-*> system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
-*> where A is a band matrix of order N with KL subdiagonals and KU
-*> superdiagonals, and X and B are N-by-NRHS matrices.
-*>
-*> Error bounds on the solution and a condition estimate are also
-*> provided.
-*> \endverbatim
-*
-*> \par Description:
-* =================
-*>
-*> \verbatim
-*>
-*> The following steps are performed by this subroutine:
-*>
-*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
-*> the system:
-*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*> Whether or not the system will be equilibrated depends on the
-*> scaling of the matrix A, but if equilibration is used, A is
-*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-*> or diag(C)*B (if TRANS = 'T' or 'C').
-*>
-*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-*> matrix A (after equilibration if FACT = 'E') as
-*> A = L * U,
-*> where L is a product of permutation and unit lower triangular
-*> matrices with KL subdiagonals, and U is upper triangular with
-*> KL+KU superdiagonals.
-*>
-*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-*> returns with INFO = i. Otherwise, the factored form of A is used
-*> to estimate the condition number of the matrix A. If the
-*> reciprocal of the condition number is less than machine precision,
-*> INFO = N+1 is returned as a warning, but the routine still goes on
-*> to solve for X and compute error bounds as described below.
-*>
-*> 4. The system of equations is solved for X using the factored form
-*> of A.
-*>
-*> 5. Iterative refinement is applied to improve the computed solution
-*> matrix and calculate error bounds and backward error estimates
-*> for it.
-*>
-*> 6. If equilibration was used, the matrix X is premultiplied by
-*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-*> that it solves the original system before equilibration.
-*> \endverbatim
-*
-* Arguments:
-* ==========
-*
-*> \param[in] FACT
-*> \verbatim
-*> FACT is CHARACTER*1
-*> Specifies whether or not the factored form of the matrix A is
-*> supplied on entry, and if not, whether the matrix A should be
-*> equilibrated before it is factored.
-*> = 'F': On entry, AFB and IPIV contain the factored form of
-*> A. If EQUED is not 'N', the matrix A has been
-*> equilibrated with scaling factors given by R and C.
-*> AB, AFB, and IPIV are not modified.
-*> = 'N': The matrix A will be copied to AFB and factored.
-*> = 'E': The matrix A will be equilibrated if necessary, then
-*> copied to AFB and factored.
-*> \endverbatim
-*>
-*> \param[in] TRANS
-*> \verbatim
-*> TRANS is CHARACTER*1
-*> Specifies the form of the system of equations.
-*> = 'N': A * X = B (No transpose)
-*> = 'T': A**T * X = B (Transpose)
-*> = 'C': A**H * X = B (Transpose)
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*> N is INTEGER
-*> The number of linear equations, i.e., the order of the
-*> matrix A. N >= 0.
-*> \endverbatim
-*>
-*> \param[in] KL
-*> \verbatim
-*> KL is INTEGER
-*> The number of subdiagonals within the band of A. KL >= 0.
-*> \endverbatim
-*>
-*> \param[in] KU
-*> \verbatim
-*> KU is INTEGER
-*> The number of superdiagonals within the band of A. KU >= 0.
-*> \endverbatim
-*>
-*> \param[in] NRHS
-*> \verbatim
-*> NRHS is INTEGER
-*> The number of right hand sides, i.e., the number of columns
-*> of the matrices B and X. NRHS >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] AB
-*> \verbatim
-*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
-*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-*> The j-th column of A is stored in the j-th column of the
-*> array AB as follows:
-*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*>
-*> If FACT = 'F' and EQUED is not 'N', then A must have been
-*> equilibrated by the scaling factors in R and/or C. AB is not
-*> modified if FACT = 'F' or 'N', or if FACT = 'E' and
-*> EQUED = 'N' on exit.
-*>
-*> On exit, if EQUED .ne. 'N', A is scaled as follows:
-*> EQUED = 'R': A := diag(R) * A
-*> EQUED = 'C': A := A * diag(C)
-*> EQUED = 'B': A := diag(R) * A * diag(C).
-*> \endverbatim
-*>
-*> \param[in] LDAB
-*> \verbatim
-*> LDAB is INTEGER
-*> The leading dimension of the array AB. LDAB >= KL+KU+1.
-*> \endverbatim
-*>
-*> \param[in,out] AFB
-*> \verbatim
-*> AFB is DOUBLE PRECISION array, dimension (LDAFB,N)
-*> If FACT = 'F', then AFB is an input argument and on entry
-*> contains details of the LU factorization of the band matrix
-*> A, as computed by DGBTRF. U is stored as an upper triangular
-*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-*> and the multipliers used during the factorization are stored
-*> in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
-*> the factored form of the equilibrated matrix A.
-*>
-*> If FACT = 'N', then AFB is an output argument and on exit
-*> returns details of the LU factorization of A.
-*>
-*> If FACT = 'E', then AFB is an output argument and on exit
-*> returns details of the LU factorization of the equilibrated
-*> matrix A (see the description of AB for the form of the
-*> equilibrated matrix).
-*> \endverbatim
-*>
-*> \param[in] LDAFB
-*> \verbatim
-*> LDAFB is INTEGER
-*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*> \endverbatim
-*>
-*> \param[in,out] IPIV
-*> \verbatim
-*> IPIV is INTEGER array, dimension (N)
-*> If FACT = 'F', then IPIV is an input argument and on entry
-*> contains the pivot indices from the factorization A = L*U
-*> as computed by DGBTRF; row i of the matrix was interchanged
-*> with row IPIV(i).
-*>
-*> If FACT = 'N', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = L*U
-*> of the original matrix A.
-*>
-*> If FACT = 'E', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = L*U
-*> of the equilibrated matrix A.
-*> \endverbatim
-*>
-*> \param[in,out] EQUED
-*> \verbatim
-*> EQUED is CHARACTER*1
-*> Specifies the form of equilibration that was done.
-*> = 'N': No equilibration (always true if FACT = 'N').
-*> = 'R': Row equilibration, i.e., A has been premultiplied by
-*> diag(R).
-*> = 'C': Column equilibration, i.e., A has been postmultiplied
-*> by diag(C).
-*> = 'B': Both row and column equilibration, i.e., A has been
-*> replaced by diag(R) * A * diag(C).
-*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
-*> output argument.
-*> \endverbatim
-*>
-*> \param[in,out] R
-*> \verbatim
-*> R is DOUBLE PRECISION array, dimension (N)
-*> The row scale factors for A. If EQUED = 'R' or 'B', A is
-*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-*> is not accessed. R is an input argument if FACT = 'F';
-*> otherwise, R is an output argument. If FACT = 'F' and
-*> EQUED = 'R' or 'B', each element of R must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] C
-*> \verbatim
-*> C is DOUBLE PRECISION array, dimension (N)
-*> The column scale factors for A. If EQUED = 'C' or 'B', A is
-*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-*> is not accessed. C is an input argument if FACT = 'F';
-*> otherwise, C is an output argument. If FACT = 'F' and
-*> EQUED = 'C' or 'B', each element of C must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] B
-*> \verbatim
-*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
-*> On entry, the right hand side matrix B.
-*> On exit,
-*> if EQUED = 'N', B is not modified;
-*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-*> diag(R)*B;
-*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-*> overwritten by diag(C)*B.
-*> \endverbatim
-*>
-*> \param[in] LDB
-*> \verbatim
-*> LDB is INTEGER
-*> The leading dimension of the array B. LDB >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] X
-*> \verbatim
-*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
-*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-*> to the original system of equations. Note that A and B are
-*> modified on exit if EQUED .ne. 'N', and the solution to the
-*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-*> and EQUED = 'R' or 'B'.
-*> \endverbatim
-*>
-*> \param[in] LDX
-*> \verbatim
-*> LDX is INTEGER
-*> The leading dimension of the array X. LDX >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] RCOND
-*> \verbatim
-*> RCOND is DOUBLE PRECISION
-*> The estimate of the reciprocal condition number of the matrix
-*> A after equilibration (if done). If RCOND is less than the
-*> machine precision (in particular, if RCOND = 0), the matrix
-*> is singular to working precision. This condition is
-*> indicated by a return code of INFO > 0.
-*> \endverbatim
-*>
-*> \param[out] FERR
-*> \verbatim
-*> FERR is DOUBLE PRECISION array, dimension (NRHS)
-*> The estimated forward error bound for each solution vector
-*> X(j) (the j-th column of the solution matrix X).
-*> If XTRUE is the true solution corresponding to X(j), FERR(j)
-*> is an estimated upper bound for the magnitude of the largest
-*> element in (X(j) - XTRUE) divided by the magnitude of the
-*> largest element in X(j). The estimate is as reliable as
-*> the estimate for RCOND, and is almost always a slight
-*> overestimate of the true error.
-*> \endverbatim
-*>
-*> \param[out] BERR
-*> \verbatim
-*> BERR is DOUBLE PRECISION array, dimension (NRHS)
-*> The componentwise relative backward error of each solution
-*> vector X(j) (i.e., the smallest relative change in
-*> any element of A or B that makes X(j) an exact solution).
-*> \endverbatim
-*>
-*> \param[out] WORK
-*> \verbatim
-*> WORK is DOUBLE PRECISION array, dimension (MAX(1,3*N))
-*> On exit, WORK(1) contains the reciprocal pivot growth
-*> factor norm(A)/norm(U). The "max absolute element" norm is
-*> used. If WORK(1) is much less than 1, then the stability
-*> of the LU factorization of the (equilibrated) matrix A
-*> could be poor. This also means that the solution X, condition
-*> estimator RCOND, and forward error bound FERR could be
-*> unreliable. If factorization fails with 0 WORK(1) contains the reciprocal pivot growth factor for the
-*> leading INFO columns of A.
-*> \endverbatim
-*>
-*> \param[out] IWORK
-*> \verbatim
-*> IWORK is INTEGER array, dimension (N)
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*> INFO is INTEGER
-*> = 0: successful exit
-*> < 0: if INFO = -i, the i-th argument had an illegal value
-*> > 0: if INFO = i, and i is
-*> <= N: U(i,i) is exactly zero. The factorization
-*> has been completed, but the factor U is exactly
-*> singular, so the solution and error bounds
-*> could not be computed. RCOND = 0 is returned.
-*> = N+1: U is nonsingular, but RCOND is less than machine
-*> precision, meaning that the matrix is singular
-*> to working precision. Nevertheless, the
-*> solution and error bounds are computed because
-*> there are a number of situations where the
-*> computed solution can be more accurate than the
-*> value of RCOND would suggest.
-*> \endverbatim
-*
-* Authors:
-* ========
-*
-*> \author Univ. of Tennessee
-*> \author Univ. of California Berkeley
-*> \author Univ. of Colorado Denver
-*> \author NAG Ltd.
-*
-*> \ingroup doubleGBsolve
-*
-* =====================================================================
- SUBROUTINE DGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
- $ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
- $ RCOND, FERR, BERR, WORK, IWORK, INFO )
-*
-* -- LAPACK driver routine --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER EQUED, FACT, TRANS
- INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
- DOUBLE PRECISION RCOND
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * ), IWORK( * )
- DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
- $ BERR( * ), C( * ), FERR( * ), R( * ),
- $ WORK( * ), X( LDX, * )
-* ..
-*
-* =====================================================================
-*
-* .. Parameters ..
- DOUBLE PRECISION ZERO, ONE
- PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 )
-* ..
-* .. Local Scalars ..
- LOGICAL COLEQU, EQUIL, NOFACT, NOTRAN, ROWEQU
- CHARACTER NORM
- INTEGER I, INFEQU, J, J1, J2
- DOUBLE PRECISION AMAX, ANORM, BIGNUM, COLCND, RCMAX, RCMIN,
- $ ROWCND, RPVGRW, SMLNUM
-* ..
-* .. External Functions ..
- LOGICAL LSAME
- DOUBLE PRECISION DLAMCH, DLANGB, DLANTB
- EXTERNAL LSAME, DLAMCH, DLANGB, DLANTB
-* ..
-* .. External Subroutines ..
- EXTERNAL DCOPY, DGBCON, DGBEQU, DGBRFS, DGBTRF, DGBTRS,
- $ DLACPY, DLAQGB, XERBLA
-* ..
-* .. Intrinsic Functions ..
- INTRINSIC ABS, MAX, MIN
-* ..
-* .. Executable Statements ..
-*
- INFO = 0
- NOFACT = LSAME( FACT, 'N' )
- EQUIL = LSAME( FACT, 'E' )
- NOTRAN = LSAME( TRANS, 'N' )
- IF( NOFACT .OR. EQUIL ) THEN
- EQUED = 'N'
- ROWEQU = .FALSE.
- COLEQU = .FALSE.
- ELSE
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- SMLNUM = DLAMCH( 'Safe minimum' )
- BIGNUM = ONE / SMLNUM
- END IF
-*
-* Test the input parameters.
-*
- IF( .NOT.NOFACT .AND. .NOT.EQUIL .AND. .NOT.LSAME( FACT, 'F' ) )
- $ THEN
- INFO = -1
- ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
- $ LSAME( TRANS, 'C' ) ) THEN
- INFO = -2
- ELSE IF( N.LT.0 ) THEN
- INFO = -3
- ELSE IF( KL.LT.0 ) THEN
- INFO = -4
- ELSE IF( KU.LT.0 ) THEN
- INFO = -5
- ELSE IF( NRHS.LT.0 ) THEN
- INFO = -6
- ELSE IF( LDAB.LT.KL+KU+1 ) THEN
- INFO = -8
- ELSE IF( LDAFB.LT.2*KL+KU+1 ) THEN
- INFO = -10
- ELSE IF( LSAME( FACT, 'F' ) .AND. .NOT.
- $ ( ROWEQU .OR. COLEQU .OR. LSAME( EQUED, 'N' ) ) ) THEN
- INFO = -12
- ELSE
- IF( ROWEQU ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 10 J = 1, N
- RCMIN = MIN( RCMIN, R( J ) )
- RCMAX = MAX( RCMAX, R( J ) )
- 10 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -13
- ELSE IF( N.GT.0 ) THEN
- ROWCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- ROWCND = ONE
- END IF
- END IF
- IF( COLEQU .AND. INFO.EQ.0 ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 20 J = 1, N
- RCMIN = MIN( RCMIN, C( J ) )
- RCMAX = MAX( RCMAX, C( J ) )
- 20 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -14
- ELSE IF( N.GT.0 ) THEN
- COLCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- COLCND = ONE
- END IF
- END IF
- IF( INFO.EQ.0 ) THEN
- IF( LDB.LT.MAX( 1, N ) ) THEN
- INFO = -16
- ELSE IF( LDX.LT.MAX( 1, N ) ) THEN
- INFO = -18
- END IF
- END IF
- END IF
-*
- IF( INFO.NE.0 ) THEN
- CALL XERBLA( 'DGBSVX', -INFO )
- RETURN
- END IF
-*
- IF( EQUIL ) THEN
-*
-* Compute row and column scalings to equilibrate the matrix A.
-*
- CALL DGBEQU( N, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
- $ AMAX, INFEQU )
- IF( INFEQU.EQ.0 ) THEN
-*
-* Equilibrate the matrix.
-*
- CALL DLAQGB( N, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
- $ AMAX, EQUED )
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- END IF
- END IF
-*
-* Scale the right hand side.
-*
- IF( NOTRAN ) THEN
- IF( ROWEQU ) THEN
- DO 40 J = 1, NRHS
- DO 30 I = 1, N
- B( I, J ) = R( I )*B( I, J )
- 30 CONTINUE
- 40 CONTINUE
- END IF
- ELSE IF( COLEQU ) THEN
- DO 60 J = 1, NRHS
- DO 50 I = 1, N
- B( I, J ) = C( I )*B( I, J )
- 50 CONTINUE
- 60 CONTINUE
- END IF
-*
- IF( NOFACT .OR. EQUIL ) THEN
-*
-* Compute the LU factorization of the band matrix A.
-*
- DO 70 J = 1, N
- J1 = MAX( J-KU, 1 )
- J2 = MIN( J+KL, N )
- CALL DCOPY( J2-J1+1, AB( KU+1-J+J1, J ), 1,
- $ AFB( KL+KU+1-J+J1, J ), 1 )
- 70 CONTINUE
-*
- CALL DGBTRF( N, N, KL, KU, AFB, LDAFB, IPIV, INFO )
-*
-* Return if INFO is non-zero.
-*
- IF( INFO.GT.0 ) THEN
-*
-* Compute the reciprocal pivot growth factor of the
-* leading rank-deficient INFO columns of A.
-*
- ANORM = ZERO
- DO 90 J = 1, INFO
- DO 80 I = MAX( KU+2-J, 1 ), MIN( N+KU+1-J, KL+KU+1 )
- ANORM = MAX( ANORM, ABS( AB( I, J ) ) )
- 80 CONTINUE
- 90 CONTINUE
- RPVGRW = DLANTB( 'M', 'U', 'N', INFO, MIN( INFO-1, KL+KU ),
- $ AFB( MAX( 1, KL+KU+2-INFO ), 1 ), LDAFB,
- $ WORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = ANORM / RPVGRW
- END IF
- WORK( 1 ) = RPVGRW
- RCOND = ZERO
- RETURN
- END IF
- END IF
-*
-* Compute the norm of the matrix A and the
-* reciprocal pivot growth factor RPVGRW.
-*
- IF( NOTRAN ) THEN
- NORM = '1'
- ELSE
- NORM = 'I'
- END IF
- ANORM = DLANGB( NORM, N, KL, KU, AB, LDAB, WORK )
- RPVGRW = DLANTB( 'M', 'U', 'N', N, KL+KU, AFB, LDAFB, WORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = DLANGB( 'M', N, KL, KU, AB, LDAB, WORK ) / RPVGRW
- END IF
-*
-* Compute the reciprocal of the condition number of A.
-*
- CALL DGBCON( NORM, N, KL, KU, AFB, LDAFB, IPIV, ANORM, RCOND,
- $ WORK, IWORK, INFO )
-*
-* Compute the solution matrix X.
-*
- CALL DLACPY( 'Full', N, NRHS, B, LDB, X, LDX )
- CALL DGBTRS( TRANS, N, KL, KU, NRHS, AFB, LDAFB, IPIV, X, LDX,
- $ INFO )
-*
-* Use iterative refinement to improve the computed solution and
-* compute error bounds and backward error estimates for it.
-*
- CALL DGBRFS( TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB, IPIV,
- $ B, LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
-*
-* Transform the solution matrix X to a solution of the original
-* system.
-*
- IF( NOTRAN ) THEN
- IF( COLEQU ) THEN
- DO 110 J = 1, NRHS
- DO 100 I = 1, N
- X( I, J ) = C( I )*X( I, J )
- 100 CONTINUE
- 110 CONTINUE
- DO 120 J = 1, NRHS
- FERR( J ) = FERR( J ) / COLCND
- 120 CONTINUE
- END IF
- ELSE IF( ROWEQU ) THEN
- DO 140 J = 1, NRHS
- DO 130 I = 1, N
- X( I, J ) = R( I )*X( I, J )
- 130 CONTINUE
- 140 CONTINUE
- DO 150 J = 1, NRHS
- FERR( J ) = FERR( J ) / ROWCND
- 150 CONTINUE
- END IF
-*
-* Set INFO = N+1 if the matrix is singular to working precision.
-*
- IF( RCOND.LT.DLAMCH( 'Epsilon' ) )
- $ INFO = N + 1
-*
- WORK( 1 ) = RPVGRW
- RETURN
-*
-* End of DGBSVX
-*
- END
diff --git a/lapack-netlib/dgejsv.f b/lapack-netlib/dgejsv.f
deleted file mode 100644
index ee769bb384..0000000000
--- a/lapack-netlib/dgejsv.f
+++ /dev/null
@@ -1,1780 +0,0 @@
-*> \brief \b DGEJSV
-*
-* =========== DOCUMENTATION ===========
-*
-* Online html documentation available at
-* http://www.netlib.org/lapack/explore-html/
-*
-*> \htmlonly
-*> Download DGEJSV + dependencies
-*>
-*> [TGZ]
-*>
-*> [ZIP]
-*>
-*> [TXT]
-*> \endhtmlonly
-*
-* Definition:
-* ===========
-*
-* SUBROUTINE DGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
-* M, N, A, LDA, SVA, U, LDU, V, LDV,
-* WORK, LWORK, IWORK, INFO )
-*
-* .. Scalar Arguments ..
-* IMPLICIT NONE
-* INTEGER INFO, LDA, LDU, LDV, LWORK, M, N
-* ..
-* .. Array Arguments ..
-* DOUBLE PRECISION A( LDA, * ), SVA( N ), U( LDU, * ), V( LDV, * ),
-* $ WORK( LWORK )
-* INTEGER IWORK( * )
-* CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
-* ..
-*
-*
-*> \par Purpose:
-* =============
-*>
-*> \verbatim
-*>
-*> DGEJSV computes the singular value decomposition (SVD) of a real M-by-N
-*> matrix [A], where M >= N. The SVD of [A] is written as
-*>
-*> [A] = [U] * [SIGMA] * [V]^t,
-*>
-*> where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N
-*> diagonal elements, [U] is an M-by-N (or M-by-M) orthonormal matrix, and
-*> [V] is an N-by-N orthogonal matrix. The diagonal elements of [SIGMA] are
-*> the singular values of [A]. The columns of [U] and [V] are the left and
-*> the right singular vectors of [A], respectively. The matrices [U] and [V]
-*> are computed and stored in the arrays U and V, respectively. The diagonal
-*> of [SIGMA] is computed and stored in the array SVA.
-*> DGEJSV can sometimes compute tiny singular values and their singular vectors much
-*> more accurately than other SVD routines, see below under Further Details.
-*> \endverbatim
-*
-* Arguments:
-* ==========
-*
-*> \param[in] JOBA
-*> \verbatim
-*> JOBA is CHARACTER*1
-*> Specifies the level of accuracy:
-*> = 'C': This option works well (high relative accuracy) if A = B * D,
-*> with well-conditioned B and arbitrary diagonal matrix D.
-*> The accuracy cannot be spoiled by COLUMN scaling. The
-*> accuracy of the computed output depends on the condition of
-*> B, and the procedure aims at the best theoretical accuracy.
-*> The relative error max_{i=1:N}|d sigma_i| / sigma_i is
-*> bounded by f(M,N)*epsilon* cond(B), independent of D.
-*> The input matrix is preprocessed with the QRF with column
-*> pivoting. This initial preprocessing and preconditioning by
-*> a rank revealing QR factorization is common for all values of
-*> JOBA. Additional actions are specified as follows:
-*> = 'E': Computation as with 'C' with an additional estimate of the
-*> condition number of B. It provides a realistic error bound.
-*> = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings
-*> D1, D2, and well-conditioned matrix C, this option gives
-*> higher accuracy than the 'C' option. If the structure of the
-*> input matrix is not known, and relative accuracy is
-*> desirable, then this option is advisable. The input matrix A
-*> is preprocessed with QR factorization with FULL (row and
-*> column) pivoting.
-*> = 'G': Computation as with 'F' with an additional estimate of the
-*> condition number of B, where A=D*B. If A has heavily weighted
-*> rows, then using this condition number gives too pessimistic
-*> error bound.
-*> = 'A': Small singular values are the noise and the matrix is treated
-*> as numerically rank deficient. The error in the computed
-*> singular values is bounded by f(m,n)*epsilon*||A||.
-*> The computed SVD A = U * S * V^t restores A up to
-*> f(m,n)*epsilon*||A||.
-*> This gives the procedure the licence to discard (set to zero)
-*> all singular values below N*epsilon*||A||.
-*> = 'R': Similar as in 'A'. Rank revealing property of the initial
-*> QR factorization is used do reveal (using triangular factor)
-*> a gap sigma_{r+1} < epsilon * sigma_r in which case the
-*> numerical RANK is declared to be r. The SVD is computed with
-*> absolute error bounds, but more accurately than with 'A'.
-*> \endverbatim
-*>
-*> \param[in] JOBU
-*> \verbatim
-*> JOBU is CHARACTER*1
-*> Specifies whether to compute the columns of U:
-*> = 'U': N columns of U are returned in the array U.
-*> = 'F': full set of M left sing. vectors is returned in the array U.
-*> = 'W': U may be used as workspace of length M*N. See the description
-*> of U.
-*> = 'N': U is not computed.
-*> \endverbatim
-*>
-*> \param[in] JOBV
-*> \verbatim
-*> JOBV is CHARACTER*1
-*> Specifies whether to compute the matrix V:
-*> = 'V': N columns of V are returned in the array V; Jacobi rotations
-*> are not explicitly accumulated.
-*> = 'J': N columns of V are returned in the array V, but they are
-*> computed as the product of Jacobi rotations. This option is
-*> allowed only if JOBU .NE. 'N', i.e. in computing the full SVD.
-*> = 'W': V may be used as workspace of length N*N. See the description
-*> of V.
-*> = 'N': V is not computed.
-*> \endverbatim
-*>
-*> \param[in] JOBR
-*> \verbatim
-*> JOBR is CHARACTER*1
-*> Specifies the RANGE for the singular values. Issues the licence to
-*> set to zero small positive singular values if they are outside
-*> specified range. If A .NE. 0 is scaled so that the largest singular
-*> value of c*A is around DSQRT(BIG), BIG=SLAMCH('O'), then JOBR issues
-*> the licence to kill columns of A whose norm in c*A is less than
-*> DSQRT(SFMIN) (for JOBR = 'R'), or less than SMALL=SFMIN/EPSLN,
-*> where SFMIN=SLAMCH('S'), EPSLN=SLAMCH('E').
-*> = 'N': Do not kill small columns of c*A. This option assumes that
-*> BLAS and QR factorizations and triangular solvers are
-*> implemented to work in that range. If the condition of A
-*> is greater than BIG, use DGESVJ.
-*> = 'R': RESTRICTED range for sigma(c*A) is [DSQRT(SFMIN), DSQRT(BIG)]
-*> (roughly, as described above). This option is recommended.
-*> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-*> For computing the singular values in the FULL range [SFMIN,BIG]
-*> use DGESVJ.
-*> \endverbatim
-*>
-*> \param[in] JOBT
-*> \verbatim
-*> JOBT is CHARACTER*1
-*> If the matrix is square then the procedure may determine to use
-*> transposed A if A^t seems to be better with respect to convergence.
-*> If the matrix is not square, JOBT is ignored. This is subject to
-*> changes in the future.
-*> The decision is based on two values of entropy over the adjoint
-*> orbit of A^t * A. See the descriptions of WORK(6) and WORK(7).
-*> = 'T': transpose if entropy test indicates possibly faster
-*> convergence of Jacobi process if A^t is taken as input. If A is
-*> replaced with A^t, then the row pivoting is included automatically.
-*> = 'N': do not speculate.
-*> This option can be used to compute only the singular values, or the
-*> full SVD (U, SIGMA and V). For only one set of singular vectors
-*> (U or V), the caller should provide both U and V, as one of the
-*> matrices is used as workspace if the matrix A is transposed.
-*> The implementer can easily remove this constraint and make the
-*> code more complicated. See the descriptions of U and V.
-*> \endverbatim
-*>
-*> \param[in] JOBP
-*> \verbatim
-*> JOBP is CHARACTER*1
-*> Issues the licence to introduce structured perturbations to drown
-*> denormalized numbers. This licence should be active if the
-*> denormals are poorly implemented, causing slow computation,
-*> especially in cases of fast convergence (!). For details see [1,2].
-*> For the sake of simplicity, this perturbations are included only
-*> when the full SVD or only the singular values are requested. The
-*> implementer/user can easily add the perturbation for the cases of
-*> computing one set of singular vectors.
-*> = 'P': introduce perturbation
-*> = 'N': do not perturb
-*> \endverbatim
-*>
-*> \param[in] M
-*> \verbatim
-*> M is INTEGER
-*> The number of rows of the input matrix A. M >= 0.
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*> N is INTEGER
-*> The number of columns of the input matrix A. M >= N >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] A
-*> \verbatim
-*> A is DOUBLE PRECISION array, dimension (LDA,N)
-*> On entry, the M-by-N matrix A.
-*> \endverbatim
-*>
-*> \param[in] LDA
-*> \verbatim
-*> LDA is INTEGER
-*> The leading dimension of the array A. LDA >= max(1,M).
-*> \endverbatim
-*>
-*> \param[out] SVA
-*> \verbatim
-*> SVA is DOUBLE PRECISION array, dimension (N)
-*> On exit,
-*> - For WORK(1)/WORK(2) = ONE: The singular values of A. During the
-*> computation SVA contains Euclidean column norms of the
-*> iterated matrices in the array A.
-*> - For WORK(1) .NE. WORK(2): The singular values of A are
-*> (WORK(1)/WORK(2)) * SVA(1:N). This factored form is used if
-*> sigma_max(A) overflows or if small singular values have been
-*> saved from underflow by scaling the input matrix A.
-*> - If JOBR='R' then some of the singular values may be returned
-*> as exact zeros obtained by "set to zero" because they are
-*> below the numerical rank threshold or are denormalized numbers.
-*> \endverbatim
-*>
-*> \param[out] U
-*> \verbatim
-*> U is DOUBLE PRECISION array, dimension ( LDU, N ) or ( LDU, M )
-*> If JOBU = 'U', then U contains on exit the M-by-N matrix of
-*> the left singular vectors.
-*> If JOBU = 'F', then U contains on exit the M-by-M matrix of
-*> the left singular vectors, including an ONB
-*> of the orthogonal complement of the Range(A).
-*> If JOBU = 'W' .AND. (JOBV = 'V' .AND. JOBT = 'T' .AND. M = N),
-*> then U is used as workspace if the procedure
-*> replaces A with A^t. In that case, [V] is computed
-*> in U as left singular vectors of A^t and then
-*> copied back to the V array. This 'W' option is just
-*> a reminder to the caller that in this case U is
-*> reserved as workspace of length N*N.
-*> If JOBU = 'N' U is not referenced, unless JOBT='T'.
-*> \endverbatim
-*>
-*> \param[in] LDU
-*> \verbatim
-*> LDU is INTEGER
-*> The leading dimension of the array U, LDU >= 1.
-*> IF JOBU = 'U' or 'F' or 'W', then LDU >= M.
-*> \endverbatim
-*>
-*> \param[out] V
-*> \verbatim
-*> V is DOUBLE PRECISION array, dimension ( LDV, N )
-*> If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of
-*> the right singular vectors;
-*> If JOBV = 'W', AND (JOBU = 'U' AND JOBT = 'T' AND M = N),
-*> then V is used as workspace if the pprocedure
-*> replaces A with A^t. In that case, [U] is computed
-*> in V as right singular vectors of A^t and then
-*> copied back to the U array. This 'W' option is just
-*> a reminder to the caller that in this case V is
-*> reserved as workspace of length N*N.
-*> If JOBV = 'N' V is not referenced, unless JOBT='T'.
-*> \endverbatim
-*>
-*> \param[in] LDV
-*> \verbatim
-*> LDV is INTEGER
-*> The leading dimension of the array V, LDV >= 1.
-*> If JOBV = 'V' or 'J' or 'W', then LDV >= N.
-*> \endverbatim
-*>
-*> \param[out] WORK
-*> \verbatim
-*> WORK is DOUBLE PRECISION array, dimension (MAX(7,LWORK))
-*> On exit, if N > 0 .AND. M > 0 (else not referenced),
-*> WORK(1) = SCALE = WORK(2) / WORK(1) is the scaling factor such
-*> that SCALE*SVA(1:N) are the computed singular values
-*> of A. (See the description of SVA().)
-*> WORK(2) = See the description of WORK(1).
-*> WORK(3) = SCONDA is an estimate for the condition number of
-*> column equilibrated A. (If JOBA = 'E' or 'G')
-*> SCONDA is an estimate of DSQRT(||(R^t * R)^(-1)||_1).
-*> It is computed using DPOCON. It holds
-*> N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA
-*> where R is the triangular factor from the QRF of A.
-*> However, if R is truncated and the numerical rank is
-*> determined to be strictly smaller than N, SCONDA is
-*> returned as -1, thus indicating that the smallest
-*> singular values might be lost.
-*>
-*> If full SVD is needed, the following two condition numbers are
-*> useful for the analysis of the algorithm. They are provided for
-*> a developer/implementer who is familiar with the details of
-*> the method.
-*>
-*> WORK(4) = an estimate of the scaled condition number of the
-*> triangular factor in the first QR factorization.
-*> WORK(5) = an estimate of the scaled condition number of the
-*> triangular factor in the second QR factorization.
-*> The following two parameters are computed if JOBT = 'T'.
-*> They are provided for a developer/implementer who is familiar
-*> with the details of the method.
-*>
-*> WORK(6) = the entropy of A^t*A :: this is the Shannon entropy
-*> of diag(A^t*A) / Trace(A^t*A) taken as point in the
-*> probability simplex.
-*> WORK(7) = the entropy of A*A^t.
-*> \endverbatim
-*>
-*> \param[in] LWORK
-*> \verbatim
-*> LWORK is INTEGER
-*> Length of WORK to confirm proper allocation of work space.
-*> LWORK depends on the job:
-*>
-*> If only SIGMA is needed (JOBU = 'N', JOBV = 'N') and
-*> -> .. no scaled condition estimate required (JOBE = 'N'):
-*> LWORK >= max(2*M+N,4*N+1,7). This is the minimal requirement.
-*> ->> For optimal performance (blocked code) the optimal value
-*> is LWORK >= max(2*M+N,3*N+(N+1)*NB,7). Here NB is the optimal
-*> block size for DGEQP3 and DGEQRF.
-*> In general, optimal LWORK is computed as
-*> LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DGEQRF), 7).
-*> -> .. an estimate of the scaled condition number of A is
-*> required (JOBA='E', 'G'). In this case, LWORK is the maximum
-*> of the above and N*N+4*N, i.e. LWORK >= max(2*M+N,N*N+4*N,7).
-*> ->> For optimal performance (blocked code) the optimal value
-*> is LWORK >= max(2*M+N,3*N+(N+1)*NB, N*N+4*N, 7).
-*> In general, the optimal length LWORK is computed as
-*> LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DGEQRF),
-*> N+N*N+LWORK(DPOCON),7).
-*>
-*> If SIGMA and the right singular vectors are needed (JOBV = 'V'),
-*> -> the minimal requirement is LWORK >= max(2*M+N,4*N+1,7).
-*> -> For optimal performance, LWORK >= max(2*M+N,3*N+(N+1)*NB,7),
-*> where NB is the optimal block size for DGEQP3, DGEQRF, DGELQF,
-*> DORMLQ. In general, the optimal length LWORK is computed as
-*> LWORK >= max(2*M+N,N+LWORK(DGEQP3), N+LWORK(DPOCON),
-*> N+LWORK(DGELQF), 2*N+LWORK(DGEQRF), N+LWORK(DORMLQ)).
-*>
-*> If SIGMA and the left singular vectors are needed
-*> -> the minimal requirement is LWORK >= max(2*M+N,4*N+1,7).
-*> -> For optimal performance:
-*> if JOBU = 'U' :: LWORK >= max(2*M+N,3*N+(N+1)*NB,7),
-*> if JOBU = 'F' :: LWORK >= max(2*M+N,3*N+(N+1)*NB,N+M*NB,7),
-*> where NB is the optimal block size for DGEQP3, DGEQRF, DORMQR.
-*> In general, the optimal length LWORK is computed as
-*> LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DPOCON),
-*> 2*N+LWORK(DGEQRF), N+LWORK(DORMQR)).
-*> Here LWORK(DORMQR) equals N*NB (for JOBU = 'U') or
-*> M*NB (for JOBU = 'F').
-*>
-*> If the full SVD is needed: (JOBU = 'U' or JOBU = 'F') and
-*> -> if JOBV = 'V'
-*> the minimal requirement is LWORK >= max(2*M+N,6*N+2*N*N).
-*> -> if JOBV = 'J' the minimal requirement is
-*> LWORK >= max(2*M+N, 4*N+N*N,2*N+N*N+6).
-*> -> For optimal performance, LWORK should be additionally
-*> larger than N+M*NB, where NB is the optimal block size
-*> for DORMQR.
-*> \endverbatim
-*>
-*> \param[out] IWORK
-*> \verbatim
-*> IWORK is INTEGER array, dimension (MAX(3,M+3*N)).
-*> On exit,
-*> IWORK(1) = the numerical rank determined after the initial
-*> QR factorization with pivoting. See the descriptions
-*> of JOBA and JOBR.
-*> IWORK(2) = the number of the computed nonzero singular values
-*> IWORK(3) = if nonzero, a warning message:
-*> If IWORK(3) = 1 then some of the column norms of A
-*> were denormalized floats. The requested high accuracy
-*> is not warranted by the data.
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*> INFO is INTEGER
-*> < 0: if INFO = -i, then the i-th argument had an illegal value.
-*> = 0: successful exit;
-*> > 0: DGEJSV did not converge in the maximal allowed number
-*> of sweeps. The computed values may be inaccurate.
-*> \endverbatim
-*
-* Authors:
-* ========
-*
-*> \author Univ. of Tennessee
-*> \author Univ. of California Berkeley
-*> \author Univ. of Colorado Denver
-*> \author NAG Ltd.
-*
-*> \ingroup doubleGEsing
-*
-*> \par Further Details:
-* =====================
-*>
-*> \verbatim
-*>
-*> DGEJSV implements a preconditioned Jacobi SVD algorithm. It uses DGEQP3,
-*> DGEQRF, and DGELQF as preprocessors and preconditioners. Optionally, an
-*> additional row pivoting can be used as a preprocessor, which in some
-*> cases results in much higher accuracy. An example is matrix A with the
-*> structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned
-*> diagonal matrices and C is well-conditioned matrix. In that case, complete
-*> pivoting in the first QR factorizations provides accuracy dependent on the
-*> condition number of C, and independent of D1, D2. Such higher accuracy is
-*> not completely understood theoretically, but it works well in practice.
-*> Further, if A can be written as A = B*D, with well-conditioned B and some
-*> diagonal D, then the high accuracy is guaranteed, both theoretically and
-*> in software, independent of D. For more details see [1], [2].
-*> The computational range for the singular values can be the full range
-*> ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS
-*> & LAPACK routines called by DGEJSV are implemented to work in that range.
-*> If that is not the case, then the restriction for safe computation with
-*> the singular values in the range of normalized IEEE numbers is that the
-*> spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not
-*> overflow. This code (DGEJSV) is best used in this restricted range,
-*> meaning that singular values of magnitude below ||A||_2 / DLAMCH('O') are
-*> returned as zeros. See JOBR for details on this.
-*> Further, this implementation is somewhat slower than the one described
-*> in [1,2] due to replacement of some non-LAPACK components, and because
-*> the choice of some tuning parameters in the iterative part (DGESVJ) is
-*> left to the implementer on a particular machine.
-*> The rank revealing QR factorization (in this code: DGEQP3) should be
-*> implemented as in [3]. We have a new version of DGEQP3 under development
-*> that is more robust than the current one in LAPACK, with a cleaner cut in
-*> rank deficient cases. It will be available in the SIGMA library [4].
-*> If M is much larger than N, it is obvious that the initial QRF with
-*> column pivoting can be preprocessed by the QRF without pivoting. That
-*> well known trick is not used in DGEJSV because in some cases heavy row
-*> weighting can be treated with complete pivoting. The overhead in cases
-*> M much larger than N is then only due to pivoting, but the benefits in
-*> terms of accuracy have prevailed. The implementer/user can incorporate
-*> this extra QRF step easily. The implementer can also improve data movement
-*> (matrix transpose, matrix copy, matrix transposed copy) - this
-*> implementation of DGEJSV uses only the simplest, naive data movement.
-*> \endverbatim
-*
-*> \par Contributors:
-* ==================
-*>
-*> Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
-*
-*> \par References:
-* ================
-*>
-*> \verbatim
-*>
-*> [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.
-*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.
-*> LAPACK Working note 169.
-*> [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.
-*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.
-*> LAPACK Working note 170.
-*> [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR
-*> factorization software - a case study.
-*> ACM Trans. Math. Softw. Vol. 35, No 2 (2008), pp. 1-28.
-*> LAPACK Working note 176.
-*> [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,
-*> QSVD, (H,K)-SVD computations.
-*> Department of Mathematics, University of Zagreb, 2008.
-*> \endverbatim
-*
-*> \par Bugs, examples and comments:
-* =================================
-*>
-*> Please report all bugs and send interesting examples and/or comments to
-*> drmac@math.hr. Thank you.
-*>
-* =====================================================================
- SUBROUTINE DGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
- $ M, N, A, LDA, SVA, U, LDU, V, LDV,
- $ WORK, LWORK, IWORK, INFO )
-*
-* -- LAPACK computational routine --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- IMPLICIT NONE
- INTEGER INFO, LDA, LDU, LDV, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), SVA( N ), U( LDU, * ), V( LDV, * ),
- $ WORK( LWORK )
- INTEGER IWORK( * )
- CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
-* ..
-*
-* ===========================================================================
-*
-* .. Local Parameters ..
- DOUBLE PRECISION ZERO, ONE
- PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 )
-* ..
-* .. Local Scalars ..
- DOUBLE PRECISION AAPP, AAQQ, AATMAX, AATMIN, BIG, BIG1, COND_OK,
- $ CONDR1, CONDR2, ENTRA, ENTRAT, EPSLN, MAXPRJ, SCALEM,
- $ SCONDA, SFMIN, SMALL, TEMP1, USCAL1, USCAL2, XSC
- INTEGER IERR, N1, NR, NUMRANK, p, q, WARNING
- LOGICAL ALMORT, DEFR, ERREST, GOSCAL, JRACC, KILL, LSVEC,
- $ L2ABER, L2KILL, L2PERT, L2RANK, L2TRAN,
- $ NOSCAL, ROWPIV, RSVEC, TRANSP
-* ..
-* .. Intrinsic Functions ..
- INTRINSIC DABS, DLOG, MAX, MIN, DBLE, IDNINT, DSIGN, DSQRT
-* ..
-* .. External Functions ..
- DOUBLE PRECISION DLAMCH, DNRM2
- INTEGER IDAMAX
- LOGICAL LSAME
- EXTERNAL IDAMAX, LSAME, DLAMCH, DNRM2
-* ..
-* .. External Subroutines ..
- EXTERNAL DCOPY, DGELQF, DGEQP3, DGEQRF, DLACPY, DLASCL,
- $ DLASET, DLASSQ, DLASWP, DORGQR, DORMLQ,
- $ DORMQR, DPOCON, DSCAL, DSWAP, DTRSM, XERBLA
-*
- EXTERNAL DGESVJ
-* ..
-*
-* Test the input arguments
-*
- LSVEC = LSAME( JOBU, 'U' ) .OR. LSAME( JOBU, 'F' )
- JRACC = LSAME( JOBV, 'J' )
- RSVEC = LSAME( JOBV, 'V' ) .OR. JRACC
- ROWPIV = LSAME( JOBA, 'F' ) .OR. LSAME( JOBA, 'G' )
- L2RANK = LSAME( JOBA, 'R' )
- L2ABER = LSAME( JOBA, 'A' )
- ERREST = LSAME( JOBA, 'E' ) .OR. LSAME( JOBA, 'G' )
- L2TRAN = LSAME( JOBT, 'T' )
- L2KILL = LSAME( JOBR, 'R' )
- DEFR = LSAME( JOBR, 'N' )
- L2PERT = LSAME( JOBP, 'P' )
-*
- IF ( .NOT.(ROWPIV .OR. L2RANK .OR. L2ABER .OR.
- $ ERREST .OR. LSAME( JOBA, 'C' ) )) THEN
- INFO = - 1
- ELSE IF ( .NOT.( LSVEC .OR. LSAME( JOBU, 'N' ) .OR.
- $ LSAME( JOBU, 'W' )) ) THEN
- INFO = - 2
- ELSE IF ( .NOT.( RSVEC .OR. LSAME( JOBV, 'N' ) .OR.
- $ LSAME( JOBV, 'W' )) .OR. ( JRACC .AND. (.NOT.LSVEC) ) ) THEN
- INFO = - 3
- ELSE IF ( .NOT. ( L2KILL .OR. DEFR ) ) THEN
- INFO = - 4
- ELSE IF ( .NOT. ( L2TRAN .OR. LSAME( JOBT, 'N' ) ) ) THEN
- INFO = - 5
- ELSE IF ( .NOT. ( L2PERT .OR. LSAME( JOBP, 'N' ) ) ) THEN
- INFO = - 6
- ELSE IF ( M .LT. 0 ) THEN
- INFO = - 7
- ELSE IF ( ( N .LT. 0 ) .OR. ( N .GT. M ) ) THEN
- INFO = - 8
- ELSE IF ( LDA .LT. M ) THEN
- INFO = - 10
- ELSE IF ( LSVEC .AND. ( LDU .LT. M ) ) THEN
- INFO = - 13
- ELSE IF ( RSVEC .AND. ( LDV .LT. N ) ) THEN
- INFO = - 15
- ELSE IF ( (.NOT.(LSVEC .OR. RSVEC .OR. ERREST).AND.
- & (LWORK .LT. MAX(7,4*N+1,2*M+N))) .OR.
- & (.NOT.(LSVEC .OR. RSVEC) .AND. ERREST .AND.
- & (LWORK .LT. MAX(7,4*N+N*N,2*M+N))) .OR.
- & (LSVEC .AND. (.NOT.RSVEC) .AND. (LWORK .LT. MAX(7,2*M+N,4*N+1)))
- & .OR.
- & (RSVEC .AND. (.NOT.LSVEC) .AND. (LWORK .LT. MAX(7,2*M+N,4*N+1)))
- & .OR.
- & (LSVEC .AND. RSVEC .AND. (.NOT.JRACC) .AND.
- & (LWORK.LT.MAX(2*M+N,6*N+2*N*N)))
- & .OR. (LSVEC .AND. RSVEC .AND. JRACC .AND.
- & LWORK.LT.MAX(2*M+N,4*N+N*N,2*N+N*N+6)))
- & THEN
- INFO = - 17
- ELSE
-* #:)
- INFO = 0
- END IF
-*
- IF ( INFO .NE. 0 ) THEN
-* #:(
- CALL XERBLA( 'DGEJSV', - INFO )
- RETURN
- END IF
-*
-* Quick return for void matrix (Y3K safe)
-* #:)
- IF ( ( M .EQ. 0 ) .OR. ( N .EQ. 0 ) ) THEN
- IWORK(1:3) = 0
- WORK(1:7) = 0
- RETURN
- ENDIF
-*
-* Determine whether the matrix U should be M x N or M x M
-*
- IF ( LSVEC ) THEN
- N1 = N
- IF ( LSAME( JOBU, 'F' ) ) N1 = M
- END IF
-*
-* Set numerical parameters
-*
-*! NOTE: Make sure DLAMCH() does not fail on the target architecture.
-*
- EPSLN = DLAMCH('Epsilon')
- SFMIN = DLAMCH('SafeMinimum')
- SMALL = SFMIN / EPSLN
- BIG = DLAMCH('O')
-* BIG = ONE / SFMIN
-*
-* Initialize SVA(1:N) = diag( ||A e_i||_2 )_1^N
-*
-*(!) If necessary, scale SVA() to protect the largest norm from
-* overflow. It is possible that this scaling pushes the smallest
-* column norm left from the underflow threshold (extreme case).
-*
- SCALEM = ONE / DSQRT(DBLE(M)*DBLE(N))
- NOSCAL = .TRUE.
- GOSCAL = .TRUE.
- DO 1874 p = 1, N
- AAPP = ZERO
- AAQQ = ONE
- CALL DLASSQ( M, A(1,p), 1, AAPP, AAQQ )
- IF ( AAPP .GT. BIG ) THEN
- INFO = - 9
- CALL XERBLA( 'DGEJSV', -INFO )
- RETURN
- END IF
- AAQQ = DSQRT(AAQQ)
- IF ( ( AAPP .LT. (BIG / AAQQ) ) .AND. NOSCAL ) THEN
- SVA(p) = AAPP * AAQQ
- ELSE
- NOSCAL = .FALSE.
- SVA(p) = AAPP * ( AAQQ * SCALEM )
- IF ( GOSCAL ) THEN
- GOSCAL = .FALSE.
- CALL DSCAL( p-1, SCALEM, SVA, 1 )
- END IF
- END IF
- 1874 CONTINUE
-*
- IF ( NOSCAL ) SCALEM = ONE
-*
- AAPP = ZERO
- AAQQ = BIG
- DO 4781 p = 1, N
- AAPP = MAX( AAPP, SVA(p) )
- IF ( SVA(p) .NE. ZERO ) AAQQ = MIN( AAQQ, SVA(p) )
- 4781 CONTINUE
-*
-* Quick return for zero M x N matrix
-* #:)
- IF ( AAPP .EQ. ZERO ) THEN
- IF ( LSVEC ) CALL DLASET( 'G', M, N1, ZERO, ONE, U, LDU )
- IF ( RSVEC ) CALL DLASET( 'G', N, N, ZERO, ONE, V, LDV )
- WORK(1) = ONE
- WORK(2) = ONE
- IF ( ERREST ) WORK(3) = ONE
- IF ( LSVEC .AND. RSVEC ) THEN
- WORK(4) = ONE
- WORK(5) = ONE
- END IF
- IF ( L2TRAN ) THEN
- WORK(6) = ZERO
- WORK(7) = ZERO
- END IF
- IWORK(1) = 0
- IWORK(2) = 0
- IWORK(3) = 0
- RETURN
- END IF
-*
-* Issue warning if denormalized column norms detected. Override the
-* high relative accuracy request. Issue licence to kill columns
-* (set them to zero) whose norm is less than sigma_max / BIG (roughly).
-* #:(
- WARNING = 0
- IF ( AAQQ .LE. SFMIN ) THEN
- L2RANK = .TRUE.
- L2KILL = .TRUE.
- WARNING = 1
- END IF
-*
-* Quick return for one-column matrix
-* #:)
- IF ( N .EQ. 1 ) THEN
-*
- IF ( LSVEC ) THEN
- CALL DLASCL( 'G',0,0,SVA(1),SCALEM, M,1,A(1,1),LDA,IERR )
- CALL DLACPY( 'A', M, 1, A, LDA, U, LDU )
-* computing all M left singular vectors of the M x 1 matrix
- IF ( N1 .NE. N ) THEN
- CALL DGEQRF( M, N, U,LDU, WORK, WORK(N+1),LWORK-N,IERR )
- CALL DORGQR( M,N1,1, U,LDU,WORK,WORK(N+1),LWORK-N,IERR )
- CALL DCOPY( M, A(1,1), 1, U(1,1), 1 )
- END IF
- END IF
- IF ( RSVEC ) THEN
- V(1,1) = ONE
- END IF
- IF ( SVA(1) .LT. (BIG*SCALEM) ) THEN
- SVA(1) = SVA(1) / SCALEM
- SCALEM = ONE
- END IF
- WORK(1) = ONE / SCALEM
- WORK(2) = ONE
- IF ( SVA(1) .NE. ZERO ) THEN
- IWORK(1) = 1
- IF ( ( SVA(1) / SCALEM) .GE. SFMIN ) THEN
- IWORK(2) = 1
- ELSE
- IWORK(2) = 0
- END IF
- ELSE
- IWORK(1) = 0
- IWORK(2) = 0
- END IF
- IWORK(3) = 0
- IF ( ERREST ) WORK(3) = ONE
- IF ( LSVEC .AND. RSVEC ) THEN
- WORK(4) = ONE
- WORK(5) = ONE
- END IF
- IF ( L2TRAN ) THEN
- WORK(6) = ZERO
- WORK(7) = ZERO
- END IF
- RETURN
-*
- END IF
-*
- TRANSP = .FALSE.
- L2TRAN = L2TRAN .AND. ( M .EQ. N )
-*
- AATMAX = -ONE
- AATMIN = BIG
- IF ( ROWPIV .OR. L2TRAN ) THEN
-*
-* Compute the row norms, needed to determine row pivoting sequence
-* (in the case of heavily row weighted A, row pivoting is strongly
-* advised) and to collect information needed to compare the
-* structures of A * A^t and A^t * A (in the case L2TRAN.EQ..TRUE.).
-*
- IF ( L2TRAN ) THEN
- DO 1950 p = 1, M
- XSC = ZERO
- TEMP1 = ONE
- CALL DLASSQ( N, A(p,1), LDA, XSC, TEMP1 )
-* DLASSQ gets both the ell_2 and the ell_infinity norm
-* in one pass through the vector
- WORK(M+N+p) = XSC * SCALEM
- WORK(N+p) = XSC * (SCALEM*DSQRT(TEMP1))
- AATMAX = MAX( AATMAX, WORK(N+p) )
- IF (WORK(N+p) .NE. ZERO) AATMIN = MIN(AATMIN,WORK(N+p))
- 1950 CONTINUE
- ELSE
- DO 1904 p = 1, M
- WORK(M+N+p) = SCALEM*DABS( A(p,IDAMAX(N,A(p,1),LDA)) )
- AATMAX = MAX( AATMAX, WORK(M+N+p) )
- AATMIN = MIN( AATMIN, WORK(M+N+p) )
- 1904 CONTINUE
- END IF
-*
- END IF
-*
-* For square matrix A try to determine whether A^t would be better
-* input for the preconditioned Jacobi SVD, with faster convergence.
-* The decision is based on an O(N) function of the vector of column
-* and row norms of A, based on the Shannon entropy. This should give
-* the right choice in most cases when the difference actually matters.
-* It may fail and pick the slower converging side.
-*
- ENTRA = ZERO
- ENTRAT = ZERO
- IF ( L2TRAN ) THEN
-*
- XSC = ZERO
- TEMP1 = ONE
- CALL DLASSQ( N, SVA, 1, XSC, TEMP1 )
- TEMP1 = ONE / TEMP1
-*
- ENTRA = ZERO
- DO 1113 p = 1, N
- BIG1 = ( ( SVA(p) / XSC )**2 ) * TEMP1
- IF ( BIG1 .NE. ZERO ) ENTRA = ENTRA + BIG1 * DLOG(BIG1)
- 1113 CONTINUE
- ENTRA = - ENTRA / DLOG(DBLE(N))
-*
-* Now, SVA().^2/Trace(A^t * A) is a point in the probability simplex.
-* It is derived from the diagonal of A^t * A. Do the same with the
-* diagonal of A * A^t, compute the entropy of the corresponding
-* probability distribution. Note that A * A^t and A^t * A have the
-* same trace.
-*
- ENTRAT = ZERO
- DO 1114 p = N+1, N+M
- BIG1 = ( ( WORK(p) / XSC )**2 ) * TEMP1
- IF ( BIG1 .NE. ZERO ) ENTRAT = ENTRAT + BIG1 * DLOG(BIG1)
- 1114 CONTINUE
- ENTRAT = - ENTRAT / DLOG(DBLE(M))
-*
-* Analyze the entropies and decide A or A^t. Smaller entropy
-* usually means better input for the algorithm.
-*
- TRANSP = ( ENTRAT .LT. ENTRA )
-*
-* If A^t is better than A, transpose A.
-*
- IF ( TRANSP ) THEN
-* In an optimal implementation, this trivial transpose
-* should be replaced with faster transpose.
- DO 1115 p = 1, N - 1
- DO 1116 q = p + 1, N
- TEMP1 = A(q,p)
- A(q,p) = A(p,q)
- A(p,q) = TEMP1
- 1116 CONTINUE
- 1115 CONTINUE
- DO 1117 p = 1, N
- WORK(M+N+p) = SVA(p)
- SVA(p) = WORK(N+p)
- 1117 CONTINUE
- TEMP1 = AAPP
- AAPP = AATMAX
- AATMAX = TEMP1
- TEMP1 = AAQQ
- AAQQ = AATMIN
- AATMIN = TEMP1
- KILL = LSVEC
- LSVEC = RSVEC
- RSVEC = KILL
- IF ( LSVEC ) N1 = N
-*
- ROWPIV = .TRUE.
- END IF
-*
- END IF
-* END IF L2TRAN
-*
-* Scale the matrix so that its maximal singular value remains less
-* than DSQRT(BIG) -- the matrix is scaled so that its maximal column
-* has Euclidean norm equal to DSQRT(BIG/N). The only reason to keep
-* DSQRT(BIG) instead of BIG is the fact that DGEJSV uses LAPACK and
-* BLAS routines that, in some implementations, are not capable of
-* working in the full interval [SFMIN,BIG] and that they may provoke
-* overflows in the intermediate results. If the singular values spread
-* from SFMIN to BIG, then DGESVJ will compute them. So, in that case,
-* one should use DGESVJ instead of DGEJSV.
-*
- BIG1 = DSQRT( BIG )
- TEMP1 = DSQRT( BIG / DBLE(N) )
-*
- CALL DLASCL( 'G', 0, 0, AAPP, TEMP1, N, 1, SVA, N, IERR )
- IF ( AAQQ .GT. (AAPP * SFMIN) ) THEN
- AAQQ = ( AAQQ / AAPP ) * TEMP1
- ELSE
- AAQQ = ( AAQQ * TEMP1 ) / AAPP
- END IF
- TEMP1 = TEMP1 * SCALEM
- CALL DLASCL( 'G', 0, 0, AAPP, TEMP1, M, N, A, LDA, IERR )
-*
-* To undo scaling at the end of this procedure, multiply the
-* computed singular values with USCAL2 / USCAL1.
-*
- USCAL1 = TEMP1
- USCAL2 = AAPP
-*
- IF ( L2KILL ) THEN
-* L2KILL enforces computation of nonzero singular values in
-* the restricted range of condition number of the initial A,
-* sigma_max(A) / sigma_min(A) approx. DSQRT(BIG)/DSQRT(SFMIN).
- XSC = DSQRT( SFMIN )
- ELSE
- XSC = SMALL
-*
-* Now, if the condition number of A is too big,
-* sigma_max(A) / sigma_min(A) .GT. DSQRT(BIG/N) * EPSLN / SFMIN,
-* as a precaution measure, the full SVD is computed using DGESVJ
-* with accumulated Jacobi rotations. This provides numerically
-* more robust computation, at the cost of slightly increased run
-* time. Depending on the concrete implementation of BLAS and LAPACK
-* (i.e. how they behave in presence of extreme ill-conditioning) the
-* implementor may decide to remove this switch.
- IF ( ( AAQQ.LT.DSQRT(SFMIN) ) .AND. LSVEC .AND. RSVEC ) THEN
- JRACC = .TRUE.
- END IF
-*
- END IF
- IF ( AAQQ .LT. XSC ) THEN
- DO 700 p = 1, N
- IF ( SVA(p) .LT. XSC ) THEN
- CALL DLASET( 'A', M, 1, ZERO, ZERO, A(1,p), LDA )
- SVA(p) = ZERO
- END IF
- 700 CONTINUE
- END IF
-*
-* Preconditioning using QR factorization with pivoting
-*
- IF ( ROWPIV ) THEN
-* Optional row permutation (Bjoerck row pivoting):
-* A result by Cox and Higham shows that the Bjoerck's
-* row pivoting combined with standard column pivoting
-* has similar effect as Powell-Reid complete pivoting.
-* The ell-infinity norms of A are made nonincreasing.
- DO 1952 p = 1, M - 1
- q = IDAMAX( M-p+1, WORK(M+N+p), 1 ) + p - 1
- IWORK(2*N+p) = q
- IF ( p .NE. q ) THEN
- TEMP1 = WORK(M+N+p)
- WORK(M+N+p) = WORK(M+N+q)
- WORK(M+N+q) = TEMP1
- END IF
- 1952 CONTINUE
- CALL DLASWP( N, A, LDA, 1, M-1, IWORK(2*N+1), 1 )
- END IF
-*
-* End of the preparation phase (scaling, optional sorting and
-* transposing, optional flushing of small columns).
-*
-* Preconditioning
-*
-* If the full SVD is needed, the right singular vectors are computed
-* from a matrix equation, and for that we need theoretical analysis
-* of the Businger-Golub pivoting. So we use DGEQP3 as the first RR QRF.
-* In all other cases the first RR QRF can be chosen by other criteria
-* (eg speed by replacing global with restricted window pivoting, such
-* as in SGEQPX from TOMS # 782). Good results will be obtained using
-* SGEQPX with properly (!) chosen numerical parameters.
-* Any improvement of DGEQP3 improves overall performance of DGEJSV.
-*
-* A * P1 = Q1 * [ R1^t 0]^t:
- DO 1963 p = 1, N
-* .. all columns are free columns
- IWORK(p) = 0
- 1963 CONTINUE
- CALL DGEQP3( M,N,A,LDA, IWORK,WORK, WORK(N+1),LWORK-N, IERR )
-*
-* The upper triangular matrix R1 from the first QRF is inspected for
-* rank deficiency and possibilities for deflation, or possible
-* ill-conditioning. Depending on the user specified flag L2RANK,
-* the procedure explores possibilities to reduce the numerical
-* rank by inspecting the computed upper triangular factor. If
-* L2RANK or L2ABER are up, then DGEJSV will compute the SVD of
-* A + dA, where ||dA|| <= f(M,N)*EPSLN.
-*
- NR = 1
- IF ( L2ABER ) THEN
-* Standard absolute error bound suffices. All sigma_i with
-* sigma_i < N*EPSLN*||A|| are flushed to zero. This is an
-* aggressive enforcement of lower numerical rank by introducing a
-* backward error of the order of N*EPSLN*||A||.
- TEMP1 = DSQRT(DBLE(N))*EPSLN
- DO 3001 p = 2, N
- IF ( DABS(A(p,p)) .GE. (TEMP1*DABS(A(1,1))) ) THEN
- NR = NR + 1
- ELSE
- GO TO 3002
- END IF
- 3001 CONTINUE
- 3002 CONTINUE
- ELSE IF ( L2RANK ) THEN
-* .. similarly as above, only slightly more gentle (less aggressive).
-* Sudden drop on the diagonal of R1 is used as the criterion for
-* close-to-rank-deficient.
- TEMP1 = DSQRT(SFMIN)
- DO 3401 p = 2, N
- IF ( ( DABS(A(p,p)) .LT. (EPSLN*DABS(A(p-1,p-1))) ) .OR.
- $ ( DABS(A(p,p)) .LT. SMALL ) .OR.
- $ ( L2KILL .AND. (DABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3402
- NR = NR + 1
- 3401 CONTINUE
- 3402 CONTINUE
-*
- ELSE
-* The goal is high relative accuracy. However, if the matrix
-* has high scaled condition number the relative accuracy is in
-* general not feasible. Later on, a condition number estimator
-* will be deployed to estimate the scaled condition number.
-* Here we just remove the underflowed part of the triangular
-* factor. This prevents the situation in which the code is
-* working hard to get the accuracy not warranted by the data.
- TEMP1 = DSQRT(SFMIN)
- DO 3301 p = 2, N
- IF ( ( DABS(A(p,p)) .LT. SMALL ) .OR.
- $ ( L2KILL .AND. (DABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3302
- NR = NR + 1
- 3301 CONTINUE
- 3302 CONTINUE
-*
- END IF
-*
- ALMORT = .FALSE.
- IF ( NR .EQ. N ) THEN
- MAXPRJ = ONE
- DO 3051 p = 2, N
- TEMP1 = DABS(A(p,p)) / SVA(IWORK(p))
- MAXPRJ = MIN( MAXPRJ, TEMP1 )
- 3051 CONTINUE
- IF ( MAXPRJ**2 .GE. ONE - DBLE(N)*EPSLN ) ALMORT = .TRUE.
- END IF
-*
-*
- SCONDA = - ONE
- CONDR1 = - ONE
- CONDR2 = - ONE
-*
- IF ( ERREST ) THEN
- IF ( N .EQ. NR ) THEN
- IF ( RSVEC ) THEN
-* .. V is available as workspace
- CALL DLACPY( 'U', N, N, A, LDA, V, LDV )
- DO 3053 p = 1, N
- TEMP1 = SVA(IWORK(p))
- CALL DSCAL( p, ONE/TEMP1, V(1,p), 1 )
- 3053 CONTINUE
- CALL DPOCON( 'U', N, V, LDV, ONE, TEMP1,
- $ WORK(N+1), IWORK(2*N+M+1), IERR )
- ELSE IF ( LSVEC ) THEN
-* .. U is available as workspace
- CALL DLACPY( 'U', N, N, A, LDA, U, LDU )
- DO 3054 p = 1, N
- TEMP1 = SVA(IWORK(p))
- CALL DSCAL( p, ONE/TEMP1, U(1,p), 1 )
- 3054 CONTINUE
- CALL DPOCON( 'U', N, U, LDU, ONE, TEMP1,
- $ WORK(N+1), IWORK(2*N+M+1), IERR )
- ELSE
- CALL DLACPY( 'U', N, N, A, LDA, WORK(N+1), N )
- DO 3052 p = 1, N
- TEMP1 = SVA(IWORK(p))
- CALL DSCAL( p, ONE/TEMP1, WORK(N+(p-1)*N+1), 1 )
- 3052 CONTINUE
-* .. the columns of R are scaled to have unit Euclidean lengths.
- CALL DPOCON( 'U', N, WORK(N+1), N, ONE, TEMP1,
- $ WORK(N+N*N+1), IWORK(2*N+M+1), IERR )
- END IF
- SCONDA = ONE / DSQRT(TEMP1)
-* SCONDA is an estimate of DSQRT(||(R^t * R)^(-1)||_1).
-* N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA
- ELSE
- SCONDA = - ONE
- END IF
- END IF
-*
- L2PERT = L2PERT .AND. ( DABS( A(1,1)/A(NR,NR) ) .GT. DSQRT(BIG1) )
-* If there is no violent scaling, artificial perturbation is not needed.
-*
-* Phase 3:
-*
- IF ( .NOT. ( RSVEC .OR. LSVEC ) ) THEN
-*
-* Singular Values only
-*
-* .. transpose A(1:NR,1:N)
- DO 1946 p = 1, MIN( N-1, NR )
- CALL DCOPY( N-p, A(p,p+1), LDA, A(p+1,p), 1 )
- 1946 CONTINUE
-*
-* The following two DO-loops introduce small relative perturbation
-* into the strict upper triangle of the lower triangular matrix.
-* Small entries below the main diagonal are also changed.
-* This modification is useful if the computing environment does not
-* provide/allow FLUSH TO ZERO underflow, for it prevents many
-* annoying denormalized numbers in case of strongly scaled matrices.
-* The perturbation is structured so that it does not introduce any
-* new perturbation of the singular values, and it does not destroy
-* the job done by the preconditioner.
-* The licence for this perturbation is in the variable L2PERT, which
-* should be .FALSE. if FLUSH TO ZERO underflow is active.
-*
- IF ( .NOT. ALMORT ) THEN
-*
- IF ( L2PERT ) THEN
-* XSC = DSQRT(SMALL)
- XSC = EPSLN / DBLE(N)
- DO 4947 q = 1, NR
- TEMP1 = XSC*DABS(A(q,q))
- DO 4949 p = 1, N
- IF ( ( (p.GT.q) .AND. (DABS(A(p,q)).LE.TEMP1) )
- $ .OR. ( p .LT. q ) )
- $ A(p,q) = DSIGN( TEMP1, A(p,q) )
- 4949 CONTINUE
- 4947 CONTINUE
- ELSE
- CALL DLASET( 'U', NR-1,NR-1, ZERO,ZERO, A(1,2),LDA )
- END IF
-*
-* .. second preconditioning using the QR factorization
-*
- CALL DGEQRF( N,NR, A,LDA, WORK, WORK(N+1),LWORK-N, IERR )
-*
-* .. and transpose upper to lower triangular
- DO 1948 p = 1, NR - 1
- CALL DCOPY( NR-p, A(p,p+1), LDA, A(p+1,p), 1 )
- 1948 CONTINUE
-*
- END IF
-*
-* Row-cyclic Jacobi SVD algorithm with column pivoting
-*
-* .. again some perturbation (a "background noise") is added
-* to drown denormals
- IF ( L2PERT ) THEN
-* XSC = DSQRT(SMALL)
- XSC = EPSLN / DBLE(N)
- DO 1947 q = 1, NR
- TEMP1 = XSC*DABS(A(q,q))
- DO 1949 p = 1, NR
- IF ( ( (p.GT.q) .AND. (DABS(A(p,q)).LE.TEMP1) )
- $ .OR. ( p .LT. q ) )
- $ A(p,q) = DSIGN( TEMP1, A(p,q) )
- 1949 CONTINUE
- 1947 CONTINUE
- ELSE
- CALL DLASET( 'U', NR-1, NR-1, ZERO, ZERO, A(1,2), LDA )
- END IF
-*
-* .. and one-sided Jacobi rotations are started on a lower
-* triangular matrix (plus perturbation which is ignored in
-* the part which destroys triangular form (confusing?!))
-*
- CALL DGESVJ( 'L', 'NoU', 'NoV', NR, NR, A, LDA, SVA,
- $ N, V, LDV, WORK, LWORK, INFO )
-*
- SCALEM = WORK(1)
- NUMRANK = IDNINT(WORK(2))
-*
-*
- ELSE IF ( RSVEC .AND. ( .NOT. LSVEC ) ) THEN
-*
-* -> Singular Values and Right Singular Vectors <-
-*
- IF ( ALMORT ) THEN
-*
-* .. in this case NR equals N
- DO 1998 p = 1, NR
- CALL DCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
- 1998 CONTINUE
- CALL DLASET( 'Upper', NR-1, NR-1, ZERO, ZERO, V(1,2), LDV )
-*
- CALL DGESVJ( 'L','U','N', N, NR, V,LDV, SVA, NR, A,LDA,
- $ WORK, LWORK, INFO )
- SCALEM = WORK(1)
- NUMRANK = IDNINT(WORK(2))
-
- ELSE
-*
-* .. two more QR factorizations ( one QRF is not enough, two require
-* accumulated product of Jacobi rotations, three are perfect )
-*
- CALL DLASET( 'Lower', NR-1, NR-1, ZERO, ZERO, A(2,1), LDA )
- CALL DGELQF( NR, N, A, LDA, WORK, WORK(N+1), LWORK-N, IERR)
- CALL DLACPY( 'Lower', NR, NR, A, LDA, V, LDV )
- CALL DLASET( 'Upper', NR-1, NR-1, ZERO, ZERO, V(1,2), LDV )
- CALL DGEQRF( NR, NR, V, LDV, WORK(N+1), WORK(2*N+1),
- $ LWORK-2*N, IERR )
- DO 8998 p = 1, NR
- CALL DCOPY( NR-p+1, V(p,p), LDV, V(p,p), 1 )
- 8998 CONTINUE
- CALL DLASET( 'Upper', NR-1, NR-1, ZERO, ZERO, V(1,2), LDV )
-*
- CALL DGESVJ( 'Lower', 'U','N', NR, NR, V,LDV, SVA, NR, U,
- $ LDU, WORK(N+1), LWORK, INFO )
- SCALEM = WORK(N+1)
- NUMRANK = IDNINT(WORK(N+2))
- IF ( NR .LT. N ) THEN
- CALL DLASET( 'A',N-NR, NR, ZERO,ZERO, V(NR+1,1), LDV )
- CALL DLASET( 'A',NR, N-NR, ZERO,ZERO, V(1,NR+1), LDV )
- CALL DLASET( 'A',N-NR,N-NR,ZERO,ONE, V(NR+1,NR+1), LDV )
- END IF
-*
- CALL DORMLQ( 'Left', 'Transpose', N, N, NR, A, LDA, WORK,
- $ V, LDV, WORK(N+1), LWORK-N, IERR )
-*
- END IF
-*
- DO 8991 p = 1, N
- CALL DCOPY( N, V(p,1), LDV, A(IWORK(p),1), LDA )
- 8991 CONTINUE
- CALL DLACPY( 'All', N, N, A, LDA, V, LDV )
-*
- IF ( TRANSP ) THEN
- CALL DLACPY( 'All', N, N, V, LDV, U, LDU )
- END IF
-*
- ELSE IF ( LSVEC .AND. ( .NOT. RSVEC ) ) THEN
-*
-* .. Singular Values and Left Singular Vectors ..
-*
-* .. second preconditioning step to avoid need to accumulate
-* Jacobi rotations in the Jacobi iterations.
- DO 1965 p = 1, NR
- CALL DCOPY( N-p+1, A(p,p), LDA, U(p,p), 1 )
- 1965 CONTINUE
- CALL DLASET( 'Upper', NR-1, NR-1, ZERO, ZERO, U(1,2), LDU )
-*
- CALL DGEQRF( N, NR, U, LDU, WORK(N+1), WORK(2*N+1),
- $ LWORK-2*N, IERR )
-*
- DO 1967 p = 1, NR - 1
- CALL DCOPY( NR-p, U(p,p+1), LDU, U(p+1,p), 1 )
- 1967 CONTINUE
- CALL DLASET( 'Upper', NR-1, NR-1, ZERO, ZERO, U(1,2), LDU )
-*
- CALL DGESVJ( 'Lower', 'U', 'N', NR,NR, U, LDU, SVA, NR, A,
- $ LDA, WORK(N+1), LWORK-N, INFO )
- SCALEM = WORK(N+1)
- NUMRANK = IDNINT(WORK(N+2))
-*
- IF ( NR .LT. M ) THEN
- CALL DLASET( 'A', M-NR, NR,ZERO, ZERO, U(NR+1,1), LDU )
- IF ( NR .LT. N1 ) THEN
- CALL DLASET( 'A',NR, N1-NR, ZERO, ZERO, U(1,NR+1), LDU )
- CALL DLASET( 'A',M-NR,N1-NR,ZERO,ONE,U(NR+1,NR+1), LDU )
- END IF
- END IF
-*
- CALL DORMQR( 'Left', 'No Tr', M, N1, N, A, LDA, WORK, U,
- $ LDU, WORK(N+1), LWORK-N, IERR )
-*
- IF ( ROWPIV )
- $ CALL DLASWP( N1, U, LDU, 1, M-1, IWORK(2*N+1), -1 )
-*
- DO 1974 p = 1, N1
- XSC = ONE / DNRM2( M, U(1,p), 1 )
- CALL DSCAL( M, XSC, U(1,p), 1 )
- 1974 CONTINUE
-*
- IF ( TRANSP ) THEN
- CALL DLACPY( 'All', N, N, U, LDU, V, LDV )
- END IF
-*
- ELSE
-*
-* .. Full SVD ..
-*
- IF ( .NOT. JRACC ) THEN
-*
- IF ( .NOT. ALMORT ) THEN
-*
-* Second Preconditioning Step (QRF [with pivoting])
-* Note that the composition of TRANSPOSE, QRF and TRANSPOSE is
-* equivalent to an LQF CALL. Since in many libraries the QRF
-* seems to be better optimized than the LQF, we do explicit
-* transpose and use the QRF. This is subject to changes in an
-* optimized implementation of DGEJSV.
-*
- DO 1968 p = 1, NR
- CALL DCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
- 1968 CONTINUE
-*
-* .. the following two loops perturb small entries to avoid
-* denormals in the second QR factorization, where they are
-* as good as zeros. This is done to avoid painfully slow
-* computation with denormals. The relative size of the perturbation
-* is a parameter that can be changed by the implementer.
-* This perturbation device will be obsolete on machines with
-* properly implemented arithmetic.
-* To switch it off, set L2PERT=.FALSE. To remove it from the
-* code, remove the action under L2PERT=.TRUE., leave the ELSE part.
-* The following two loops should be blocked and fused with the
-* transposed copy above.
-*
- IF ( L2PERT ) THEN
- XSC = DSQRT(SMALL)
- DO 2969 q = 1, NR
- TEMP1 = XSC*DABS( V(q,q) )
- DO 2968 p = 1, N
- IF ( ( p .GT. q ) .AND. ( DABS(V(p,q)) .LE. TEMP1 )
- $ .OR. ( p .LT. q ) )
- $ V(p,q) = DSIGN( TEMP1, V(p,q) )
- IF ( p .LT. q ) V(p,q) = - V(p,q)
- 2968 CONTINUE
- 2969 CONTINUE
- ELSE
- CALL DLASET( 'U', NR-1, NR-1, ZERO, ZERO, V(1,2), LDV )
- END IF
-*
-* Estimate the row scaled condition number of R1
-* (If R1 is rectangular, N > NR, then the condition number
-* of the leading NR x NR submatrix is estimated.)
-*
- CALL DLACPY( 'L', NR, NR, V, LDV, WORK(2*N+1), NR )
- DO 3950 p = 1, NR
- TEMP1 = DNRM2(NR-p+1,WORK(2*N+(p-1)*NR+p),1)
- CALL DSCAL(NR-p+1,ONE/TEMP1,WORK(2*N+(p-1)*NR+p),1)
- 3950 CONTINUE
- CALL DPOCON('Lower',NR,WORK(2*N+1),NR,ONE,TEMP1,
- $ WORK(2*N+NR*NR+1),IWORK(M+2*N+1),IERR)
- CONDR1 = ONE / DSQRT(TEMP1)
-* .. here need a second opinion on the condition number
-* .. then assume worst case scenario
-* R1 is OK for inverse <=> CONDR1 .LT. DBLE(N)
-* more conservative <=> CONDR1 .LT. DSQRT(DBLE(N))
-*
- COND_OK = DSQRT(DBLE(NR))
-*[TP] COND_OK is a tuning parameter.
-
- IF ( CONDR1 .LT. COND_OK ) THEN
-* .. the second QRF without pivoting. Note: in an optimized
-* implementation, this QRF should be implemented as the QRF
-* of a lower triangular matrix.
-* R1^t = Q2 * R2
- CALL DGEQRF( N, NR, V, LDV, WORK(N+1), WORK(2*N+1),
- $ LWORK-2*N, IERR )
-*
- IF ( L2PERT ) THEN
- XSC = DSQRT(SMALL)/EPSLN
- DO 3959 p = 2, NR
- DO 3958 q = 1, p - 1
- TEMP1 = XSC * MIN(DABS(V(p,p)),DABS(V(q,q)))
- IF ( DABS(V(q,p)) .LE. TEMP1 )
- $ V(q,p) = DSIGN( TEMP1, V(q,p) )
- 3958 CONTINUE
- 3959 CONTINUE
- END IF
-*
- IF ( NR .NE. N )
- $ CALL DLACPY( 'A', N, NR, V, LDV, WORK(2*N+1), N )
-* .. save ...
-*
-* .. this transposed copy should be better than naive
- DO 1969 p = 1, NR - 1
- CALL DCOPY( NR-p, V(p,p+1), LDV, V(p+1,p), 1 )
- 1969 CONTINUE
-*
- CONDR2 = CONDR1
-*
- ELSE
-*
-* .. ill-conditioned case: second QRF with pivoting
-* Note that windowed pivoting would be equally good
-* numerically, and more run-time efficient. So, in
-* an optimal implementation, the next call to DGEQP3
-* should be replaced with eg. CALL SGEQPX (ACM TOMS #782)
-* with properly (carefully) chosen parameters.
-*
-* R1^t * P2 = Q2 * R2
- DO 3003 p = 1, NR
- IWORK(N+p) = 0
- 3003 CONTINUE
- CALL DGEQP3( N, NR, V, LDV, IWORK(N+1), WORK(N+1),
- $ WORK(2*N+1), LWORK-2*N, IERR )
-** CALL DGEQRF( N, NR, V, LDV, WORK(N+1), WORK(2*N+1),
-** $ LWORK-2*N, IERR )
- IF ( L2PERT ) THEN
- XSC = DSQRT(SMALL)
- DO 3969 p = 2, NR
- DO 3968 q = 1, p - 1
- TEMP1 = XSC * MIN(DABS(V(p,p)),DABS(V(q,q)))
- IF ( DABS(V(q,p)) .LE. TEMP1 )
- $ V(q,p) = DSIGN( TEMP1, V(q,p) )
- 3968 CONTINUE
- 3969 CONTINUE
- END IF
-*
- CALL DLACPY( 'A', N, NR, V, LDV, WORK(2*N+1), N )
-*
- IF ( L2PERT ) THEN
- XSC = DSQRT(SMALL)
- DO 8970 p = 2, NR
- DO 8971 q = 1, p - 1
- TEMP1 = XSC * MIN(DABS(V(p,p)),DABS(V(q,q)))
- V(p,q) = - DSIGN( TEMP1, V(q,p) )
- 8971 CONTINUE
- 8970 CONTINUE
- ELSE
- CALL DLASET( 'L',NR-1,NR-1,ZERO,ZERO,V(2,1),LDV )
- END IF
-* Now, compute R2 = L3 * Q3, the LQ factorization.
- CALL DGELQF( NR, NR, V, LDV, WORK(2*N+N*NR+1),
- $ WORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, IERR )
-* .. and estimate the condition number
- CALL DLACPY( 'L',NR,NR,V,LDV,WORK(2*N+N*NR+NR+1),NR )
- DO 4950 p = 1, NR
- TEMP1 = DNRM2( p, WORK(2*N+N*NR+NR+p), NR )
- CALL DSCAL( p, ONE/TEMP1, WORK(2*N+N*NR+NR+p), NR )
- 4950 CONTINUE
- CALL DPOCON( 'L',NR,WORK(2*N+N*NR+NR+1),NR,ONE,TEMP1,
- $ WORK(2*N+N*NR+NR+NR*NR+1),IWORK(M+2*N+1),IERR )
- CONDR2 = ONE / DSQRT(TEMP1)
-*
- IF ( CONDR2 .GE. COND_OK ) THEN
-* .. save the Householder vectors used for Q3
-* (this overwrites the copy of R2, as it will not be
-* needed in this branch, but it does not overwritte the
-* Huseholder vectors of Q2.).
- CALL DLACPY( 'U', NR, NR, V, LDV, WORK(2*N+1), N )
-* .. and the rest of the information on Q3 is in
-* WORK(2*N+N*NR+1:2*N+N*NR+N)
- END IF
-*
- END IF
-*
- IF ( L2PERT ) THEN
- XSC = DSQRT(SMALL)
- DO 4968 q = 2, NR
- TEMP1 = XSC * V(q,q)
- DO 4969 p = 1, q - 1
-* V(p,q) = - DSIGN( TEMP1, V(q,p) )
- V(p,q) = - DSIGN( TEMP1, V(p,q) )
- 4969 CONTINUE
- 4968 CONTINUE
- ELSE
- CALL DLASET( 'U', NR-1,NR-1, ZERO,ZERO, V(1,2), LDV )
- END IF
-*
-* Second preconditioning finished; continue with Jacobi SVD
-* The input matrix is lower trinagular.
-*
-* Recover the right singular vectors as solution of a well
-* conditioned triangular matrix equation.
-*
- IF ( CONDR1 .LT. COND_OK ) THEN
-*
- CALL DGESVJ( 'L','U','N',NR,NR,V,LDV,SVA,NR,U,
- $ LDU,WORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,INFO )
- SCALEM = WORK(2*N+N*NR+NR+1)
- NUMRANK = IDNINT(WORK(2*N+N*NR+NR+2))
- DO 3970 p = 1, NR
- CALL DCOPY( NR, V(1,p), 1, U(1,p), 1 )
- CALL DSCAL( NR, SVA(p), V(1,p), 1 )
- 3970 CONTINUE
-
-* .. pick the right matrix equation and solve it
-*
- IF ( NR .EQ. N ) THEN
-* :)) .. best case, R1 is inverted. The solution of this matrix
-* equation is Q2*V2 = the product of the Jacobi rotations
-* used in DGESVJ, premultiplied with the orthogonal matrix
-* from the second QR factorization.
- CALL DTRSM( 'L','U','N','N', NR,NR,ONE, A,LDA, V,LDV )
- ELSE
-* .. R1 is well conditioned, but non-square. Transpose(R2)
-* is inverted to get the product of the Jacobi rotations
-* used in DGESVJ. The Q-factor from the second QR
-* factorization is then built in explicitly.
- CALL DTRSM('L','U','T','N',NR,NR,ONE,WORK(2*N+1),
- $ N,V,LDV)
- IF ( NR .LT. N ) THEN
- CALL DLASET('A',N-NR,NR,ZERO,ZERO,V(NR+1,1),LDV)
- CALL DLASET('A',NR,N-NR,ZERO,ZERO,V(1,NR+1),LDV)
- CALL DLASET('A',N-NR,N-NR,ZERO,ONE,V(NR+1,NR+1),LDV)
- END IF
- CALL DORMQR('L','N',N,N,NR,WORK(2*N+1),N,WORK(N+1),
- $ V,LDV,WORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR)
- END IF
-*
- ELSE IF ( CONDR2 .LT. COND_OK ) THEN
-*
-* :) .. the input matrix A is very likely a relative of
-* the Kahan matrix :)
-* The matrix R2 is inverted. The solution of the matrix equation
-* is Q3^T*V3 = the product of the Jacobi rotations (appplied to
-* the lower triangular L3 from the LQ factorization of
-* R2=L3*Q3), pre-multiplied with the transposed Q3.
- CALL DGESVJ( 'L', 'U', 'N', NR, NR, V, LDV, SVA, NR, U,
- $ LDU, WORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, INFO )
- SCALEM = WORK(2*N+N*NR+NR+1)
- NUMRANK = IDNINT(WORK(2*N+N*NR+NR+2))
- DO 3870 p = 1, NR
- CALL DCOPY( NR, V(1,p), 1, U(1,p), 1 )
- CALL DSCAL( NR, SVA(p), U(1,p), 1 )
- 3870 CONTINUE
- CALL DTRSM('L','U','N','N',NR,NR,ONE,WORK(2*N+1),N,U,LDU)
-* .. apply the permutation from the second QR factorization
- DO 873 q = 1, NR
- DO 872 p = 1, NR
- WORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q)
- 872 CONTINUE
- DO 874 p = 1, NR
- U(p,q) = WORK(2*N+N*NR+NR+p)
- 874 CONTINUE
- 873 CONTINUE
- IF ( NR .LT. N ) THEN
- CALL DLASET( 'A',N-NR,NR,ZERO,ZERO,V(NR+1,1),LDV )
- CALL DLASET( 'A',NR,N-NR,ZERO,ZERO,V(1,NR+1),LDV )
- CALL DLASET( 'A',N-NR,N-NR,ZERO,ONE,V(NR+1,NR+1),LDV )
- END IF
- CALL DORMQR( 'L','N',N,N,NR,WORK(2*N+1),N,WORK(N+1),
- $ V,LDV,WORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
- ELSE
-* Last line of defense.
-* #:( This is a rather pathological case: no scaled condition
-* improvement after two pivoted QR factorizations. Other
-* possibility is that the rank revealing QR factorization
-* or the condition estimator has failed, or the COND_OK
-* is set very close to ONE (which is unnecessary). Normally,
-* this branch should never be executed, but in rare cases of
-* failure of the RRQR or condition estimator, the last line of
-* defense ensures that DGEJSV completes the task.
-* Compute the full SVD of L3 using DGESVJ with explicit
-* accumulation of Jacobi rotations.
- CALL DGESVJ( 'L', 'U', 'V', NR, NR, V, LDV, SVA, NR, U,
- $ LDU, WORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, INFO )
- SCALEM = WORK(2*N+N*NR+NR+1)
- NUMRANK = IDNINT(WORK(2*N+N*NR+NR+2))
- IF ( NR .LT. N ) THEN
- CALL DLASET( 'A',N-NR,NR,ZERO,ZERO,V(NR+1,1),LDV )
- CALL DLASET( 'A',NR,N-NR,ZERO,ZERO,V(1,NR+1),LDV )
- CALL DLASET( 'A',N-NR,N-NR,ZERO,ONE,V(NR+1,NR+1),LDV )
- END IF
- CALL DORMQR( 'L','N',N,N,NR,WORK(2*N+1),N,WORK(N+1),
- $ V,LDV,WORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
-*
- CALL DORMLQ( 'L', 'T', NR, NR, NR, WORK(2*N+1), N,
- $ WORK(2*N+N*NR+1), U, LDU, WORK(2*N+N*NR+NR+1),
- $ LWORK-2*N-N*NR-NR, IERR )
- DO 773 q = 1, NR
- DO 772 p = 1, NR
- WORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q)
- 772 CONTINUE
- DO 774 p = 1, NR
- U(p,q) = WORK(2*N+N*NR+NR+p)
- 774 CONTINUE
- 773 CONTINUE
-*
- END IF
-*
-* Permute the rows of V using the (column) permutation from the
-* first QRF. Also, scale the columns to make them unit in
-* Euclidean norm. This applies to all cases.
-*
- TEMP1 = DSQRT(DBLE(N)) * EPSLN
- DO 1972 q = 1, N
- DO 972 p = 1, N
- WORK(2*N+N*NR+NR+IWORK(p)) = V(p,q)
- 972 CONTINUE
- DO 973 p = 1, N
- V(p,q) = WORK(2*N+N*NR+NR+p)
- 973 CONTINUE
- XSC = ONE / DNRM2( N, V(1,q), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL DSCAL( N, XSC, V(1,q), 1 )
- 1972 CONTINUE
-* At this moment, V contains the right singular vectors of A.
-* Next, assemble the left singular vector matrix U (M x N).
- IF ( NR .LT. M ) THEN
- CALL DLASET( 'A', M-NR, NR, ZERO, ZERO, U(NR+1,1), LDU )
- IF ( NR .LT. N1 ) THEN
- CALL DLASET('A',NR,N1-NR,ZERO,ZERO,U(1,NR+1),LDU)
- CALL DLASET('A',M-NR,N1-NR,ZERO,ONE,U(NR+1,NR+1),LDU)
- END IF
- END IF
-*
-* The Q matrix from the first QRF is built into the left singular
-* matrix U. This applies to all cases.
-*
- CALL DORMQR( 'Left', 'No_Tr', M, N1, N, A, LDA, WORK, U,
- $ LDU, WORK(N+1), LWORK-N, IERR )
-
-* The columns of U are normalized. The cost is O(M*N) flops.
- TEMP1 = DSQRT(DBLE(M)) * EPSLN
- DO 1973 p = 1, NR
- XSC = ONE / DNRM2( M, U(1,p), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL DSCAL( M, XSC, U(1,p), 1 )
- 1973 CONTINUE
-*
-* If the initial QRF is computed with row pivoting, the left
-* singular vectors must be adjusted.
-*
- IF ( ROWPIV )
- $ CALL DLASWP( N1, U, LDU, 1, M-1, IWORK(2*N+1), -1 )
-*
- ELSE
-*
-* .. the initial matrix A has almost orthogonal columns and
-* the second QRF is not needed
-*
- CALL DLACPY( 'Upper', N, N, A, LDA, WORK(N+1), N )
- IF ( L2PERT ) THEN
- XSC = DSQRT(SMALL)
- DO 5970 p = 2, N
- TEMP1 = XSC * WORK( N + (p-1)*N + p )
- DO 5971 q = 1, p - 1
- WORK(N+(q-1)*N+p)=-DSIGN(TEMP1,WORK(N+(p-1)*N+q))
- 5971 CONTINUE
- 5970 CONTINUE
- ELSE
- CALL DLASET( 'Lower',N-1,N-1,ZERO,ZERO,WORK(N+2),N )
- END IF
-*
- CALL DGESVJ( 'Upper', 'U', 'N', N, N, WORK(N+1), N, SVA,
- $ N, U, LDU, WORK(N+N*N+1), LWORK-N-N*N, INFO )
-*
- SCALEM = WORK(N+N*N+1)
- NUMRANK = IDNINT(WORK(N+N*N+2))
- DO 6970 p = 1, N
- CALL DCOPY( N, WORK(N+(p-1)*N+1), 1, U(1,p), 1 )
- CALL DSCAL( N, SVA(p), WORK(N+(p-1)*N+1), 1 )
- 6970 CONTINUE
-*
- CALL DTRSM( 'Left', 'Upper', 'NoTrans', 'No UD', N, N,
- $ ONE, A, LDA, WORK(N+1), N )
- DO 6972 p = 1, N
- CALL DCOPY( N, WORK(N+p), N, V(IWORK(p),1), LDV )
- 6972 CONTINUE
- TEMP1 = DSQRT(DBLE(N))*EPSLN
- DO 6971 p = 1, N
- XSC = ONE / DNRM2( N, V(1,p), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL DSCAL( N, XSC, V(1,p), 1 )
- 6971 CONTINUE
-*
-* Assemble the left singular vector matrix U (M x N).
-*
- IF ( N .LT. M ) THEN
- CALL DLASET( 'A', M-N, N, ZERO, ZERO, U(N+1,1), LDU )
- IF ( N .LT. N1 ) THEN
- CALL DLASET( 'A',N, N1-N, ZERO, ZERO, U(1,N+1),LDU )
- CALL DLASET( 'A',M-N,N1-N, ZERO, ONE,U(N+1,N+1),LDU )
- END IF
- END IF
- CALL DORMQR( 'Left', 'No Tr', M, N1, N, A, LDA, WORK, U,
- $ LDU, WORK(N+1), LWORK-N, IERR )
- TEMP1 = DSQRT(DBLE(M))*EPSLN
- DO 6973 p = 1, N1
- XSC = ONE / DNRM2( M, U(1,p), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL DSCAL( M, XSC, U(1,p), 1 )
- 6973 CONTINUE
-*
- IF ( ROWPIV )
- $ CALL DLASWP( N1, U, LDU, 1, M-1, IWORK(2*N+1), -1 )
-*
- END IF
-*
-* end of the >> almost orthogonal case << in the full SVD
-*
- ELSE
-*
-* This branch deploys a preconditioned Jacobi SVD with explicitly
-* accumulated rotations. It is included as optional, mainly for
-* experimental purposes. It does perform well, and can also be used.
-* In this implementation, this branch will be automatically activated
-* if the condition number sigma_max(A) / sigma_min(A) is predicted
-* to be greater than the overflow threshold. This is because the
-* a posteriori computation of the singular vectors assumes robust
-* implementation of BLAS and some LAPACK procedures, capable of working
-* in presence of extreme values. Since that is not always the case, ...
-*
- DO 7968 p = 1, NR
- CALL DCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
- 7968 CONTINUE
-*
- IF ( L2PERT ) THEN
- XSC = DSQRT(SMALL/EPSLN)
- DO 5969 q = 1, NR
- TEMP1 = XSC*DABS( V(q,q) )
- DO 5968 p = 1, N
- IF ( ( p .GT. q ) .AND. ( DABS(V(p,q)) .LE. TEMP1 )
- $ .OR. ( p .LT. q ) )
- $ V(p,q) = DSIGN( TEMP1, V(p,q) )
- IF ( p .LT. q ) V(p,q) = - V(p,q)
- 5968 CONTINUE
- 5969 CONTINUE
- ELSE
- CALL DLASET( 'U', NR-1, NR-1, ZERO, ZERO, V(1,2), LDV )
- END IF
-
- CALL DGEQRF( N, NR, V, LDV, WORK(N+1), WORK(2*N+1),
- $ LWORK-2*N, IERR )
- CALL DLACPY( 'L', N, NR, V, LDV, WORK(2*N+1), N )
-*
- DO 7969 p = 1, NR
- CALL DCOPY( NR-p+1, V(p,p), LDV, U(p,p), 1 )
- 7969 CONTINUE
-
- IF ( L2PERT ) THEN
- XSC = DSQRT(SMALL/EPSLN)
- DO 9970 q = 2, NR
- DO 9971 p = 1, q - 1
- TEMP1 = XSC * MIN(DABS(U(p,p)),DABS(U(q,q)))
- U(p,q) = - DSIGN( TEMP1, U(q,p) )
- 9971 CONTINUE
- 9970 CONTINUE
- ELSE
- CALL DLASET('U', NR-1, NR-1, ZERO, ZERO, U(1,2), LDU )
- END IF
-
- CALL DGESVJ( 'G', 'U', 'V', NR, NR, U, LDU, SVA,
- $ N, V, LDV, WORK(2*N+N*NR+1), LWORK-2*N-N*NR, INFO )
- SCALEM = WORK(2*N+N*NR+1)
- NUMRANK = IDNINT(WORK(2*N+N*NR+2))
-
- IF ( NR .LT. N ) THEN
- CALL DLASET( 'A',N-NR,NR,ZERO,ZERO,V(NR+1,1),LDV )
- CALL DLASET( 'A',NR,N-NR,ZERO,ZERO,V(1,NR+1),LDV )
- CALL DLASET( 'A',N-NR,N-NR,ZERO,ONE,V(NR+1,NR+1),LDV )
- END IF
-
- CALL DORMQR( 'L','N',N,N,NR,WORK(2*N+1),N,WORK(N+1),
- $ V,LDV,WORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
-*
-* Permute the rows of V using the (column) permutation from the
-* first QRF. Also, scale the columns to make them unit in
-* Euclidean norm. This applies to all cases.
-*
- TEMP1 = DSQRT(DBLE(N)) * EPSLN
- DO 7972 q = 1, N
- DO 8972 p = 1, N
- WORK(2*N+N*NR+NR+IWORK(p)) = V(p,q)
- 8972 CONTINUE
- DO 8973 p = 1, N
- V(p,q) = WORK(2*N+N*NR+NR+p)
- 8973 CONTINUE
- XSC = ONE / DNRM2( N, V(1,q), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL DSCAL( N, XSC, V(1,q), 1 )
- 7972 CONTINUE
-*
-* At this moment, V contains the right singular vectors of A.
-* Next, assemble the left singular vector matrix U (M x N).
-*
- IF ( NR .LT. M ) THEN
- CALL DLASET( 'A', M-NR, NR, ZERO, ZERO, U(NR+1,1), LDU )
- IF ( NR .LT. N1 ) THEN
- CALL DLASET( 'A',NR, N1-NR, ZERO, ZERO, U(1,NR+1),LDU )
- CALL DLASET( 'A',M-NR,N1-NR, ZERO, ONE,U(NR+1,NR+1),LDU )
- END IF
- END IF
-*
- CALL DORMQR( 'Left', 'No Tr', M, N1, N, A, LDA, WORK, U,
- $ LDU, WORK(N+1), LWORK-N, IERR )
-*
- IF ( ROWPIV )
- $ CALL DLASWP( N1, U, LDU, 1, M-1, IWORK(2*N+1), -1 )
-*
-*
- END IF
- IF ( TRANSP ) THEN
-* .. swap U and V because the procedure worked on A^t
- DO 6974 p = 1, N
- CALL DSWAP( N, U(1,p), 1, V(1,p), 1 )
- 6974 CONTINUE
- END IF
-*
- END IF
-* end of the full SVD
-*
-* Undo scaling, if necessary (and possible)
-*
- IF ( USCAL2 .LE. (BIG/SVA(1))*USCAL1 ) THEN
- CALL DLASCL( 'G', 0, 0, USCAL1, USCAL2, NR, 1, SVA, N, IERR )
- USCAL1 = ONE
- USCAL2 = ONE
- END IF
-*
- IF ( NR .LT. N ) THEN
- DO 3004 p = NR+1, N
- SVA(p) = ZERO
- 3004 CONTINUE
- END IF
-*
- WORK(1) = USCAL2 * SCALEM
- WORK(2) = USCAL1
- IF ( ERREST ) WORK(3) = SCONDA
- IF ( LSVEC .AND. RSVEC ) THEN
- WORK(4) = CONDR1
- WORK(5) = CONDR2
- END IF
- IF ( L2TRAN ) THEN
- WORK(6) = ENTRA
- WORK(7) = ENTRAT
- END IF
-*
- IWORK(1) = NR
- IWORK(2) = NUMRANK
- IWORK(3) = WARNING
-*
- RETURN
-* ..
-* .. END OF DGEJSV
-* ..
- END
-*
diff --git a/lapack-netlib/dgesvx.f b/lapack-netlib/dgesvx.f
deleted file mode 100644
index f787488dca..0000000000
--- a/lapack-netlib/dgesvx.f
+++ /dev/null
@@ -1,599 +0,0 @@
-*> \brief DGESVX computes the solution to system of linear equations A * X = B for GE matrices
-*
-* =========== DOCUMENTATION ===========
-*
-* Online html documentation available at
-* http://www.netlib.org/lapack/explore-html/
-*
-*> \htmlonly
-*> Download DGESVX + dependencies
-*>
-*> [TGZ]
-*>
-*> [ZIP]
-*>
-*> [TXT]
-*> \endhtmlonly
-*
-* Definition:
-* ===========
-*
-* SUBROUTINE DGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
-* EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
-* WORK, IWORK, INFO )
-*
-* .. Scalar Arguments ..
-* CHARACTER EQUED, FACT, TRANS
-* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
-* DOUBLE PRECISION RCOND
-* ..
-* .. Array Arguments ..
-* INTEGER IPIV( * ), IWORK( * )
-* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
-* $ BERR( * ), C( * ), FERR( * ), R( * ),
-* $ WORK( * ), X( LDX, * )
-* ..
-*
-*
-*> \par Purpose:
-* =============
-*>
-*> \verbatim
-*>
-*> DGESVX uses the LU factorization to compute the solution to a real
-*> system of linear equations
-*> A * X = B,
-*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*>
-*> Error bounds on the solution and a condition estimate are also
-*> provided.
-*> \endverbatim
-*
-*> \par Description:
-* =================
-*>
-*> \verbatim
-*>
-*> The following steps are performed:
-*>
-*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
-*> the system:
-*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*> Whether or not the system will be equilibrated depends on the
-*> scaling of the matrix A, but if equilibration is used, A is
-*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-*> or diag(C)*B (if TRANS = 'T' or 'C').
-*>
-*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-*> matrix A (after equilibration if FACT = 'E') as
-*> A = P * L * U,
-*> where P is a permutation matrix, L is a unit lower triangular
-*> matrix, and U is upper triangular.
-*>
-*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-*> returns with INFO = i. Otherwise, the factored form of A is used
-*> to estimate the condition number of the matrix A. If the
-*> reciprocal of the condition number is less than machine precision,
-*> INFO = N+1 is returned as a warning, but the routine still goes on
-*> to solve for X and compute error bounds as described below.
-*>
-*> 4. The system of equations is solved for X using the factored form
-*> of A.
-*>
-*> 5. Iterative refinement is applied to improve the computed solution
-*> matrix and calculate error bounds and backward error estimates
-*> for it.
-*>
-*> 6. If equilibration was used, the matrix X is premultiplied by
-*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-*> that it solves the original system before equilibration.
-*> \endverbatim
-*
-* Arguments:
-* ==========
-*
-*> \param[in] FACT
-*> \verbatim
-*> FACT is CHARACTER*1
-*> Specifies whether or not the factored form of the matrix A is
-*> supplied on entry, and if not, whether the matrix A should be
-*> equilibrated before it is factored.
-*> = 'F': On entry, AF and IPIV contain the factored form of A.
-*> If EQUED is not 'N', the matrix A has been
-*> equilibrated with scaling factors given by R and C.
-*> A, AF, and IPIV are not modified.
-*> = 'N': The matrix A will be copied to AF and factored.
-*> = 'E': The matrix A will be equilibrated if necessary, then
-*> copied to AF and factored.
-*> \endverbatim
-*>
-*> \param[in] TRANS
-*> \verbatim
-*> TRANS is CHARACTER*1
-*> Specifies the form of the system of equations:
-*> = 'N': A * X = B (No transpose)
-*> = 'T': A**T * X = B (Transpose)
-*> = 'C': A**H * X = B (Transpose)
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*> N is INTEGER
-*> The number of linear equations, i.e., the order of the
-*> matrix A. N >= 0.
-*> \endverbatim
-*>
-*> \param[in] NRHS
-*> \verbatim
-*> NRHS is INTEGER
-*> The number of right hand sides, i.e., the number of columns
-*> of the matrices B and X. NRHS >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] A
-*> \verbatim
-*> A is DOUBLE PRECISION array, dimension (LDA,N)
-*> On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
-*> not 'N', then A must have been equilibrated by the scaling
-*> factors in R and/or C. A is not modified if FACT = 'F' or
-*> 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*>
-*> On exit, if EQUED .ne. 'N', A is scaled as follows:
-*> EQUED = 'R': A := diag(R) * A
-*> EQUED = 'C': A := A * diag(C)
-*> EQUED = 'B': A := diag(R) * A * diag(C).
-*> \endverbatim
-*>
-*> \param[in] LDA
-*> \verbatim
-*> LDA is INTEGER
-*> The leading dimension of the array A. LDA >= max(1,N).
-*> \endverbatim
-*>
-*> \param[in,out] AF
-*> \verbatim
-*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
-*> If FACT = 'F', then AF is an input argument and on entry
-*> contains the factors L and U from the factorization
-*> A = P*L*U as computed by DGETRF. If EQUED .ne. 'N', then
-*> AF is the factored form of the equilibrated matrix A.
-*>
-*> If FACT = 'N', then AF is an output argument and on exit
-*> returns the factors L and U from the factorization A = P*L*U
-*> of the original matrix A.
-*>
-*> If FACT = 'E', then AF is an output argument and on exit
-*> returns the factors L and U from the factorization A = P*L*U
-*> of the equilibrated matrix A (see the description of A for
-*> the form of the equilibrated matrix).
-*> \endverbatim
-*>
-*> \param[in] LDAF
-*> \verbatim
-*> LDAF is INTEGER
-*> The leading dimension of the array AF. LDAF >= max(1,N).
-*> \endverbatim
-*>
-*> \param[in,out] IPIV
-*> \verbatim
-*> IPIV is INTEGER array, dimension (N)
-*> If FACT = 'F', then IPIV is an input argument and on entry
-*> contains the pivot indices from the factorization A = P*L*U
-*> as computed by DGETRF; row i of the matrix was interchanged
-*> with row IPIV(i).
-*>
-*> If FACT = 'N', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = P*L*U
-*> of the original matrix A.
-*>
-*> If FACT = 'E', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = P*L*U
-*> of the equilibrated matrix A.
-*> \endverbatim
-*>
-*> \param[in,out] EQUED
-*> \verbatim
-*> EQUED is CHARACTER*1
-*> Specifies the form of equilibration that was done.
-*> = 'N': No equilibration (always true if FACT = 'N').
-*> = 'R': Row equilibration, i.e., A has been premultiplied by
-*> diag(R).
-*> = 'C': Column equilibration, i.e., A has been postmultiplied
-*> by diag(C).
-*> = 'B': Both row and column equilibration, i.e., A has been
-*> replaced by diag(R) * A * diag(C).
-*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
-*> output argument.
-*> \endverbatim
-*>
-*> \param[in,out] R
-*> \verbatim
-*> R is DOUBLE PRECISION array, dimension (N)
-*> The row scale factors for A. If EQUED = 'R' or 'B', A is
-*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-*> is not accessed. R is an input argument if FACT = 'F';
-*> otherwise, R is an output argument. If FACT = 'F' and
-*> EQUED = 'R' or 'B', each element of R must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] C
-*> \verbatim
-*> C is DOUBLE PRECISION array, dimension (N)
-*> The column scale factors for A. If EQUED = 'C' or 'B', A is
-*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-*> is not accessed. C is an input argument if FACT = 'F';
-*> otherwise, C is an output argument. If FACT = 'F' and
-*> EQUED = 'C' or 'B', each element of C must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] B
-*> \verbatim
-*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
-*> On entry, the N-by-NRHS right hand side matrix B.
-*> On exit,
-*> if EQUED = 'N', B is not modified;
-*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-*> diag(R)*B;
-*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-*> overwritten by diag(C)*B.
-*> \endverbatim
-*>
-*> \param[in] LDB
-*> \verbatim
-*> LDB is INTEGER
-*> The leading dimension of the array B. LDB >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] X
-*> \verbatim
-*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
-*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-*> to the original system of equations. Note that A and B are
-*> modified on exit if EQUED .ne. 'N', and the solution to the
-*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-*> and EQUED = 'R' or 'B'.
-*> \endverbatim
-*>
-*> \param[in] LDX
-*> \verbatim
-*> LDX is INTEGER
-*> The leading dimension of the array X. LDX >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] RCOND
-*> \verbatim
-*> RCOND is DOUBLE PRECISION
-*> The estimate of the reciprocal condition number of the matrix
-*> A after equilibration (if done). If RCOND is less than the
-*> machine precision (in particular, if RCOND = 0), the matrix
-*> is singular to working precision. This condition is
-*> indicated by a return code of INFO > 0.
-*> \endverbatim
-*>
-*> \param[out] FERR
-*> \verbatim
-*> FERR is DOUBLE PRECISION array, dimension (NRHS)
-*> The estimated forward error bound for each solution vector
-*> X(j) (the j-th column of the solution matrix X).
-*> If XTRUE is the true solution corresponding to X(j), FERR(j)
-*> is an estimated upper bound for the magnitude of the largest
-*> element in (X(j) - XTRUE) divided by the magnitude of the
-*> largest element in X(j). The estimate is as reliable as
-*> the estimate for RCOND, and is almost always a slight
-*> overestimate of the true error.
-*> \endverbatim
-*>
-*> \param[out] BERR
-*> \verbatim
-*> BERR is DOUBLE PRECISION array, dimension (NRHS)
-*> The componentwise relative backward error of each solution
-*> vector X(j) (i.e., the smallest relative change in
-*> any element of A or B that makes X(j) an exact solution).
-*> \endverbatim
-*>
-*> \param[out] WORK
-*> \verbatim
-*> WORK is DOUBLE PRECISION array, dimension (MAX(1,4*N))
-*> On exit, WORK(1) contains the reciprocal pivot growth
-*> factor norm(A)/norm(U). The "max absolute element" norm is
-*> used. If WORK(1) is much less than 1, then the stability
-*> of the LU factorization of the (equilibrated) matrix A
-*> could be poor. This also means that the solution X, condition
-*> estimator RCOND, and forward error bound FERR could be
-*> unreliable. If factorization fails with 0 WORK(1) contains the reciprocal pivot growth factor for the
-*> leading INFO columns of A.
-*> \endverbatim
-*>
-*> \param[out] IWORK
-*> \verbatim
-*> IWORK is INTEGER array, dimension (N)
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*> INFO is INTEGER
-*> = 0: successful exit
-*> < 0: if INFO = -i, the i-th argument had an illegal value
-*> > 0: if INFO = i, and i is
-*> <= N: U(i,i) is exactly zero. The factorization has
-*> been completed, but the factor U is exactly
-*> singular, so the solution and error bounds
-*> could not be computed. RCOND = 0 is returned.
-*> = N+1: U is nonsingular, but RCOND is less than machine
-*> precision, meaning that the matrix is singular
-*> to working precision. Nevertheless, the
-*> solution and error bounds are computed because
-*> there are a number of situations where the
-*> computed solution can be more accurate than the
-*> value of RCOND would suggest.
-*> \endverbatim
-*
-* Authors:
-* ========
-*
-*> \author Univ. of Tennessee
-*> \author Univ. of California Berkeley
-*> \author Univ. of Colorado Denver
-*> \author NAG Ltd.
-*
-*> \ingroup doubleGEsolve
-*
-* =====================================================================
- SUBROUTINE DGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
- $ EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
- $ WORK, IWORK, INFO )
-*
-* -- LAPACK driver routine --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER EQUED, FACT, TRANS
- INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
- DOUBLE PRECISION RCOND
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * ), IWORK( * )
- DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
- $ BERR( * ), C( * ), FERR( * ), R( * ),
- $ WORK( * ), X( LDX, * )
-* ..
-*
-* =====================================================================
-*
-* .. Parameters ..
- DOUBLE PRECISION ZERO, ONE
- PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 )
-* ..
-* .. Local Scalars ..
- LOGICAL COLEQU, EQUIL, NOFACT, NOTRAN, ROWEQU
- CHARACTER NORM
- INTEGER I, INFEQU, J
- DOUBLE PRECISION AMAX, ANORM, BIGNUM, COLCND, RCMAX, RCMIN,
- $ ROWCND, RPVGRW, SMLNUM
-* ..
-* .. External Functions ..
- LOGICAL LSAME
- DOUBLE PRECISION DLAMCH, DLANGE, DLANTR
- EXTERNAL LSAME, DLAMCH, DLANGE, DLANTR
-* ..
-* .. External Subroutines ..
- EXTERNAL DGECON, DGEEQU, DGERFS, DGETRF, DGETRS, DLACPY,
- $ DLAQGE, XERBLA
-* ..
-* .. Intrinsic Functions ..
- INTRINSIC MAX, MIN
-* ..
-* .. Executable Statements ..
-*
- INFO = 0
- NOFACT = LSAME( FACT, 'N' )
- EQUIL = LSAME( FACT, 'E' )
- NOTRAN = LSAME( TRANS, 'N' )
- IF( NOFACT .OR. EQUIL ) THEN
- EQUED = 'N'
- ROWEQU = .FALSE.
- COLEQU = .FALSE.
- ELSE
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- SMLNUM = DLAMCH( 'Safe minimum' )
- BIGNUM = ONE / SMLNUM
- END IF
-*
-* Test the input parameters.
-*
- IF( .NOT.NOFACT .AND. .NOT.EQUIL .AND. .NOT.LSAME( FACT, 'F' ) )
- $ THEN
- INFO = -1
- ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
- $ LSAME( TRANS, 'C' ) ) THEN
- INFO = -2
- ELSE IF( N.LT.0 ) THEN
- INFO = -3
- ELSE IF( NRHS.LT.0 ) THEN
- INFO = -4
- ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
- INFO = -6
- ELSE IF( LDAF.LT.MAX( 1, N ) ) THEN
- INFO = -8
- ELSE IF( LSAME( FACT, 'F' ) .AND. .NOT.
- $ ( ROWEQU .OR. COLEQU .OR. LSAME( EQUED, 'N' ) ) ) THEN
- INFO = -10
- ELSE
- IF( ROWEQU ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 10 J = 1, N
- RCMIN = MIN( RCMIN, R( J ) )
- RCMAX = MAX( RCMAX, R( J ) )
- 10 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -11
- ELSE IF( N.GT.0 ) THEN
- ROWCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- ROWCND = ONE
- END IF
- END IF
- IF( COLEQU .AND. INFO.EQ.0 ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 20 J = 1, N
- RCMIN = MIN( RCMIN, C( J ) )
- RCMAX = MAX( RCMAX, C( J ) )
- 20 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -12
- ELSE IF( N.GT.0 ) THEN
- COLCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- COLCND = ONE
- END IF
- END IF
- IF( INFO.EQ.0 ) THEN
- IF( LDB.LT.MAX( 1, N ) ) THEN
- INFO = -14
- ELSE IF( LDX.LT.MAX( 1, N ) ) THEN
- INFO = -16
- END IF
- END IF
- END IF
-*
- IF( INFO.NE.0 ) THEN
- CALL XERBLA( 'DGESVX', -INFO )
- RETURN
- END IF
-*
- IF( EQUIL ) THEN
-*
-* Compute row and column scalings to equilibrate the matrix A.
-*
- CALL DGEEQU( N, N, A, LDA, R, C, ROWCND, COLCND, AMAX, INFEQU )
- IF( INFEQU.EQ.0 ) THEN
-*
-* Equilibrate the matrix.
-*
- CALL DLAQGE( N, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
- $ EQUED )
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- END IF
- END IF
-*
-* Scale the right hand side.
-*
- IF( NOTRAN ) THEN
- IF( ROWEQU ) THEN
- DO 40 J = 1, NRHS
- DO 30 I = 1, N
- B( I, J ) = R( I )*B( I, J )
- 30 CONTINUE
- 40 CONTINUE
- END IF
- ELSE IF( COLEQU ) THEN
- DO 60 J = 1, NRHS
- DO 50 I = 1, N
- B( I, J ) = C( I )*B( I, J )
- 50 CONTINUE
- 60 CONTINUE
- END IF
-*
- IF( NOFACT .OR. EQUIL ) THEN
-*
-* Compute the LU factorization of A.
-*
- CALL DLACPY( 'Full', N, N, A, LDA, AF, LDAF )
- CALL DGETRF( N, N, AF, LDAF, IPIV, INFO )
-*
-* Return if INFO is non-zero.
-*
- IF( INFO.GT.0 ) THEN
-*
-* Compute the reciprocal pivot growth factor of the
-* leading rank-deficient INFO columns of A.
-*
- RPVGRW = DLANTR( 'M', 'U', 'N', INFO, INFO, AF, LDAF,
- $ WORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = DLANGE( 'M', N, INFO, A, LDA, WORK ) / RPVGRW
- END IF
- WORK( 1 ) = RPVGRW
- RCOND = ZERO
- RETURN
- END IF
- END IF
-*
-* Compute the norm of the matrix A and the
-* reciprocal pivot growth factor RPVGRW.
-*
- IF( NOTRAN ) THEN
- NORM = '1'
- ELSE
- NORM = 'I'
- END IF
- ANORM = DLANGE( NORM, N, N, A, LDA, WORK )
- RPVGRW = DLANTR( 'M', 'U', 'N', N, N, AF, LDAF, WORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = DLANGE( 'M', N, N, A, LDA, WORK ) / RPVGRW
- END IF
-*
-* Compute the reciprocal of the condition number of A.
-*
- CALL DGECON( NORM, N, AF, LDAF, ANORM, RCOND, WORK, IWORK, INFO )
-*
-* Compute the solution matrix X.
-*
- CALL DLACPY( 'Full', N, NRHS, B, LDB, X, LDX )
- CALL DGETRS( TRANS, N, NRHS, AF, LDAF, IPIV, X, LDX, INFO )
-*
-* Use iterative refinement to improve the computed solution and
-* compute error bounds and backward error estimates for it.
-*
- CALL DGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, X,
- $ LDX, FERR, BERR, WORK, IWORK, INFO )
-*
-* Transform the solution matrix X to a solution of the original
-* system.
-*
- IF( NOTRAN ) THEN
- IF( COLEQU ) THEN
- DO 80 J = 1, NRHS
- DO 70 I = 1, N
- X( I, J ) = C( I )*X( I, J )
- 70 CONTINUE
- 80 CONTINUE
- DO 90 J = 1, NRHS
- FERR( J ) = FERR( J ) / COLCND
- 90 CONTINUE
- END IF
- ELSE IF( ROWEQU ) THEN
- DO 110 J = 1, NRHS
- DO 100 I = 1, N
- X( I, J ) = R( I )*X( I, J )
- 100 CONTINUE
- 110 CONTINUE
- DO 120 J = 1, NRHS
- FERR( J ) = FERR( J ) / ROWCND
- 120 CONTINUE
- END IF
-*
- WORK( 1 ) = RPVGRW
-*
-* Set INFO = N+1 if the matrix is singular to working precision.
-*
- IF( RCOND.LT.DLAMCH( 'Epsilon' ) )
- $ INFO = N + 1
- RETURN
-*
-* End of DGESVX
-*
- END
diff --git a/lapack-netlib/sgbsvx.f b/lapack-netlib/sgbsvx.f
deleted file mode 100644
index df3a721d93..0000000000
--- a/lapack-netlib/sgbsvx.f
+++ /dev/null
@@ -1,641 +0,0 @@
-*> \brief SGBSVX computes the solution to system of linear equations A * X = B for GB matrices
-*
-* =========== DOCUMENTATION ===========
-*
-* Online html documentation available at
-* http://www.netlib.org/lapack/explore-html/
-*
-*> \htmlonly
-*> Download SGBSVX + dependencies
-*>
-*> [TGZ]
-*>
-*> [ZIP]
-*>
-*> [TXT]
-*> \endhtmlonly
-*
-* Definition:
-* ===========
-*
-* SUBROUTINE SGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
-* LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
-* RCOND, FERR, BERR, WORK, IWORK, INFO )
-*
-* .. Scalar Arguments ..
-* CHARACTER EQUED, FACT, TRANS
-* INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
-* REAL RCOND
-* ..
-* .. Array Arguments ..
-* INTEGER IPIV( * ), IWORK( * )
-* REAL AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
-* $ BERR( * ), C( * ), FERR( * ), R( * ),
-* $ WORK( * ), X( LDX, * )
-* ..
-*
-*
-*> \par Purpose:
-* =============
-*>
-*> \verbatim
-*>
-*> SGBSVX uses the LU factorization to compute the solution to a real
-*> system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
-*> where A is a band matrix of order N with KL subdiagonals and KU
-*> superdiagonals, and X and B are N-by-NRHS matrices.
-*>
-*> Error bounds on the solution and a condition estimate are also
-*> provided.
-*> \endverbatim
-*
-*> \par Description:
-* =================
-*>
-*> \verbatim
-*>
-*> The following steps are performed by this subroutine:
-*>
-*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
-*> the system:
-*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*> Whether or not the system will be equilibrated depends on the
-*> scaling of the matrix A, but if equilibration is used, A is
-*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-*> or diag(C)*B (if TRANS = 'T' or 'C').
-*>
-*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-*> matrix A (after equilibration if FACT = 'E') as
-*> A = L * U,
-*> where L is a product of permutation and unit lower triangular
-*> matrices with KL subdiagonals, and U is upper triangular with
-*> KL+KU superdiagonals.
-*>
-*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-*> returns with INFO = i. Otherwise, the factored form of A is used
-*> to estimate the condition number of the matrix A. If the
-*> reciprocal of the condition number is less than machine precision,
-*> INFO = N+1 is returned as a warning, but the routine still goes on
-*> to solve for X and compute error bounds as described below.
-*>
-*> 4. The system of equations is solved for X using the factored form
-*> of A.
-*>
-*> 5. Iterative refinement is applied to improve the computed solution
-*> matrix and calculate error bounds and backward error estimates
-*> for it.
-*>
-*> 6. If equilibration was used, the matrix X is premultiplied by
-*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-*> that it solves the original system before equilibration.
-*> \endverbatim
-*
-* Arguments:
-* ==========
-*
-*> \param[in] FACT
-*> \verbatim
-*> FACT is CHARACTER*1
-*> Specifies whether or not the factored form of the matrix A is
-*> supplied on entry, and if not, whether the matrix A should be
-*> equilibrated before it is factored.
-*> = 'F': On entry, AFB and IPIV contain the factored form of
-*> A. If EQUED is not 'N', the matrix A has been
-*> equilibrated with scaling factors given by R and C.
-*> AB, AFB, and IPIV are not modified.
-*> = 'N': The matrix A will be copied to AFB and factored.
-*> = 'E': The matrix A will be equilibrated if necessary, then
-*> copied to AFB and factored.
-*> \endverbatim
-*>
-*> \param[in] TRANS
-*> \verbatim
-*> TRANS is CHARACTER*1
-*> Specifies the form of the system of equations.
-*> = 'N': A * X = B (No transpose)
-*> = 'T': A**T * X = B (Transpose)
-*> = 'C': A**H * X = B (Transpose)
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*> N is INTEGER
-*> The number of linear equations, i.e., the order of the
-*> matrix A. N >= 0.
-*> \endverbatim
-*>
-*> \param[in] KL
-*> \verbatim
-*> KL is INTEGER
-*> The number of subdiagonals within the band of A. KL >= 0.
-*> \endverbatim
-*>
-*> \param[in] KU
-*> \verbatim
-*> KU is INTEGER
-*> The number of superdiagonals within the band of A. KU >= 0.
-*> \endverbatim
-*>
-*> \param[in] NRHS
-*> \verbatim
-*> NRHS is INTEGER
-*> The number of right hand sides, i.e., the number of columns
-*> of the matrices B and X. NRHS >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] AB
-*> \verbatim
-*> AB is REAL array, dimension (LDAB,N)
-*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-*> The j-th column of A is stored in the j-th column of the
-*> array AB as follows:
-*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*>
-*> If FACT = 'F' and EQUED is not 'N', then A must have been
-*> equilibrated by the scaling factors in R and/or C. AB is not
-*> modified if FACT = 'F' or 'N', or if FACT = 'E' and
-*> EQUED = 'N' on exit.
-*>
-*> On exit, if EQUED .ne. 'N', A is scaled as follows:
-*> EQUED = 'R': A := diag(R) * A
-*> EQUED = 'C': A := A * diag(C)
-*> EQUED = 'B': A := diag(R) * A * diag(C).
-*> \endverbatim
-*>
-*> \param[in] LDAB
-*> \verbatim
-*> LDAB is INTEGER
-*> The leading dimension of the array AB. LDAB >= KL+KU+1.
-*> \endverbatim
-*>
-*> \param[in,out] AFB
-*> \verbatim
-*> AFB is REAL array, dimension (LDAFB,N)
-*> If FACT = 'F', then AFB is an input argument and on entry
-*> contains details of the LU factorization of the band matrix
-*> A, as computed by SGBTRF. U is stored as an upper triangular
-*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-*> and the multipliers used during the factorization are stored
-*> in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
-*> the factored form of the equilibrated matrix A.
-*>
-*> If FACT = 'N', then AFB is an output argument and on exit
-*> returns details of the LU factorization of A.
-*>
-*> If FACT = 'E', then AFB is an output argument and on exit
-*> returns details of the LU factorization of the equilibrated
-*> matrix A (see the description of AB for the form of the
-*> equilibrated matrix).
-*> \endverbatim
-*>
-*> \param[in] LDAFB
-*> \verbatim
-*> LDAFB is INTEGER
-*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*> \endverbatim
-*>
-*> \param[in,out] IPIV
-*> \verbatim
-*> IPIV is INTEGER array, dimension (N)
-*> If FACT = 'F', then IPIV is an input argument and on entry
-*> contains the pivot indices from the factorization A = L*U
-*> as computed by SGBTRF; row i of the matrix was interchanged
-*> with row IPIV(i).
-*>
-*> If FACT = 'N', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = L*U
-*> of the original matrix A.
-*>
-*> If FACT = 'E', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = L*U
-*> of the equilibrated matrix A.
-*> \endverbatim
-*>
-*> \param[in,out] EQUED
-*> \verbatim
-*> EQUED is CHARACTER*1
-*> Specifies the form of equilibration that was done.
-*> = 'N': No equilibration (always true if FACT = 'N').
-*> = 'R': Row equilibration, i.e., A has been premultiplied by
-*> diag(R).
-*> = 'C': Column equilibration, i.e., A has been postmultiplied
-*> by diag(C).
-*> = 'B': Both row and column equilibration, i.e., A has been
-*> replaced by diag(R) * A * diag(C).
-*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
-*> output argument.
-*> \endverbatim
-*>
-*> \param[in,out] R
-*> \verbatim
-*> R is REAL array, dimension (N)
-*> The row scale factors for A. If EQUED = 'R' or 'B', A is
-*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-*> is not accessed. R is an input argument if FACT = 'F';
-*> otherwise, R is an output argument. If FACT = 'F' and
-*> EQUED = 'R' or 'B', each element of R must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] C
-*> \verbatim
-*> C is REAL array, dimension (N)
-*> The column scale factors for A. If EQUED = 'C' or 'B', A is
-*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-*> is not accessed. C is an input argument if FACT = 'F';
-*> otherwise, C is an output argument. If FACT = 'F' and
-*> EQUED = 'C' or 'B', each element of C must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] B
-*> \verbatim
-*> B is REAL array, dimension (LDB,NRHS)
-*> On entry, the right hand side matrix B.
-*> On exit,
-*> if EQUED = 'N', B is not modified;
-*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-*> diag(R)*B;
-*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-*> overwritten by diag(C)*B.
-*> \endverbatim
-*>
-*> \param[in] LDB
-*> \verbatim
-*> LDB is INTEGER
-*> The leading dimension of the array B. LDB >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] X
-*> \verbatim
-*> X is REAL array, dimension (LDX,NRHS)
-*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-*> to the original system of equations. Note that A and B are
-*> modified on exit if EQUED .ne. 'N', and the solution to the
-*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-*> and EQUED = 'R' or 'B'.
-*> \endverbatim
-*>
-*> \param[in] LDX
-*> \verbatim
-*> LDX is INTEGER
-*> The leading dimension of the array X. LDX >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] RCOND
-*> \verbatim
-*> RCOND is REAL
-*> The estimate of the reciprocal condition number of the matrix
-*> A after equilibration (if done). If RCOND is less than the
-*> machine precision (in particular, if RCOND = 0), the matrix
-*> is singular to working precision. This condition is
-*> indicated by a return code of INFO > 0.
-*> \endverbatim
-*>
-*> \param[out] FERR
-*> \verbatim
-*> FERR is REAL array, dimension (NRHS)
-*> The estimated forward error bound for each solution vector
-*> X(j) (the j-th column of the solution matrix X).
-*> If XTRUE is the true solution corresponding to X(j), FERR(j)
-*> is an estimated upper bound for the magnitude of the largest
-*> element in (X(j) - XTRUE) divided by the magnitude of the
-*> largest element in X(j). The estimate is as reliable as
-*> the estimate for RCOND, and is almost always a slight
-*> overestimate of the true error.
-*> \endverbatim
-*>
-*> \param[out] BERR
-*> \verbatim
-*> BERR is REAL array, dimension (NRHS)
-*> The componentwise relative backward error of each solution
-*> vector X(j) (i.e., the smallest relative change in
-*> any element of A or B that makes X(j) an exact solution).
-*> \endverbatim
-*>
-*> \param[out] WORK
-*> \verbatim
-*> WORK is REAL array, dimension (MAX(1,3*N))
-*> On exit, WORK(1) contains the reciprocal pivot growth
-*> factor norm(A)/norm(U). The "max absolute element" norm is
-*> used. If WORK(1) is much less than 1, then the stability
-*> of the LU factorization of the (equilibrated) matrix A
-*> could be poor. This also means that the solution X, condition
-*> estimator RCOND, and forward error bound FERR could be
-*> unreliable. If factorization fails with 0 WORK(1) contains the reciprocal pivot growth factor for the
-*> leading INFO columns of A.
-*> \endverbatim
-*>
-*> \param[out] IWORK
-*> \verbatim
-*> IWORK is INTEGER array, dimension (N)
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*> INFO is INTEGER
-*> = 0: successful exit
-*> < 0: if INFO = -i, the i-th argument had an illegal value
-*> > 0: if INFO = i, and i is
-*> <= N: U(i,i) is exactly zero. The factorization
-*> has been completed, but the factor U is exactly
-*> singular, so the solution and error bounds
-*> could not be computed. RCOND = 0 is returned.
-*> = N+1: U is nonsingular, but RCOND is less than machine
-*> precision, meaning that the matrix is singular
-*> to working precision. Nevertheless, the
-*> solution and error bounds are computed because
-*> there are a number of situations where the
-*> computed solution can be more accurate than the
-*> \endverbatim
-*
-* Authors:
-* ========
-*
-*> \author Univ. of Tennessee
-*> \author Univ. of California Berkeley
-*> \author Univ. of Colorado Denver
-*> \author NAG Ltd.
-*
-*> \ingroup realGBsolve
-*
-* =====================================================================
- SUBROUTINE SGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
- $ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
- $ RCOND, FERR, BERR, WORK, IWORK, INFO )
-*
-* -- LAPACK driver routine --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER EQUED, FACT, TRANS
- INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
- REAL RCOND
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * ), IWORK( * )
- REAL AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
- $ BERR( * ), C( * ), FERR( * ), R( * ),
- $ WORK( * ), X( LDX, * )
-* ..
-*
-* =====================================================================
-* Moved setting of INFO = N+1 so INFO does not subsequently get
-* overwritten. Sven, 17 Mar 05.
-* =====================================================================
-*
-* .. Parameters ..
- REAL ZERO, ONE
- PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 )
-* ..
-* .. Local Scalars ..
- LOGICAL COLEQU, EQUIL, NOFACT, NOTRAN, ROWEQU
- CHARACTER NORM
- INTEGER I, INFEQU, J, J1, J2
- REAL AMAX, ANORM, BIGNUM, COLCND, RCMAX, RCMIN,
- $ ROWCND, RPVGRW, SMLNUM
-* ..
-* .. External Functions ..
- LOGICAL LSAME
- REAL SLAMCH, SLANGB, SLANTB
- EXTERNAL LSAME, SLAMCH, SLANGB, SLANTB
-* ..
-* .. External Subroutines ..
- EXTERNAL SCOPY, SGBCON, SGBEQU, SGBRFS, SGBTRF, SGBTRS,
- $ SLACPY, SLAQGB, XERBLA
-* ..
-* .. Intrinsic Functions ..
- INTRINSIC ABS, MAX, MIN
-* ..
-* .. Executable Statements ..
-*
- INFO = 0
- NOFACT = LSAME( FACT, 'N' )
- EQUIL = LSAME( FACT, 'E' )
- NOTRAN = LSAME( TRANS, 'N' )
- IF( NOFACT .OR. EQUIL ) THEN
- EQUED = 'N'
- ROWEQU = .FALSE.
- COLEQU = .FALSE.
- ELSE
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- SMLNUM = SLAMCH( 'Safe minimum' )
- BIGNUM = ONE / SMLNUM
- END IF
-*
-* Test the input parameters.
-*
- IF( .NOT.NOFACT .AND. .NOT.EQUIL .AND. .NOT.LSAME( FACT, 'F' ) )
- $ THEN
- INFO = -1
- ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
- $ LSAME( TRANS, 'C' ) ) THEN
- INFO = -2
- ELSE IF( N.LT.0 ) THEN
- INFO = -3
- ELSE IF( KL.LT.0 ) THEN
- INFO = -4
- ELSE IF( KU.LT.0 ) THEN
- INFO = -5
- ELSE IF( NRHS.LT.0 ) THEN
- INFO = -6
- ELSE IF( LDAB.LT.KL+KU+1 ) THEN
- INFO = -8
- ELSE IF( LDAFB.LT.2*KL+KU+1 ) THEN
- INFO = -10
- ELSE IF( LSAME( FACT, 'F' ) .AND. .NOT.
- $ ( ROWEQU .OR. COLEQU .OR. LSAME( EQUED, 'N' ) ) ) THEN
- INFO = -12
- ELSE
- IF( ROWEQU ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 10 J = 1, N
- RCMIN = MIN( RCMIN, R( J ) )
- RCMAX = MAX( RCMAX, R( J ) )
- 10 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -13
- ELSE IF( N.GT.0 ) THEN
- ROWCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- ROWCND = ONE
- END IF
- END IF
- IF( COLEQU .AND. INFO.EQ.0 ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 20 J = 1, N
- RCMIN = MIN( RCMIN, C( J ) )
- RCMAX = MAX( RCMAX, C( J ) )
- 20 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -14
- ELSE IF( N.GT.0 ) THEN
- COLCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- COLCND = ONE
- END IF
- END IF
- IF( INFO.EQ.0 ) THEN
- IF( LDB.LT.MAX( 1, N ) ) THEN
- INFO = -16
- ELSE IF( LDX.LT.MAX( 1, N ) ) THEN
- INFO = -18
- END IF
- END IF
- END IF
-*
- IF( INFO.NE.0 ) THEN
- CALL XERBLA( 'SGBSVX', -INFO )
- RETURN
- END IF
-*
- IF( EQUIL ) THEN
-*
-* Compute row and column scalings to equilibrate the matrix A.
-*
- CALL SGBEQU( N, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
- $ AMAX, INFEQU )
- IF( INFEQU.EQ.0 ) THEN
-*
-* Equilibrate the matrix.
-*
- CALL SLAQGB( N, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
- $ AMAX, EQUED )
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- END IF
- END IF
-*
-* Scale the right hand side.
-*
- IF( NOTRAN ) THEN
- IF( ROWEQU ) THEN
- DO 40 J = 1, NRHS
- DO 30 I = 1, N
- B( I, J ) = R( I )*B( I, J )
- 30 CONTINUE
- 40 CONTINUE
- END IF
- ELSE IF( COLEQU ) THEN
- DO 60 J = 1, NRHS
- DO 50 I = 1, N
- B( I, J ) = C( I )*B( I, J )
- 50 CONTINUE
- 60 CONTINUE
- END IF
-*
- IF( NOFACT .OR. EQUIL ) THEN
-*
-* Compute the LU factorization of the band matrix A.
-*
- DO 70 J = 1, N
- J1 = MAX( J-KU, 1 )
- J2 = MIN( J+KL, N )
- CALL SCOPY( J2-J1+1, AB( KU+1-J+J1, J ), 1,
- $ AFB( KL+KU+1-J+J1, J ), 1 )
- 70 CONTINUE
-*
- CALL SGBTRF( N, N, KL, KU, AFB, LDAFB, IPIV, INFO )
-*
-* Return if INFO is non-zero.
-*
- IF( INFO.GT.0 ) THEN
-*
-* Compute the reciprocal pivot growth factor of the
-* leading rank-deficient INFO columns of A.
-*
- ANORM = ZERO
- DO 90 J = 1, INFO
- DO 80 I = MAX( KU+2-J, 1 ), MIN( N+KU+1-J, KL+KU+1 )
- ANORM = MAX( ANORM, ABS( AB( I, J ) ) )
- 80 CONTINUE
- 90 CONTINUE
- RPVGRW = SLANTB( 'M', 'U', 'N', INFO, MIN( INFO-1, KL+KU ),
- $ AFB( MAX( 1, KL+KU+2-INFO ), 1 ), LDAFB,
- $ WORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = ANORM / RPVGRW
- END IF
- WORK( 1 ) = RPVGRW
- RCOND = ZERO
- RETURN
- END IF
- END IF
-*
-* Compute the norm of the matrix A and the
-* reciprocal pivot growth factor RPVGRW.
-*
- IF( NOTRAN ) THEN
- NORM = '1'
- ELSE
- NORM = 'I'
- END IF
- ANORM = SLANGB( NORM, N, KL, KU, AB, LDAB, WORK )
- RPVGRW = SLANTB( 'M', 'U', 'N', N, KL+KU, AFB, LDAFB, WORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = SLANGB( 'M', N, KL, KU, AB, LDAB, WORK ) / RPVGRW
- END IF
-*
-* Compute the reciprocal of the condition number of A.
-*
- CALL SGBCON( NORM, N, KL, KU, AFB, LDAFB, IPIV, ANORM, RCOND,
- $ WORK, IWORK, INFO )
-*
-* Compute the solution matrix X.
-*
- CALL SLACPY( 'Full', N, NRHS, B, LDB, X, LDX )
- CALL SGBTRS( TRANS, N, KL, KU, NRHS, AFB, LDAFB, IPIV, X, LDX,
- $ INFO )
-*
-* Use iterative refinement to improve the computed solution and
-* compute error bounds and backward error estimates for it.
-*
- CALL SGBRFS( TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB, IPIV,
- $ B, LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
-*
-* Transform the solution matrix X to a solution of the original
-* system.
-*
- IF( NOTRAN ) THEN
- IF( COLEQU ) THEN
- DO 110 J = 1, NRHS
- DO 100 I = 1, N
- X( I, J ) = C( I )*X( I, J )
- 100 CONTINUE
- 110 CONTINUE
- DO 120 J = 1, NRHS
- FERR( J ) = FERR( J ) / COLCND
- 120 CONTINUE
- END IF
- ELSE IF( ROWEQU ) THEN
- DO 140 J = 1, NRHS
- DO 130 I = 1, N
- X( I, J ) = R( I )*X( I, J )
- 130 CONTINUE
- 140 CONTINUE
- DO 150 J = 1, NRHS
- FERR( J ) = FERR( J ) / ROWCND
- 150 CONTINUE
- END IF
-*
-* Set INFO = N+1 if the matrix is singular to working precision.
-*
- IF( RCOND.LT.SLAMCH( 'Epsilon' ) )
- $ INFO = N + 1
-*
- WORK( 1 ) = RPVGRW
- RETURN
-*
-* End of SGBSVX
-*
- END
diff --git a/lapack-netlib/sgesvx.f b/lapack-netlib/sgesvx.f
deleted file mode 100644
index 385e626cfd..0000000000
--- a/lapack-netlib/sgesvx.f
+++ /dev/null
@@ -1,599 +0,0 @@
-*> \brief SGESVX computes the solution to system of linear equations A * X = B for GE matrices
-*
-* =========== DOCUMENTATION ===========
-*
-* Online html documentation available at
-* http://www.netlib.org/lapack/explore-html/
-*
-*> \htmlonly
-*> Download SGESVX + dependencies
-*>
-*> [TGZ]
-*>
-*> [ZIP]
-*>
-*> [TXT]
-*> \endhtmlonly
-*
-* Definition:
-* ===========
-*
-* SUBROUTINE SGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
-* EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
-* WORK, IWORK, INFO )
-*
-* .. Scalar Arguments ..
-* CHARACTER EQUED, FACT, TRANS
-* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
-* REAL RCOND
-* ..
-* .. Array Arguments ..
-* INTEGER IPIV( * ), IWORK( * )
-* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
-* $ BERR( * ), C( * ), FERR( * ), R( * ),
-* $ WORK( * ), X( LDX, * )
-* ..
-*
-*
-*> \par Purpose:
-* =============
-*>
-*> \verbatim
-*>
-*> SGESVX uses the LU factorization to compute the solution to a real
-*> system of linear equations
-*> A * X = B,
-*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*>
-*> Error bounds on the solution and a condition estimate are also
-*> provided.
-*> \endverbatim
-*
-*> \par Description:
-* =================
-*>
-*> \verbatim
-*>
-*> The following steps are performed:
-*>
-*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
-*> the system:
-*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*> Whether or not the system will be equilibrated depends on the
-*> scaling of the matrix A, but if equilibration is used, A is
-*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-*> or diag(C)*B (if TRANS = 'T' or 'C').
-*>
-*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-*> matrix A (after equilibration if FACT = 'E') as
-*> A = P * L * U,
-*> where P is a permutation matrix, L is a unit lower triangular
-*> matrix, and U is upper triangular.
-*>
-*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-*> returns with INFO = i. Otherwise, the factored form of A is used
-*> to estimate the condition number of the matrix A. If the
-*> reciprocal of the condition number is less than machine precision,
-*> INFO = N+1 is returned as a warning, but the routine still goes on
-*> to solve for X and compute error bounds as described below.
-*>
-*> 4. The system of equations is solved for X using the factored form
-*> of A.
-*>
-*> 5. Iterative refinement is applied to improve the computed solution
-*> matrix and calculate error bounds and backward error estimates
-*> for it.
-*>
-*> 6. If equilibration was used, the matrix X is premultiplied by
-*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-*> that it solves the original system before equilibration.
-*> \endverbatim
-*
-* Arguments:
-* ==========
-*
-*> \param[in] FACT
-*> \verbatim
-*> FACT is CHARACTER*1
-*> Specifies whether or not the factored form of the matrix A is
-*> supplied on entry, and if not, whether the matrix A should be
-*> equilibrated before it is factored.
-*> = 'F': On entry, AF and IPIV contain the factored form of A.
-*> If EQUED is not 'N', the matrix A has been
-*> equilibrated with scaling factors given by R and C.
-*> A, AF, and IPIV are not modified.
-*> = 'N': The matrix A will be copied to AF and factored.
-*> = 'E': The matrix A will be equilibrated if necessary, then
-*> copied to AF and factored.
-*> \endverbatim
-*>
-*> \param[in] TRANS
-*> \verbatim
-*> TRANS is CHARACTER*1
-*> Specifies the form of the system of equations:
-*> = 'N': A * X = B (No transpose)
-*> = 'T': A**T * X = B (Transpose)
-*> = 'C': A**H * X = B (Transpose)
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*> N is INTEGER
-*> The number of linear equations, i.e., the order of the
-*> matrix A. N >= 0.
-*> \endverbatim
-*>
-*> \param[in] NRHS
-*> \verbatim
-*> NRHS is INTEGER
-*> The number of right hand sides, i.e., the number of columns
-*> of the matrices B and X. NRHS >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] A
-*> \verbatim
-*> A is REAL array, dimension (LDA,N)
-*> On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
-*> not 'N', then A must have been equilibrated by the scaling
-*> factors in R and/or C. A is not modified if FACT = 'F' or
-*> 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*>
-*> On exit, if EQUED .ne. 'N', A is scaled as follows:
-*> EQUED = 'R': A := diag(R) * A
-*> EQUED = 'C': A := A * diag(C)
-*> EQUED = 'B': A := diag(R) * A * diag(C).
-*> \endverbatim
-*>
-*> \param[in] LDA
-*> \verbatim
-*> LDA is INTEGER
-*> The leading dimension of the array A. LDA >= max(1,N).
-*> \endverbatim
-*>
-*> \param[in,out] AF
-*> \verbatim
-*> AF is REAL array, dimension (LDAF,N)
-*> If FACT = 'F', then AF is an input argument and on entry
-*> contains the factors L and U from the factorization
-*> A = P*L*U as computed by SGETRF. If EQUED .ne. 'N', then
-*> AF is the factored form of the equilibrated matrix A.
-*>
-*> If FACT = 'N', then AF is an output argument and on exit
-*> returns the factors L and U from the factorization A = P*L*U
-*> of the original matrix A.
-*>
-*> If FACT = 'E', then AF is an output argument and on exit
-*> returns the factors L and U from the factorization A = P*L*U
-*> of the equilibrated matrix A (see the description of A for
-*> the form of the equilibrated matrix).
-*> \endverbatim
-*>
-*> \param[in] LDAF
-*> \verbatim
-*> LDAF is INTEGER
-*> The leading dimension of the array AF. LDAF >= max(1,N).
-*> \endverbatim
-*>
-*> \param[in,out] IPIV
-*> \verbatim
-*> IPIV is INTEGER array, dimension (N)
-*> If FACT = 'F', then IPIV is an input argument and on entry
-*> contains the pivot indices from the factorization A = P*L*U
-*> as computed by SGETRF; row i of the matrix was interchanged
-*> with row IPIV(i).
-*>
-*> If FACT = 'N', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = P*L*U
-*> of the original matrix A.
-*>
-*> If FACT = 'E', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = P*L*U
-*> of the equilibrated matrix A.
-*> \endverbatim
-*>
-*> \param[in,out] EQUED
-*> \verbatim
-*> EQUED is CHARACTER*1
-*> Specifies the form of equilibration that was done.
-*> = 'N': No equilibration (always true if FACT = 'N').
-*> = 'R': Row equilibration, i.e., A has been premultiplied by
-*> diag(R).
-*> = 'C': Column equilibration, i.e., A has been postmultiplied
-*> by diag(C).
-*> = 'B': Both row and column equilibration, i.e., A has been
-*> replaced by diag(R) * A * diag(C).
-*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
-*> output argument.
-*> \endverbatim
-*>
-*> \param[in,out] R
-*> \verbatim
-*> R is REAL array, dimension (N)
-*> The row scale factors for A. If EQUED = 'R' or 'B', A is
-*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-*> is not accessed. R is an input argument if FACT = 'F';
-*> otherwise, R is an output argument. If FACT = 'F' and
-*> EQUED = 'R' or 'B', each element of R must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] C
-*> \verbatim
-*> C is REAL array, dimension (N)
-*> The column scale factors for A. If EQUED = 'C' or 'B', A is
-*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-*> is not accessed. C is an input argument if FACT = 'F';
-*> otherwise, C is an output argument. If FACT = 'F' and
-*> EQUED = 'C' or 'B', each element of C must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] B
-*> \verbatim
-*> B is REAL array, dimension (LDB,NRHS)
-*> On entry, the N-by-NRHS right hand side matrix B.
-*> On exit,
-*> if EQUED = 'N', B is not modified;
-*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-*> diag(R)*B;
-*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-*> overwritten by diag(C)*B.
-*> \endverbatim
-*>
-*> \param[in] LDB
-*> \verbatim
-*> LDB is INTEGER
-*> The leading dimension of the array B. LDB >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] X
-*> \verbatim
-*> X is REAL array, dimension (LDX,NRHS)
-*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-*> to the original system of equations. Note that A and B are
-*> modified on exit if EQUED .ne. 'N', and the solution to the
-*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-*> and EQUED = 'R' or 'B'.
-*> \endverbatim
-*>
-*> \param[in] LDX
-*> \verbatim
-*> LDX is INTEGER
-*> The leading dimension of the array X. LDX >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] RCOND
-*> \verbatim
-*> RCOND is REAL
-*> The estimate of the reciprocal condition number of the matrix
-*> A after equilibration (if done). If RCOND is less than the
-*> machine precision (in particular, if RCOND = 0), the matrix
-*> is singular to working precision. This condition is
-*> indicated by a return code of INFO > 0.
-*> \endverbatim
-*>
-*> \param[out] FERR
-*> \verbatim
-*> FERR is REAL array, dimension (NRHS)
-*> The estimated forward error bound for each solution vector
-*> X(j) (the j-th column of the solution matrix X).
-*> If XTRUE is the true solution corresponding to X(j), FERR(j)
-*> is an estimated upper bound for the magnitude of the largest
-*> element in (X(j) - XTRUE) divided by the magnitude of the
-*> largest element in X(j). The estimate is as reliable as
-*> the estimate for RCOND, and is almost always a slight
-*> overestimate of the true error.
-*> \endverbatim
-*>
-*> \param[out] BERR
-*> \verbatim
-*> BERR is REAL array, dimension (NRHS)
-*> The componentwise relative backward error of each solution
-*> vector X(j) (i.e., the smallest relative change in
-*> any element of A or B that makes X(j) an exact solution).
-*> \endverbatim
-*>
-*> \param[out] WORK
-*> \verbatim
-*> WORK is REAL array, dimension (MAX(1,4*N))
-*> On exit, WORK(1) contains the reciprocal pivot growth
-*> factor norm(A)/norm(U). The "max absolute element" norm is
-*> used. If WORK(1) is much less than 1, then the stability
-*> of the LU factorization of the (equilibrated) matrix A
-*> could be poor. This also means that the solution X, condition
-*> estimator RCOND, and forward error bound FERR could be
-*> unreliable. If factorization fails with 0 WORK(1) contains the reciprocal pivot growth factor for the
-*> leading INFO columns of A.
-*> \endverbatim
-*>
-*> \param[out] IWORK
-*> \verbatim
-*> IWORK is INTEGER array, dimension (N)
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*> INFO is INTEGER
-*> = 0: successful exit
-*> < 0: if INFO = -i, the i-th argument had an illegal value
-*> > 0: if INFO = i, and i is
-*> <= N: U(i,i) is exactly zero. The factorization has
-*> been completed, but the factor U is exactly
-*> singular, so the solution and error bounds
-*> could not be computed. RCOND = 0 is returned.
-*> = N+1: U is nonsingular, but RCOND is less than machine
-*> precision, meaning that the matrix is singular
-*> to working precision. Nevertheless, the
-*> solution and error bounds are computed because
-*> there are a number of situations where the
-*> computed solution can be more accurate than the
-*> value of RCOND would suggest.
-*> \endverbatim
-*
-* Authors:
-* ========
-*
-*> \author Univ. of Tennessee
-*> \author Univ. of California Berkeley
-*> \author Univ. of Colorado Denver
-*> \author NAG Ltd.
-*
-*> \ingroup realGEsolve
-*
-* =====================================================================
- SUBROUTINE SGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
- $ EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
- $ WORK, IWORK, INFO )
-*
-* -- LAPACK driver routine --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER EQUED, FACT, TRANS
- INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
- REAL RCOND
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * ), IWORK( * )
- REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
- $ BERR( * ), C( * ), FERR( * ), R( * ),
- $ WORK( * ), X( LDX, * )
-* ..
-*
-* =====================================================================
-*
-* .. Parameters ..
- REAL ZERO, ONE
- PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 )
-* ..
-* .. Local Scalars ..
- LOGICAL COLEQU, EQUIL, NOFACT, NOTRAN, ROWEQU
- CHARACTER NORM
- INTEGER I, INFEQU, J
- REAL AMAX, ANORM, BIGNUM, COLCND, RCMAX, RCMIN,
- $ ROWCND, RPVGRW, SMLNUM
-* ..
-* .. External Functions ..
- LOGICAL LSAME
- REAL SLAMCH, SLANGE, SLANTR
- EXTERNAL LSAME, SLAMCH, SLANGE, SLANTR
-* ..
-* .. External Subroutines ..
- EXTERNAL SGECON, SGEEQU, SGERFS, SGETRF, SGETRS, SLACPY,
- $ SLAQGE, XERBLA
-* ..
-* .. Intrinsic Functions ..
- INTRINSIC MAX, MIN
-* ..
-* .. Executable Statements ..
-*
- INFO = 0
- NOFACT = LSAME( FACT, 'N' )
- EQUIL = LSAME( FACT, 'E' )
- NOTRAN = LSAME( TRANS, 'N' )
- IF( NOFACT .OR. EQUIL ) THEN
- EQUED = 'N'
- ROWEQU = .FALSE.
- COLEQU = .FALSE.
- ELSE
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- SMLNUM = SLAMCH( 'Safe minimum' )
- BIGNUM = ONE / SMLNUM
- END IF
-*
-* Test the input parameters.
-*
- IF( .NOT.NOFACT .AND. .NOT.EQUIL .AND. .NOT.LSAME( FACT, 'F' ) )
- $ THEN
- INFO = -1
- ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
- $ LSAME( TRANS, 'C' ) ) THEN
- INFO = -2
- ELSE IF( N.LT.0 ) THEN
- INFO = -3
- ELSE IF( NRHS.LT.0 ) THEN
- INFO = -4
- ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
- INFO = -6
- ELSE IF( LDAF.LT.MAX( 1, N ) ) THEN
- INFO = -8
- ELSE IF( LSAME( FACT, 'F' ) .AND. .NOT.
- $ ( ROWEQU .OR. COLEQU .OR. LSAME( EQUED, 'N' ) ) ) THEN
- INFO = -10
- ELSE
- IF( ROWEQU ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 10 J = 1, N
- RCMIN = MIN( RCMIN, R( J ) )
- RCMAX = MAX( RCMAX, R( J ) )
- 10 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -11
- ELSE IF( N.GT.0 ) THEN
- ROWCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- ROWCND = ONE
- END IF
- END IF
- IF( COLEQU .AND. INFO.EQ.0 ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 20 J = 1, N
- RCMIN = MIN( RCMIN, C( J ) )
- RCMAX = MAX( RCMAX, C( J ) )
- 20 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -12
- ELSE IF( N.GT.0 ) THEN
- COLCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- COLCND = ONE
- END IF
- END IF
- IF( INFO.EQ.0 ) THEN
- IF( LDB.LT.MAX( 1, N ) ) THEN
- INFO = -14
- ELSE IF( LDX.LT.MAX( 1, N ) ) THEN
- INFO = -16
- END IF
- END IF
- END IF
-*
- IF( INFO.NE.0 ) THEN
- CALL XERBLA( 'SGESVX', -INFO )
- RETURN
- END IF
-*
- IF( EQUIL ) THEN
-*
-* Compute row and column scalings to equilibrate the matrix A.
-*
- CALL SGEEQU( N, N, A, LDA, R, C, ROWCND, COLCND, AMAX, INFEQU )
- IF( INFEQU.EQ.0 ) THEN
-*
-* Equilibrate the matrix.
-*
- CALL SLAQGE( N, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
- $ EQUED )
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- END IF
- END IF
-*
-* Scale the right hand side.
-*
- IF( NOTRAN ) THEN
- IF( ROWEQU ) THEN
- DO 40 J = 1, NRHS
- DO 30 I = 1, N
- B( I, J ) = R( I )*B( I, J )
- 30 CONTINUE
- 40 CONTINUE
- END IF
- ELSE IF( COLEQU ) THEN
- DO 60 J = 1, NRHS
- DO 50 I = 1, N
- B( I, J ) = C( I )*B( I, J )
- 50 CONTINUE
- 60 CONTINUE
- END IF
-*
- IF( NOFACT .OR. EQUIL ) THEN
-*
-* Compute the LU factorization of A.
-*
- CALL SLACPY( 'Full', N, N, A, LDA, AF, LDAF )
- CALL SGETRF( N, N, AF, LDAF, IPIV, INFO )
-*
-* Return if INFO is non-zero.
-*
- IF( INFO.GT.0 ) THEN
-*
-* Compute the reciprocal pivot growth factor of the
-* leading rank-deficient INFO columns of A.
-*
- RPVGRW = SLANTR( 'M', 'U', 'N', INFO, INFO, AF, LDAF,
- $ WORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = SLANGE( 'M', N, INFO, A, LDA, WORK ) / RPVGRW
- END IF
- WORK( 1 ) = RPVGRW
- RCOND = ZERO
- RETURN
- END IF
- END IF
-*
-* Compute the norm of the matrix A and the
-* reciprocal pivot growth factor RPVGRW.
-*
- IF( NOTRAN ) THEN
- NORM = '1'
- ELSE
- NORM = 'I'
- END IF
- ANORM = SLANGE( NORM, N, N, A, LDA, WORK )
- RPVGRW = SLANTR( 'M', 'U', 'N', N, N, AF, LDAF, WORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = SLANGE( 'M', N, N, A, LDA, WORK ) / RPVGRW
- END IF
-*
-* Compute the reciprocal of the condition number of A.
-*
- CALL SGECON( NORM, N, AF, LDAF, ANORM, RCOND, WORK, IWORK, INFO )
-*
-* Compute the solution matrix X.
-*
- CALL SLACPY( 'Full', N, NRHS, B, LDB, X, LDX )
- CALL SGETRS( TRANS, N, NRHS, AF, LDAF, IPIV, X, LDX, INFO )
-*
-* Use iterative refinement to improve the computed solution and
-* compute error bounds and backward error estimates for it.
-*
- CALL SGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, X,
- $ LDX, FERR, BERR, WORK, IWORK, INFO )
-*
-* Transform the solution matrix X to a solution of the original
-* system.
-*
- IF( NOTRAN ) THEN
- IF( COLEQU ) THEN
- DO 80 J = 1, NRHS
- DO 70 I = 1, N
- X( I, J ) = C( I )*X( I, J )
- 70 CONTINUE
- 80 CONTINUE
- DO 90 J = 1, NRHS
- FERR( J ) = FERR( J ) / COLCND
- 90 CONTINUE
- END IF
- ELSE IF( ROWEQU ) THEN
- DO 110 J = 1, NRHS
- DO 100 I = 1, N
- X( I, J ) = R( I )*X( I, J )
- 100 CONTINUE
- 110 CONTINUE
- DO 120 J = 1, NRHS
- FERR( J ) = FERR( J ) / ROWCND
- 120 CONTINUE
- END IF
-*
-* Set INFO = N+1 if the matrix is singular to working precision.
-*
- IF( RCOND.LT.SLAMCH( 'Epsilon' ) )
- $ INFO = N + 1
-*
- WORK( 1 ) = RPVGRW
- RETURN
-*
-* End of SGESVX
-*
- END
diff --git a/lapack-netlib/zgbsvx.f b/lapack-netlib/zgbsvx.f
deleted file mode 100644
index 871564a814..0000000000
--- a/lapack-netlib/zgbsvx.f
+++ /dev/null
@@ -1,644 +0,0 @@
-*> \brief ZGBSVX computes the solution to system of linear equations A * X = B for GB matrices
-*
-* =========== DOCUMENTATION ===========
-*
-* Online html documentation available at
-* http://www.netlib.org/lapack/explore-html/
-*
-*> \htmlonly
-*> Download ZGBSVX + dependencies
-*>
-*> [TGZ]
-*>
-*> [ZIP]
-*>
-*> [TXT]
-*> \endhtmlonly
-*
-* Definition:
-* ===========
-*
-* SUBROUTINE ZGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
-* LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
-* RCOND, FERR, BERR, WORK, RWORK, INFO )
-*
-* .. Scalar Arguments ..
-* CHARACTER EQUED, FACT, TRANS
-* INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
-* DOUBLE PRECISION RCOND
-* ..
-* .. Array Arguments ..
-* INTEGER IPIV( * )
-* DOUBLE PRECISION BERR( * ), C( * ), FERR( * ), R( * ),
-* $ RWORK( * )
-* COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
-* $ WORK( * ), X( LDX, * )
-* ..
-*
-*
-*> \par Purpose:
-* =============
-*>
-*> \verbatim
-*>
-*> ZGBSVX uses the LU factorization to compute the solution to a complex
-*> system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
-*> where A is a band matrix of order N with KL subdiagonals and KU
-*> superdiagonals, and X and B are N-by-NRHS matrices.
-*>
-*> Error bounds on the solution and a condition estimate are also
-*> provided.
-*> \endverbatim
-*
-*> \par Description:
-* =================
-*>
-*> \verbatim
-*>
-*> The following steps are performed by this subroutine:
-*>
-*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
-*> the system:
-*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*> Whether or not the system will be equilibrated depends on the
-*> scaling of the matrix A, but if equilibration is used, A is
-*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-*> or diag(C)*B (if TRANS = 'T' or 'C').
-*>
-*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-*> matrix A (after equilibration if FACT = 'E') as
-*> A = L * U,
-*> where L is a product of permutation and unit lower triangular
-*> matrices with KL subdiagonals, and U is upper triangular with
-*> KL+KU superdiagonals.
-*>
-*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-*> returns with INFO = i. Otherwise, the factored form of A is used
-*> to estimate the condition number of the matrix A. If the
-*> reciprocal of the condition number is less than machine precision,
-*> INFO = N+1 is returned as a warning, but the routine still goes on
-*> to solve for X and compute error bounds as described below.
-*>
-*> 4. The system of equations is solved for X using the factored form
-*> of A.
-*>
-*> 5. Iterative refinement is applied to improve the computed solution
-*> matrix and calculate error bounds and backward error estimates
-*> for it.
-*>
-*> 6. If equilibration was used, the matrix X is premultiplied by
-*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-*> that it solves the original system before equilibration.
-*> \endverbatim
-*
-* Arguments:
-* ==========
-*
-*> \param[in] FACT
-*> \verbatim
-*> FACT is CHARACTER*1
-*> Specifies whether or not the factored form of the matrix A is
-*> supplied on entry, and if not, whether the matrix A should be
-*> equilibrated before it is factored.
-*> = 'F': On entry, AFB and IPIV contain the factored form of
-*> A. If EQUED is not 'N', the matrix A has been
-*> equilibrated with scaling factors given by R and C.
-*> AB, AFB, and IPIV are not modified.
-*> = 'N': The matrix A will be copied to AFB and factored.
-*> = 'E': The matrix A will be equilibrated if necessary, then
-*> copied to AFB and factored.
-*> \endverbatim
-*>
-*> \param[in] TRANS
-*> \verbatim
-*> TRANS is CHARACTER*1
-*> Specifies the form of the system of equations.
-*> = 'N': A * X = B (No transpose)
-*> = 'T': A**T * X = B (Transpose)
-*> = 'C': A**H * X = B (Conjugate transpose)
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*> N is INTEGER
-*> The number of linear equations, i.e., the order of the
-*> matrix A. N >= 0.
-*> \endverbatim
-*>
-*> \param[in] KL
-*> \verbatim
-*> KL is INTEGER
-*> The number of subdiagonals within the band of A. KL >= 0.
-*> \endverbatim
-*>
-*> \param[in] KU
-*> \verbatim
-*> KU is INTEGER
-*> The number of superdiagonals within the band of A. KU >= 0.
-*> \endverbatim
-*>
-*> \param[in] NRHS
-*> \verbatim
-*> NRHS is INTEGER
-*> The number of right hand sides, i.e., the number of columns
-*> of the matrices B and X. NRHS >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] AB
-*> \verbatim
-*> AB is COMPLEX*16 array, dimension (LDAB,N)
-*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-*> The j-th column of A is stored in the j-th column of the
-*> array AB as follows:
-*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*>
-*> If FACT = 'F' and EQUED is not 'N', then A must have been
-*> equilibrated by the scaling factors in R and/or C. AB is not
-*> modified if FACT = 'F' or 'N', or if FACT = 'E' and
-*> EQUED = 'N' on exit.
-*>
-*> On exit, if EQUED .ne. 'N', A is scaled as follows:
-*> EQUED = 'R': A := diag(R) * A
-*> EQUED = 'C': A := A * diag(C)
-*> EQUED = 'B': A := diag(R) * A * diag(C).
-*> \endverbatim
-*>
-*> \param[in] LDAB
-*> \verbatim
-*> LDAB is INTEGER
-*> The leading dimension of the array AB. LDAB >= KL+KU+1.
-*> \endverbatim
-*>
-*> \param[in,out] AFB
-*> \verbatim
-*> AFB is COMPLEX*16 array, dimension (LDAFB,N)
-*> If FACT = 'F', then AFB is an input argument and on entry
-*> contains details of the LU factorization of the band matrix
-*> A, as computed by ZGBTRF. U is stored as an upper triangular
-*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-*> and the multipliers used during the factorization are stored
-*> in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
-*> the factored form of the equilibrated matrix A.
-*>
-*> If FACT = 'N', then AFB is an output argument and on exit
-*> returns details of the LU factorization of A.
-*>
-*> If FACT = 'E', then AFB is an output argument and on exit
-*> returns details of the LU factorization of the equilibrated
-*> matrix A (see the description of AB for the form of the
-*> equilibrated matrix).
-*> \endverbatim
-*>
-*> \param[in] LDAFB
-*> \verbatim
-*> LDAFB is INTEGER
-*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*> \endverbatim
-*>
-*> \param[in,out] IPIV
-*> \verbatim
-*> IPIV is INTEGER array, dimension (N)
-*> If FACT = 'F', then IPIV is an input argument and on entry
-*> contains the pivot indices from the factorization A = L*U
-*> as computed by ZGBTRF; row i of the matrix was interchanged
-*> with row IPIV(i).
-*>
-*> If FACT = 'N', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = L*U
-*> of the original matrix A.
-*>
-*> If FACT = 'E', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = L*U
-*> of the equilibrated matrix A.
-*> \endverbatim
-*>
-*> \param[in,out] EQUED
-*> \verbatim
-*> EQUED is CHARACTER*1
-*> Specifies the form of equilibration that was done.
-*> = 'N': No equilibration (always true if FACT = 'N').
-*> = 'R': Row equilibration, i.e., A has been premultiplied by
-*> diag(R).
-*> = 'C': Column equilibration, i.e., A has been postmultiplied
-*> by diag(C).
-*> = 'B': Both row and column equilibration, i.e., A has been
-*> replaced by diag(R) * A * diag(C).
-*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
-*> output argument.
-*> \endverbatim
-*>
-*> \param[in,out] R
-*> \verbatim
-*> R is DOUBLE PRECISION array, dimension (N)
-*> The row scale factors for A. If EQUED = 'R' or 'B', A is
-*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-*> is not accessed. R is an input argument if FACT = 'F';
-*> otherwise, R is an output argument. If FACT = 'F' and
-*> EQUED = 'R' or 'B', each element of R must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] C
-*> \verbatim
-*> C is DOUBLE PRECISION array, dimension (N)
-*> The column scale factors for A. If EQUED = 'C' or 'B', A is
-*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-*> is not accessed. C is an input argument if FACT = 'F';
-*> otherwise, C is an output argument. If FACT = 'F' and
-*> EQUED = 'C' or 'B', each element of C must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] B
-*> \verbatim
-*> B is COMPLEX*16 array, dimension (LDB,NRHS)
-*> On entry, the right hand side matrix B.
-*> On exit,
-*> if EQUED = 'N', B is not modified;
-*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-*> diag(R)*B;
-*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-*> overwritten by diag(C)*B.
-*> \endverbatim
-*>
-*> \param[in] LDB
-*> \verbatim
-*> LDB is INTEGER
-*> The leading dimension of the array B. LDB >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] X
-*> \verbatim
-*> X is COMPLEX*16 array, dimension (LDX,NRHS)
-*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-*> to the original system of equations. Note that A and B are
-*> modified on exit if EQUED .ne. 'N', and the solution to the
-*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-*> and EQUED = 'R' or 'B'.
-*> \endverbatim
-*>
-*> \param[in] LDX
-*> \verbatim
-*> LDX is INTEGER
-*> The leading dimension of the array X. LDX >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] RCOND
-*> \verbatim
-*> RCOND is DOUBLE PRECISION
-*> The estimate of the reciprocal condition number of the matrix
-*> A after equilibration (if done). If RCOND is less than the
-*> machine precision (in particular, if RCOND = 0), the matrix
-*> is singular to working precision. This condition is
-*> indicated by a return code of INFO > 0.
-*> \endverbatim
-*>
-*> \param[out] FERR
-*> \verbatim
-*> FERR is DOUBLE PRECISION array, dimension (NRHS)
-*> The estimated forward error bound for each solution vector
-*> X(j) (the j-th column of the solution matrix X).
-*> If XTRUE is the true solution corresponding to X(j), FERR(j)
-*> is an estimated upper bound for the magnitude of the largest
-*> element in (X(j) - XTRUE) divided by the magnitude of the
-*> largest element in X(j). The estimate is as reliable as
-*> the estimate for RCOND, and is almost always a slight
-*> overestimate of the true error.
-*> \endverbatim
-*>
-*> \param[out] BERR
-*> \verbatim
-*> BERR is DOUBLE PRECISION array, dimension (NRHS)
-*> The componentwise relative backward error of each solution
-*> vector X(j) (i.e., the smallest relative change in
-*> any element of A or B that makes X(j) an exact solution).
-*> \endverbatim
-*>
-*> \param[out] WORK
-*> \verbatim
-*> WORK is COMPLEX*16 array, dimension (2*N)
-*> \endverbatim
-*>
-*> \param[out] RWORK
-*> \verbatim
-*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,N))
-*> On exit, RWORK(1) contains the reciprocal pivot growth
-*> factor norm(A)/norm(U). The "max absolute element" norm is
-*> used. If RWORK(1) is much less than 1, then the stability
-*> of the LU factorization of the (equilibrated) matrix A
-*> could be poor. This also means that the solution X, condition
-*> estimator RCOND, and forward error bound FERR could be
-*> unreliable. If factorization fails with 0 RWORK(1) contains the reciprocal pivot growth factor for the
-*> leading INFO columns of A.
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*> INFO is INTEGER
-*> = 0: successful exit
-*> < 0: if INFO = -i, the i-th argument had an illegal value
-*> > 0: if INFO = i, and i is
-*> <= N: U(i,i) is exactly zero. The factorization
-*> has been completed, but the factor U is exactly
-*> singular, so the solution and error bounds
-*> could not be computed. RCOND = 0 is returned.
-*> = N+1: U is nonsingular, but RCOND is less than machine
-*> precision, meaning that the matrix is singular
-*> to working precision. Nevertheless, the
-*> solution and error bounds are computed because
-*> there are a number of situations where the
-*> computed solution can be more accurate than the
-*> value of RCOND would suggest.
-*> \endverbatim
-*
-* Authors:
-* ========
-*
-*> \author Univ. of Tennessee
-*> \author Univ. of California Berkeley
-*> \author Univ. of Colorado Denver
-*> \author NAG Ltd.
-*
-*> \ingroup complex16GBsolve
-*
-* =====================================================================
- SUBROUTINE ZGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
- $ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
- $ RCOND, FERR, BERR, WORK, RWORK, INFO )
-*
-* -- LAPACK driver routine --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER EQUED, FACT, TRANS
- INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
- DOUBLE PRECISION RCOND
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION BERR( * ), C( * ), FERR( * ), R( * ),
- $ RWORK( * )
- COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
- $ WORK( * ), X( LDX, * )
-* ..
-*
-* =====================================================================
-* Moved setting of INFO = N+1 so INFO does not subsequently get
-* overwritten. Sven, 17 Mar 05.
-* =====================================================================
-*
-* .. Parameters ..
- DOUBLE PRECISION ZERO, ONE
- PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 )
-* ..
-* .. Local Scalars ..
- LOGICAL COLEQU, EQUIL, NOFACT, NOTRAN, ROWEQU
- CHARACTER NORM
- INTEGER I, INFEQU, J, J1, J2
- DOUBLE PRECISION AMAX, ANORM, BIGNUM, COLCND, RCMAX, RCMIN,
- $ ROWCND, RPVGRW, SMLNUM
-* ..
-* .. External Functions ..
- LOGICAL LSAME
- DOUBLE PRECISION DLAMCH, ZLANGB, ZLANTB
- EXTERNAL LSAME, DLAMCH, ZLANGB, ZLANTB
-* ..
-* .. External Subroutines ..
- EXTERNAL XERBLA, ZCOPY, ZGBCON, ZGBEQU, ZGBRFS, ZGBTRF,
- $ ZGBTRS, ZLACPY, ZLAQGB
-* ..
-* .. Intrinsic Functions ..
- INTRINSIC ABS, MAX, MIN
-* ..
-* .. Executable Statements ..
-*
- INFO = 0
- NOFACT = LSAME( FACT, 'N' )
- EQUIL = LSAME( FACT, 'E' )
- NOTRAN = LSAME( TRANS, 'N' )
- IF( NOFACT .OR. EQUIL ) THEN
- EQUED = 'N'
- ROWEQU = .FALSE.
- COLEQU = .FALSE.
- ELSE
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- SMLNUM = DLAMCH( 'Safe minimum' )
- BIGNUM = ONE / SMLNUM
- END IF
-*
-* Test the input parameters.
-*
- IF( .NOT.NOFACT .AND. .NOT.EQUIL .AND. .NOT.LSAME( FACT, 'F' ) )
- $ THEN
- INFO = -1
- ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
- $ LSAME( TRANS, 'C' ) ) THEN
- INFO = -2
- ELSE IF( N.LT.0 ) THEN
- INFO = -3
- ELSE IF( KL.LT.0 ) THEN
- INFO = -4
- ELSE IF( KU.LT.0 ) THEN
- INFO = -5
- ELSE IF( NRHS.LT.0 ) THEN
- INFO = -6
- ELSE IF( LDAB.LT.KL+KU+1 ) THEN
- INFO = -8
- ELSE IF( LDAFB.LT.2*KL+KU+1 ) THEN
- INFO = -10
- ELSE IF( LSAME( FACT, 'F' ) .AND. .NOT.
- $ ( ROWEQU .OR. COLEQU .OR. LSAME( EQUED, 'N' ) ) ) THEN
- INFO = -12
- ELSE
- IF( ROWEQU ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 10 J = 1, N
- RCMIN = MIN( RCMIN, R( J ) )
- RCMAX = MAX( RCMAX, R( J ) )
- 10 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -13
- ELSE IF( N.GT.0 ) THEN
- ROWCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- ROWCND = ONE
- END IF
- END IF
- IF( COLEQU .AND. INFO.EQ.0 ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 20 J = 1, N
- RCMIN = MIN( RCMIN, C( J ) )
- RCMAX = MAX( RCMAX, C( J ) )
- 20 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -14
- ELSE IF( N.GT.0 ) THEN
- COLCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- COLCND = ONE
- END IF
- END IF
- IF( INFO.EQ.0 ) THEN
- IF( LDB.LT.MAX( 1, N ) ) THEN
- INFO = -16
- ELSE IF( LDX.LT.MAX( 1, N ) ) THEN
- INFO = -18
- END IF
- END IF
- END IF
-*
- IF( INFO.NE.0 ) THEN
- CALL XERBLA( 'ZGBSVX', -INFO )
- RETURN
- END IF
-*
- IF( EQUIL ) THEN
-*
-* Compute row and column scalings to equilibrate the matrix A.
-*
- CALL ZGBEQU( N, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
- $ AMAX, INFEQU )
- IF( INFEQU.EQ.0 ) THEN
-*
-* Equilibrate the matrix.
-*
- CALL ZLAQGB( N, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
- $ AMAX, EQUED )
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- END IF
- END IF
-*
-* Scale the right hand side.
-*
- IF( NOTRAN ) THEN
- IF( ROWEQU ) THEN
- DO 40 J = 1, NRHS
- DO 30 I = 1, N
- B( I, J ) = R( I )*B( I, J )
- 30 CONTINUE
- 40 CONTINUE
- END IF
- ELSE IF( COLEQU ) THEN
- DO 60 J = 1, NRHS
- DO 50 I = 1, N
- B( I, J ) = C( I )*B( I, J )
- 50 CONTINUE
- 60 CONTINUE
- END IF
-*
- IF( NOFACT .OR. EQUIL ) THEN
-*
-* Compute the LU factorization of the band matrix A.
-*
- DO 70 J = 1, N
- J1 = MAX( J-KU, 1 )
- J2 = MIN( J+KL, N )
- CALL ZCOPY( J2-J1+1, AB( KU+1-J+J1, J ), 1,
- $ AFB( KL+KU+1-J+J1, J ), 1 )
- 70 CONTINUE
-*
- CALL ZGBTRF( N, N, KL, KU, AFB, LDAFB, IPIV, INFO )
-*
-* Return if INFO is non-zero.
-*
- IF( INFO.GT.0 ) THEN
-*
-* Compute the reciprocal pivot growth factor of the
-* leading rank-deficient INFO columns of A.
-*
- ANORM = ZERO
- DO 90 J = 1, INFO
- DO 80 I = MAX( KU+2-J, 1 ), MIN( N+KU+1-J, KL+KU+1 )
- ANORM = MAX( ANORM, ABS( AB( I, J ) ) )
- 80 CONTINUE
- 90 CONTINUE
- RPVGRW = ZLANTB( 'M', 'U', 'N', INFO, MIN( INFO-1, KL+KU ),
- $ AFB( MAX( 1, KL+KU+2-INFO ), 1 ), LDAFB,
- $ RWORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = ANORM / RPVGRW
- END IF
- RWORK( 1 ) = RPVGRW
- RCOND = ZERO
- RETURN
- END IF
- END IF
-*
-* Compute the norm of the matrix A and the
-* reciprocal pivot growth factor RPVGRW.
-*
- IF( NOTRAN ) THEN
- NORM = '1'
- ELSE
- NORM = 'I'
- END IF
- ANORM = ZLANGB( NORM, N, KL, KU, AB, LDAB, RWORK )
- RPVGRW = ZLANTB( 'M', 'U', 'N', N, KL+KU, AFB, LDAFB, RWORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = ZLANGB( 'M', N, KL, KU, AB, LDAB, RWORK ) / RPVGRW
- END IF
-*
-* Compute the reciprocal of the condition number of A.
-*
- CALL ZGBCON( NORM, N, KL, KU, AFB, LDAFB, IPIV, ANORM, RCOND,
- $ WORK, RWORK, INFO )
-*
-* Compute the solution matrix X.
-*
- CALL ZLACPY( 'Full', N, NRHS, B, LDB, X, LDX )
- CALL ZGBTRS( TRANS, N, KL, KU, NRHS, AFB, LDAFB, IPIV, X, LDX,
- $ INFO )
-*
-* Use iterative refinement to improve the computed solution and
-* compute error bounds and backward error estimates for it.
-*
- CALL ZGBRFS( TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB, IPIV,
- $ B, LDB, X, LDX, FERR, BERR, WORK, RWORK, INFO )
-*
-* Transform the solution matrix X to a solution of the original
-* system.
-*
- IF( NOTRAN ) THEN
- IF( COLEQU ) THEN
- DO 110 J = 1, NRHS
- DO 100 I = 1, N
- X( I, J ) = C( I )*X( I, J )
- 100 CONTINUE
- 110 CONTINUE
- DO 120 J = 1, NRHS
- FERR( J ) = FERR( J ) / COLCND
- 120 CONTINUE
- END IF
- ELSE IF( ROWEQU ) THEN
- DO 140 J = 1, NRHS
- DO 130 I = 1, N
- X( I, J ) = R( I )*X( I, J )
- 130 CONTINUE
- 140 CONTINUE
- DO 150 J = 1, NRHS
- FERR( J ) = FERR( J ) / ROWCND
- 150 CONTINUE
- END IF
-*
-* Set INFO = N+1 if the matrix is singular to working precision.
-*
- IF( RCOND.LT.DLAMCH( 'Epsilon' ) )
- $ INFO = N + 1
-*
- RWORK( 1 ) = RPVGRW
- RETURN
-*
-* End of ZGBSVX
-*
- END
diff --git a/lapack-netlib/zgejsv.f b/lapack-netlib/zgejsv.f
deleted file mode 100644
index 5fe899e50f..0000000000
--- a/lapack-netlib/zgejsv.f
+++ /dev/null
@@ -1,2234 +0,0 @@
-*> \brief \b ZGEJSV
-*
-* =========== DOCUMENTATION ===========
-*
-* Online html documentation available at
-* http://www.netlib.org/lapack/explore-html/
-*
-*> \htmlonly
-*> Download ZGEJSV + dependencies
-*>
-*> [TGZ]
-*>
-*> [ZIP]
-*>
-*> [TXT]
-*> \endhtmlonly
-*
-* Definition:
-* ===========
-*
-* SUBROUTINE ZGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
-* M, N, A, LDA, SVA, U, LDU, V, LDV,
-* CWORK, LWORK, RWORK, LRWORK, IWORK, INFO )
-*
-* .. Scalar Arguments ..
-* IMPLICIT NONE
-* INTEGER INFO, LDA, LDU, LDV, LWORK, M, N
-* ..
-* .. Array Arguments ..
-* COMPLEX*16 A( LDA, * ), U( LDU, * ), V( LDV, * ), CWORK( LWORK )
-* DOUBLE PRECISION SVA( N ), RWORK( LRWORK )
-* INTEGER IWORK( * )
-* CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
-* ..
-*
-*
-*> \par Purpose:
-* =============
-*>
-*> \verbatim
-*>
-*> ZGEJSV computes the singular value decomposition (SVD) of a complex M-by-N
-*> matrix [A], where M >= N. The SVD of [A] is written as
-*>
-*> [A] = [U] * [SIGMA] * [V]^*,
-*>
-*> where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N
-*> diagonal elements, [U] is an M-by-N (or M-by-M) unitary matrix, and
-*> [V] is an N-by-N unitary matrix. The diagonal elements of [SIGMA] are
-*> the singular values of [A]. The columns of [U] and [V] are the left and
-*> the right singular vectors of [A], respectively. The matrices [U] and [V]
-*> are computed and stored in the arrays U and V, respectively. The diagonal
-*> of [SIGMA] is computed and stored in the array SVA.
-*> \endverbatim
-*>
-*> Arguments:
-*> ==========
-*>
-*> \param[in] JOBA
-*> \verbatim
-*> JOBA is CHARACTER*1
-*> Specifies the level of accuracy:
-*> = 'C': This option works well (high relative accuracy) if A = B * D,
-*> with well-conditioned B and arbitrary diagonal matrix D.
-*> The accuracy cannot be spoiled by COLUMN scaling. The
-*> accuracy of the computed output depends on the condition of
-*> B, and the procedure aims at the best theoretical accuracy.
-*> The relative error max_{i=1:N}|d sigma_i| / sigma_i is
-*> bounded by f(M,N)*epsilon* cond(B), independent of D.
-*> The input matrix is preprocessed with the QRF with column
-*> pivoting. This initial preprocessing and preconditioning by
-*> a rank revealing QR factorization is common for all values of
-*> JOBA. Additional actions are specified as follows:
-*> = 'E': Computation as with 'C' with an additional estimate of the
-*> condition number of B. It provides a realistic error bound.
-*> = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings
-*> D1, D2, and well-conditioned matrix C, this option gives
-*> higher accuracy than the 'C' option. If the structure of the
-*> input matrix is not known, and relative accuracy is
-*> desirable, then this option is advisable. The input matrix A
-*> is preprocessed with QR factorization with FULL (row and
-*> column) pivoting.
-*> = 'G': Computation as with 'F' with an additional estimate of the
-*> condition number of B, where A=B*D. If A has heavily weighted
-*> rows, then using this condition number gives too pessimistic
-*> error bound.
-*> = 'A': Small singular values are not well determined by the data
-*> and are considered as noisy; the matrix is treated as
-*> numerically rank deficient. The error in the computed
-*> singular values is bounded by f(m,n)*epsilon*||A||.
-*> The computed SVD A = U * S * V^* restores A up to
-*> f(m,n)*epsilon*||A||.
-*> This gives the procedure the licence to discard (set to zero)
-*> all singular values below N*epsilon*||A||.
-*> = 'R': Similar as in 'A'. Rank revealing property of the initial
-*> QR factorization is used do reveal (using triangular factor)
-*> a gap sigma_{r+1} < epsilon * sigma_r in which case the
-*> numerical RANK is declared to be r. The SVD is computed with
-*> absolute error bounds, but more accurately than with 'A'.
-*> \endverbatim
-*>
-*> \param[in] JOBU
-*> \verbatim
-*> JOBU is CHARACTER*1
-*> Specifies whether to compute the columns of U:
-*> = 'U': N columns of U are returned in the array U.
-*> = 'F': full set of M left sing. vectors is returned in the array U.
-*> = 'W': U may be used as workspace of length M*N. See the description
-*> of U.
-*> = 'N': U is not computed.
-*> \endverbatim
-*>
-*> \param[in] JOBV
-*> \verbatim
-*> JOBV is CHARACTER*1
-*> Specifies whether to compute the matrix V:
-*> = 'V': N columns of V are returned in the array V; Jacobi rotations
-*> are not explicitly accumulated.
-*> = 'J': N columns of V are returned in the array V, but they are
-*> computed as the product of Jacobi rotations, if JOBT = 'N'.
-*> = 'W': V may be used as workspace of length N*N. See the description
-*> of V.
-*> = 'N': V is not computed.
-*> \endverbatim
-*>
-*> \param[in] JOBR
-*> \verbatim
-*> JOBR is CHARACTER*1
-*> Specifies the RANGE for the singular values. Issues the licence to
-*> set to zero small positive singular values if they are outside
-*> specified range. If A .NE. 0 is scaled so that the largest singular
-*> value of c*A is around SQRT(BIG), BIG=DLAMCH('O'), then JOBR issues
-*> the licence to kill columns of A whose norm in c*A is less than
-*> SQRT(SFMIN) (for JOBR = 'R'), or less than SMALL=SFMIN/EPSLN,
-*> where SFMIN=DLAMCH('S'), EPSLN=DLAMCH('E').
-*> = 'N': Do not kill small columns of c*A. This option assumes that
-*> BLAS and QR factorizations and triangular solvers are
-*> implemented to work in that range. If the condition of A
-*> is greater than BIG, use ZGESVJ.
-*> = 'R': RESTRICTED range for sigma(c*A) is [SQRT(SFMIN), SQRT(BIG)]
-*> (roughly, as described above). This option is recommended.
-*> ===========================
-*> For computing the singular values in the FULL range [SFMIN,BIG]
-*> use ZGESVJ.
-*> \endverbatim
-*>
-*> \param[in] JOBT
-*> \verbatim
-*> JOBT is CHARACTER*1
-*> If the matrix is square then the procedure may determine to use
-*> transposed A if A^* seems to be better with respect to convergence.
-*> If the matrix is not square, JOBT is ignored.
-*> The decision is based on two values of entropy over the adjoint
-*> orbit of A^* * A. See the descriptions of RWORK(6) and RWORK(7).
-*> = 'T': transpose if entropy test indicates possibly faster
-*> convergence of Jacobi process if A^* is taken as input. If A is
-*> replaced with A^*, then the row pivoting is included automatically.
-*> = 'N': do not speculate.
-*> The option 'T' can be used to compute only the singular values, or
-*> the full SVD (U, SIGMA and V). For only one set of singular vectors
-*> (U or V), the caller should provide both U and V, as one of the
-*> matrices is used as workspace if the matrix A is transposed.
-*> The implementer can easily remove this constraint and make the
-*> code more complicated. See the descriptions of U and V.
-*> In general, this option is considered experimental, and 'N'; should
-*> be preferred. This is subject to changes in the future.
-*> \endverbatim
-*>
-*> \param[in] JOBP
-*> \verbatim
-*> JOBP is CHARACTER*1
-*> Issues the licence to introduce structured perturbations to drown
-*> denormalized numbers. This licence should be active if the
-*> denormals are poorly implemented, causing slow computation,
-*> especially in cases of fast convergence (!). For details see [1,2].
-*> For the sake of simplicity, this perturbations are included only
-*> when the full SVD or only the singular values are requested. The
-*> implementer/user can easily add the perturbation for the cases of
-*> computing one set of singular vectors.
-*> = 'P': introduce perturbation
-*> = 'N': do not perturb
-*> \endverbatim
-*>
-*> \param[in] M
-*> \verbatim
-*> M is INTEGER
-*> The number of rows of the input matrix A. M >= 0.
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*> N is INTEGER
-*> The number of columns of the input matrix A. M >= N >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] A
-*> \verbatim
-*> A is COMPLEX*16 array, dimension (LDA,N)
-*> On entry, the M-by-N matrix A.
-*> \endverbatim
-*>
-*> \param[in] LDA
-*> \verbatim
-*> LDA is INTEGER
-*> The leading dimension of the array A. LDA >= max(1,M).
-*> \endverbatim
-*>
-*> \param[out] SVA
-*> \verbatim
-*> SVA is DOUBLE PRECISION array, dimension (N)
-*> On exit,
-*> - For RWORK(1)/RWORK(2) = ONE: The singular values of A. During
-*> the computation SVA contains Euclidean column norms of the
-*> iterated matrices in the array A.
-*> - For RWORK(1) .NE. RWORK(2): The singular values of A are
-*> (RWORK(1)/RWORK(2)) * SVA(1:N). This factored form is used if
-*> sigma_max(A) overflows or if small singular values have been
-*> saved from underflow by scaling the input matrix A.
-*> - If JOBR='R' then some of the singular values may be returned
-*> as exact zeros obtained by "set to zero" because they are
-*> below the numerical rank threshold or are denormalized numbers.
-*> \endverbatim
-*>
-*> \param[out] U
-*> \verbatim
-*> U is COMPLEX*16 array, dimension ( LDU, N )
-*> If JOBU = 'U', then U contains on exit the M-by-N matrix of
-*> the left singular vectors.
-*> If JOBU = 'F', then U contains on exit the M-by-M matrix of
-*> the left singular vectors, including an ONB
-*> of the orthogonal complement of the Range(A).
-*> If JOBU = 'W' .AND. (JOBV = 'V' .AND. JOBT = 'T' .AND. M = N),
-*> then U is used as workspace if the procedure
-*> replaces A with A^*. In that case, [V] is computed
-*> in U as left singular vectors of A^* and then
-*> copied back to the V array. This 'W' option is just
-*> a reminder to the caller that in this case U is
-*> reserved as workspace of length N*N.
-*> If JOBU = 'N' U is not referenced, unless JOBT='T'.
-*> \endverbatim
-*>
-*> \param[in] LDU
-*> \verbatim
-*> LDU is INTEGER
-*> The leading dimension of the array U, LDU >= 1.
-*> IF JOBU = 'U' or 'F' or 'W', then LDU >= M.
-*> \endverbatim
-*>
-*> \param[out] V
-*> \verbatim
-*> V is COMPLEX*16 array, dimension ( LDV, N )
-*> If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of
-*> the right singular vectors;
-*> If JOBV = 'W', AND (JOBU = 'U' AND JOBT = 'T' AND M = N),
-*> then V is used as workspace if the pprocedure
-*> replaces A with A^*. In that case, [U] is computed
-*> in V as right singular vectors of A^* and then
-*> copied back to the U array. This 'W' option is just
-*> a reminder to the caller that in this case V is
-*> reserved as workspace of length N*N.
-*> If JOBV = 'N' V is not referenced, unless JOBT='T'.
-*> \endverbatim
-*>
-*> \param[in] LDV
-*> \verbatim
-*> LDV is INTEGER
-*> The leading dimension of the array V, LDV >= 1.
-*> If JOBV = 'V' or 'J' or 'W', then LDV >= N.
-*> \endverbatim
-*>
-*> \param[out] CWORK
-*> \verbatim
-*> CWORK is COMPLEX*16 array, dimension (MAX(2,LWORK))
-*> If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or
-*> LRWORK=-1), then on exit CWORK(1) contains the required length of
-*> CWORK for the job parameters used in the call.
-*> \endverbatim
-*>
-*> \param[in] LWORK
-*> \verbatim
-*> LWORK is INTEGER
-*> Length of CWORK to confirm proper allocation of workspace.
-*> LWORK depends on the job:
-*>
-*> 1. If only SIGMA is needed ( JOBU = 'N', JOBV = 'N' ) and
-*> 1.1 .. no scaled condition estimate required (JOBA.NE.'E'.AND.JOBA.NE.'G'):
-*> LWORK >= 2*N+1. This is the minimal requirement.
-*> ->> For optimal performance (blocked code) the optimal value
-*> is LWORK >= N + (N+1)*NB. Here NB is the optimal
-*> block size for ZGEQP3 and ZGEQRF.
-*> In general, optimal LWORK is computed as
-*> LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZGEQRF), LWORK(ZGESVJ)).
-*> 1.2. .. an estimate of the scaled condition number of A is
-*> required (JOBA='E', or 'G'). In this case, LWORK the minimal
-*> requirement is LWORK >= N*N + 2*N.
-*> ->> For optimal performance (blocked code) the optimal value
-*> is LWORK >= max(N+(N+1)*NB, N*N+2*N)=N**2+2*N.
-*> In general, the optimal length LWORK is computed as
-*> LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZGEQRF), LWORK(ZGESVJ),
-*> N*N+LWORK(ZPOCON)).
-*> 2. If SIGMA and the right singular vectors are needed (JOBV = 'V'),
-*> (JOBU = 'N')
-*> 2.1 .. no scaled condition estimate requested (JOBE = 'N'):
-*> -> the minimal requirement is LWORK >= 3*N.
-*> -> For optimal performance,
-*> LWORK >= max(N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,
-*> where NB is the optimal block size for ZGEQP3, ZGEQRF, ZGELQF,
-*> ZUNMLQ. In general, the optimal length LWORK is computed as
-*> LWORK >= max(N+LWORK(ZGEQP3), N+LWORK(ZGESVJ),
-*> N+LWORK(ZGELQF), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMLQ)).
-*> 2.2 .. an estimate of the scaled condition number of A is
-*> required (JOBA='E', or 'G').
-*> -> the minimal requirement is LWORK >= 3*N.
-*> -> For optimal performance,
-*> LWORK >= max(N+(N+1)*NB, 2*N,2*N+N*NB)=2*N+N*NB,
-*> where NB is the optimal block size for ZGEQP3, ZGEQRF, ZGELQF,
-*> ZUNMLQ. In general, the optimal length LWORK is computed as
-*> LWORK >= max(N+LWORK(ZGEQP3), LWORK(ZPOCON), N+LWORK(ZGESVJ),
-*> N+LWORK(ZGELQF), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMLQ)).
-*> 3. If SIGMA and the left singular vectors are needed
-*> 3.1 .. no scaled condition estimate requested (JOBE = 'N'):
-*> -> the minimal requirement is LWORK >= 3*N.
-*> -> For optimal performance:
-*> if JOBU = 'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,
-*> where NB is the optimal block size for ZGEQP3, ZGEQRF, ZUNMQR.
-*> In general, the optimal length LWORK is computed as
-*> LWORK >= max(N+LWORK(ZGEQP3), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMQR)).
-*> 3.2 .. an estimate of the scaled condition number of A is
-*> required (JOBA='E', or 'G').
-*> -> the minimal requirement is LWORK >= 3*N.
-*> -> For optimal performance:
-*> if JOBU = 'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,
-*> where NB is the optimal block size for ZGEQP3, ZGEQRF, ZUNMQR.
-*> In general, the optimal length LWORK is computed as
-*> LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZPOCON),
-*> 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMQR)).
-*> 4. If the full SVD is needed: (JOBU = 'U' or JOBU = 'F') and
-*> 4.1. if JOBV = 'V'
-*> the minimal requirement is LWORK >= 5*N+2*N*N.
-*> 4.2. if JOBV = 'J' the minimal requirement is
-*> LWORK >= 4*N+N*N.
-*> In both cases, the allocated CWORK can accommodate blocked runs
-*> of ZGEQP3, ZGEQRF, ZGELQF, SUNMQR, ZUNMLQ.
-*>
-*> If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or
-*> LRWORK=-1), then on exit CWORK(1) contains the optimal and CWORK(2) contains the
-*> minimal length of CWORK for the job parameters used in the call.
-*> \endverbatim
-*>
-*> \param[out] RWORK
-*> \verbatim
-*> RWORK is DOUBLE PRECISION array, dimension (MAX(7,LRWORK))
-*> On exit,
-*> RWORK(1) = Determines the scaling factor SCALE = RWORK(2) / RWORK(1)
-*> such that SCALE*SVA(1:N) are the computed singular values
-*> of A. (See the description of SVA().)
-*> RWORK(2) = See the description of RWORK(1).
-*> RWORK(3) = SCONDA is an estimate for the condition number of
-*> column equilibrated A. (If JOBA = 'E' or 'G')
-*> SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1).
-*> It is computed using ZPOCON. It holds
-*> N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA
-*> where R is the triangular factor from the QRF of A.
-*> However, if R is truncated and the numerical rank is
-*> determined to be strictly smaller than N, SCONDA is
-*> returned as -1, thus indicating that the smallest
-*> singular values might be lost.
-*>
-*> If full SVD is needed, the following two condition numbers are
-*> useful for the analysis of the algorithm. They are provided for
-*> a developer/implementer who is familiar with the details of
-*> the method.
-*>
-*> RWORK(4) = an estimate of the scaled condition number of the
-*> triangular factor in the first QR factorization.
-*> RWORK(5) = an estimate of the scaled condition number of the
-*> triangular factor in the second QR factorization.
-*> The following two parameters are computed if JOBT = 'T'.
-*> They are provided for a developer/implementer who is familiar
-*> with the details of the method.
-*> RWORK(6) = the entropy of A^* * A :: this is the Shannon entropy
-*> of diag(A^* * A) / Trace(A^* * A) taken as point in the
-*> probability simplex.
-*> RWORK(7) = the entropy of A * A^*. (See the description of RWORK(6).)
-*> If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or
-*> LRWORK=-1), then on exit RWORK(1) contains the required length of
-*> RWORK for the job parameters used in the call.
-*> \endverbatim
-*>
-*> \param[in] LRWORK
-*> \verbatim
-*> LRWORK is INTEGER
-*> Length of RWORK to confirm proper allocation of workspace.
-*> LRWORK depends on the job:
-*>
-*> 1. If only the singular values are requested i.e. if
-*> LSAME(JOBU,'N') .AND. LSAME(JOBV,'N')
-*> then:
-*> 1.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
-*> then: LRWORK = max( 7, 2 * M ).
-*> 1.2. Otherwise, LRWORK = max( 7, N ).
-*> 2. If singular values with the right singular vectors are requested
-*> i.e. if
-*> (LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) .AND.
-*> .NOT.(LSAME(JOBU,'U').OR.LSAME(JOBU,'F'))
-*> then:
-*> 2.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
-*> then LRWORK = max( 7, 2 * M ).
-*> 2.2. Otherwise, LRWORK = max( 7, N ).
-*> 3. If singular values with the left singular vectors are requested, i.e. if
-*> (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND.
-*> .NOT.(LSAME(JOBV,'V').OR.LSAME(JOBV,'J'))
-*> then:
-*> 3.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
-*> then LRWORK = max( 7, 2 * M ).
-*> 3.2. Otherwise, LRWORK = max( 7, N ).
-*> 4. If singular values with both the left and the right singular vectors
-*> are requested, i.e. if
-*> (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND.
-*> (LSAME(JOBV,'V').OR.LSAME(JOBV,'J'))
-*> then:
-*> 4.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
-*> then LRWORK = max( 7, 2 * M ).
-*> 4.2. Otherwise, LRWORK = max( 7, N ).
-*>
-*> If, on entry, LRWORK = -1 or LWORK=-1, a workspace query is assumed and
-*> the length of RWORK is returned in RWORK(1).
-*> \endverbatim
-*>
-*> \param[out] IWORK
-*> \verbatim
-*> IWORK is INTEGER array, of dimension at least 4, that further depends
-*> on the job:
-*>
-*> 1. If only the singular values are requested then:
-*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') )
-*> then the length of IWORK is N+M; otherwise the length of IWORK is N.
-*> 2. If the singular values and the right singular vectors are requested then:
-*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') )
-*> then the length of IWORK is N+M; otherwise the length of IWORK is N.
-*> 3. If the singular values and the left singular vectors are requested then:
-*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') )
-*> then the length of IWORK is N+M; otherwise the length of IWORK is N.
-*> 4. If the singular values with both the left and the right singular vectors
-*> are requested, then:
-*> 4.1. If LSAME(JOBV,'J') the length of IWORK is determined as follows:
-*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') )
-*> then the length of IWORK is N+M; otherwise the length of IWORK is N.
-*> 4.2. If LSAME(JOBV,'V') the length of IWORK is determined as follows:
-*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') )
-*> then the length of IWORK is 2*N+M; otherwise the length of IWORK is 2*N.
-*>
-*> On exit,
-*> IWORK(1) = the numerical rank determined after the initial
-*> QR factorization with pivoting. See the descriptions
-*> of JOBA and JOBR.
-*> IWORK(2) = the number of the computed nonzero singular values
-*> IWORK(3) = if nonzero, a warning message:
-*> If IWORK(3) = 1 then some of the column norms of A
-*> were denormalized floats. The requested high accuracy
-*> is not warranted by the data.
-*> IWORK(4) = 1 or -1. If IWORK(4) = 1, then the procedure used A^* to
-*> do the job as specified by the JOB parameters.
-*> If the call to ZGEJSV is a workspace query (indicated by LWORK = -1 or
-*> LRWORK = -1), then on exit IWORK(1) contains the required length of
-*> IWORK for the job parameters used in the call.
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*> INFO is INTEGER
-*> < 0: if INFO = -i, then the i-th argument had an illegal value.
-*> = 0: successful exit;
-*> > 0: ZGEJSV did not converge in the maximal allowed number
-*> of sweeps. The computed values may be inaccurate.
-*> \endverbatim
-*
-* Authors:
-* ========
-*
-*> \author Univ. of Tennessee
-*> \author Univ. of California Berkeley
-*> \author Univ. of Colorado Denver
-*> \author NAG Ltd.
-*
-*> \ingroup complex16GEsing
-*
-*> \par Further Details:
-* =====================
-*>
-*> \verbatim
-*>
-*> ZGEJSV implements a preconditioned Jacobi SVD algorithm. It uses ZGEQP3,
-*> ZGEQRF, and ZGELQF as preprocessors and preconditioners. Optionally, an
-*> additional row pivoting can be used as a preprocessor, which in some
-*> cases results in much higher accuracy. An example is matrix A with the
-*> structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned
-*> diagonal matrices and C is well-conditioned matrix. In that case, complete
-*> pivoting in the first QR factorizations provides accuracy dependent on the
-*> condition number of C, and independent of D1, D2. Such higher accuracy is
-*> not completely understood theoretically, but it works well in practice.
-*> Further, if A can be written as A = B*D, with well-conditioned B and some
-*> diagonal D, then the high accuracy is guaranteed, both theoretically and
-*> in software, independent of D. For more details see [1], [2].
-*> The computational range for the singular values can be the full range
-*> ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS
-*> & LAPACK routines called by ZGEJSV are implemented to work in that range.
-*> If that is not the case, then the restriction for safe computation with
-*> the singular values in the range of normalized IEEE numbers is that the
-*> spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not
-*> overflow. This code (ZGEJSV) is best used in this restricted range,
-*> meaning that singular values of magnitude below ||A||_2 / DLAMCH('O') are
-*> returned as zeros. See JOBR for details on this.
-*> Further, this implementation is somewhat slower than the one described
-*> in [1,2] due to replacement of some non-LAPACK components, and because
-*> the choice of some tuning parameters in the iterative part (ZGESVJ) is
-*> left to the implementer on a particular machine.
-*> The rank revealing QR factorization (in this code: ZGEQP3) should be
-*> implemented as in [3]. We have a new version of ZGEQP3 under development
-*> that is more robust than the current one in LAPACK, with a cleaner cut in
-*> rank deficient cases. It will be available in the SIGMA library [4].
-*> If M is much larger than N, it is obvious that the initial QRF with
-*> column pivoting can be preprocessed by the QRF without pivoting. That
-*> well known trick is not used in ZGEJSV because in some cases heavy row
-*> weighting can be treated with complete pivoting. The overhead in cases
-*> M much larger than N is then only due to pivoting, but the benefits in
-*> terms of accuracy have prevailed. The implementer/user can incorporate
-*> this extra QRF step easily. The implementer can also improve data movement
-*> (matrix transpose, matrix copy, matrix transposed copy) - this
-*> implementation of ZGEJSV uses only the simplest, naive data movement.
-*> \endverbatim
-*
-*> \par Contributor:
-* ==================
-*>
-*> Zlatko Drmac, Department of Mathematics, Faculty of Science,
-*> University of Zagreb (Zagreb, Croatia); drmac@math.hr
-*
-*> \par References:
-* ================
-*>
-*> \verbatim
-*>
-*> [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.
-*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.
-*> LAPACK Working note 169.
-*> [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.
-*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.
-*> LAPACK Working note 170.
-*> [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR
-*> factorization software - a case study.
-*> ACM Trans. Math. Softw. Vol. 35, No 2 (2008), pp. 1-28.
-*> LAPACK Working note 176.
-*> [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,
-*> QSVD, (H,K)-SVD computations.
-*> Department of Mathematics, University of Zagreb, 2008, 2016.
-*> \endverbatim
-*
-*> \par Bugs, examples and comments:
-* =================================
-*>
-*> Please report all bugs and send interesting examples and/or comments to
-*> drmac@math.hr. Thank you.
-*>
-* =====================================================================
- SUBROUTINE ZGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
- $ M, N, A, LDA, SVA, U, LDU, V, LDV,
- $ CWORK, LWORK, RWORK, LRWORK, IWORK, INFO )
-*
-* -- LAPACK computational routine --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- IMPLICIT NONE
- INTEGER INFO, LDA, LDU, LDV, LWORK, LRWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), U( LDU, * ), V( LDV, * ),
- $ CWORK( LWORK )
- DOUBLE PRECISION SVA( N ), RWORK( LRWORK )
- INTEGER IWORK( * )
- CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
-* ..
-*
-* ===========================================================================
-*
-* .. Local Parameters ..
- DOUBLE PRECISION ZERO, ONE
- PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 )
- COMPLEX*16 CZERO, CONE
- PARAMETER ( CZERO = ( 0.0D0, 0.0D0 ), CONE = ( 1.0D0, 0.0D0 ) )
-* ..
-* .. Local Scalars ..
- COMPLEX*16 CTEMP
- DOUBLE PRECISION AAPP, AAQQ, AATMAX, AATMIN, BIG, BIG1,
- $ COND_OK, CONDR1, CONDR2, ENTRA, ENTRAT, EPSLN,
- $ MAXPRJ, SCALEM, SCONDA, SFMIN, SMALL, TEMP1,
- $ USCAL1, USCAL2, XSC
- INTEGER IERR, N1, NR, NUMRANK, p, q, WARNING
- LOGICAL ALMORT, DEFR, ERREST, GOSCAL, JRACC, KILL, LQUERY,
- $ LSVEC, L2ABER, L2KILL, L2PERT, L2RANK, L2TRAN, NOSCAL,
- $ ROWPIV, RSVEC, TRANSP
-*
- INTEGER OPTWRK, MINWRK, MINRWRK, MINIWRK
- INTEGER LWCON, LWLQF, LWQP3, LWQRF, LWUNMLQ, LWUNMQR, LWUNMQRM,
- $ LWSVDJ, LWSVDJV, LRWQP3, LRWCON, LRWSVDJ, IWOFF
- INTEGER LWRK_ZGELQF, LWRK_ZGEQP3, LWRK_ZGEQP3N, LWRK_ZGEQRF,
- $ LWRK_ZGESVJ, LWRK_ZGESVJV, LWRK_ZGESVJU, LWRK_ZUNMLQ,
- $ LWRK_ZUNMQR, LWRK_ZUNMQRM
-* ..
-* .. Local Arrays
- COMPLEX*16 CDUMMY(1)
- DOUBLE PRECISION RDUMMY(1)
-*
-* .. Intrinsic Functions ..
- INTRINSIC ABS, DCMPLX, CONJG, DLOG, MAX, MIN, DBLE, NINT, SQRT
-* ..
-* .. External Functions ..
- DOUBLE PRECISION DLAMCH, DZNRM2
- INTEGER IDAMAX, IZAMAX
- LOGICAL LSAME
- EXTERNAL IDAMAX, IZAMAX, LSAME, DLAMCH, DZNRM2
-* ..
-* .. External Subroutines ..
- EXTERNAL DLASSQ, ZCOPY, ZGELQF, ZGEQP3, ZGEQRF, ZLACPY, ZLAPMR,
- $ ZLASCL, DLASCL, ZLASET, ZLASSQ, ZLASWP, ZUNGQR, ZUNMLQ,
- $ ZUNMQR, ZPOCON, DSCAL, ZDSCAL, ZSWAP, ZTRSM, ZLACGV,
- $ XERBLA
-*
- EXTERNAL ZGESVJ
-* ..
-*
-* Test the input arguments
-*
- LSVEC = LSAME( JOBU, 'U' ) .OR. LSAME( JOBU, 'F' )
- JRACC = LSAME( JOBV, 'J' )
- RSVEC = LSAME( JOBV, 'V' ) .OR. JRACC
- ROWPIV = LSAME( JOBA, 'F' ) .OR. LSAME( JOBA, 'G' )
- L2RANK = LSAME( JOBA, 'R' )
- L2ABER = LSAME( JOBA, 'A' )
- ERREST = LSAME( JOBA, 'E' ) .OR. LSAME( JOBA, 'G' )
- L2TRAN = LSAME( JOBT, 'T' ) .AND. ( M .EQ. N )
- L2KILL = LSAME( JOBR, 'R' )
- DEFR = LSAME( JOBR, 'N' )
- L2PERT = LSAME( JOBP, 'P' )
-*
- LQUERY = ( LWORK .EQ. -1 ) .OR. ( LRWORK .EQ. -1 )
-*
- IF ( .NOT.(ROWPIV .OR. L2RANK .OR. L2ABER .OR.
- $ ERREST .OR. LSAME( JOBA, 'C' ) )) THEN
- INFO = - 1
- ELSE IF ( .NOT.( LSVEC .OR. LSAME( JOBU, 'N' ) .OR.
- $ ( LSAME( JOBU, 'W' ) .AND. RSVEC .AND. L2TRAN ) ) ) THEN
- INFO = - 2
- ELSE IF ( .NOT.( RSVEC .OR. LSAME( JOBV, 'N' ) .OR.
- $ ( LSAME( JOBV, 'W' ) .AND. LSVEC .AND. L2TRAN ) ) ) THEN
- INFO = - 3
- ELSE IF ( .NOT. ( L2KILL .OR. DEFR ) ) THEN
- INFO = - 4
- ELSE IF ( .NOT. ( LSAME(JOBT,'T') .OR. LSAME(JOBT,'N') ) ) THEN
- INFO = - 5
- ELSE IF ( .NOT. ( L2PERT .OR. LSAME( JOBP, 'N' ) ) ) THEN
- INFO = - 6
- ELSE IF ( M .LT. 0 ) THEN
- INFO = - 7
- ELSE IF ( ( N .LT. 0 ) .OR. ( N .GT. M ) ) THEN
- INFO = - 8
- ELSE IF ( LDA .LT. M ) THEN
- INFO = - 10
- ELSE IF ( LSVEC .AND. ( LDU .LT. M ) ) THEN
- INFO = - 13
- ELSE IF ( RSVEC .AND. ( LDV .LT. N ) ) THEN
- INFO = - 15
- ELSE
-* #:)
- INFO = 0
- END IF
-*
- IF ( INFO .EQ. 0 ) THEN
-* .. compute the minimal and the optimal workspace lengths
-* [[The expressions for computing the minimal and the optimal
-* values of LCWORK, LRWORK are written with a lot of redundancy and
-* can be simplified. However, this verbose form is useful for
-* maintenance and modifications of the code.]]
-*
-* .. minimal workspace length for ZGEQP3 of an M x N matrix,
-* ZGEQRF of an N x N matrix, ZGELQF of an N x N matrix,
-* ZUNMLQ for computing N x N matrix, ZUNMQR for computing N x N
-* matrix, ZUNMQR for computing M x N matrix, respectively.
- LWQP3 = N+1
- LWQRF = MAX( 1, N )
- LWLQF = MAX( 1, N )
- LWUNMLQ = MAX( 1, N )
- LWUNMQR = MAX( 1, N )
- LWUNMQRM = MAX( 1, M )
-* .. minimal workspace length for ZPOCON of an N x N matrix
- LWCON = 2 * N
-* .. minimal workspace length for ZGESVJ of an N x N matrix,
-* without and with explicit accumulation of Jacobi rotations
- LWSVDJ = MAX( 2 * N, 1 )
- LWSVDJV = MAX( 2 * N, 1 )
-* .. minimal REAL workspace length for ZGEQP3, ZPOCON, ZGESVJ
- LRWQP3 = 2 * N
- LRWCON = N
- LRWSVDJ = N
- IF ( LQUERY ) THEN
- CALL ZGEQP3( M, N, A, LDA, IWORK, CDUMMY, CDUMMY, -1,
- $ RDUMMY, IERR )
- LWRK_ZGEQP3 = INT( CDUMMY(1) )
- CALL ZGEQRF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR )
- LWRK_ZGEQRF = INT( CDUMMY(1) )
- CALL ZGELQF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR )
- LWRK_ZGELQF = INT( CDUMMY(1) )
- END IF
- MINWRK = 2
- OPTWRK = 2
- MINIWRK = N
- IF ( .NOT. (LSVEC .OR. RSVEC ) ) THEN
-* .. minimal and optimal sizes of the complex workspace if
-* only the singular values are requested
- IF ( ERREST ) THEN
- MINWRK = MAX( N+LWQP3, N**2+LWCON, N+LWQRF, LWSVDJ )
- ELSE
- MINWRK = MAX( N+LWQP3, N+LWQRF, LWSVDJ )
- END IF
- IF ( LQUERY ) THEN
- CALL ZGESVJ( 'L', 'N', 'N', N, N, A, LDA, SVA, N, V,
- $ LDV, CDUMMY, -1, RDUMMY, -1, IERR )
- LWRK_ZGESVJ = INT( CDUMMY(1) )
- IF ( ERREST ) THEN
- OPTWRK = MAX( N+LWRK_ZGEQP3, N**2+LWCON,
- $ N+LWRK_ZGEQRF, LWRK_ZGESVJ )
- ELSE
- OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWRK_ZGEQRF,
- $ LWRK_ZGESVJ )
- END IF
- END IF
- IF ( L2TRAN .OR. ROWPIV ) THEN
- IF ( ERREST ) THEN
- MINRWRK = MAX( 7, 2*M, LRWQP3, LRWCON, LRWSVDJ )
- ELSE
- MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ )
- END IF
- ELSE
- IF ( ERREST ) THEN
- MINRWRK = MAX( 7, LRWQP3, LRWCON, LRWSVDJ )
- ELSE
- MINRWRK = MAX( 7, LRWQP3, LRWSVDJ )
- END IF
- END IF
- IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
- ELSE IF ( RSVEC .AND. (.NOT.LSVEC) ) THEN
-* .. minimal and optimal sizes of the complex workspace if the
-* singular values and the right singular vectors are requested
- IF ( ERREST ) THEN
- MINWRK = MAX( N+LWQP3, LWCON, LWSVDJ, N+LWLQF,
- $ 2*N+LWQRF, N+LWSVDJ, N+LWUNMLQ )
- ELSE
- MINWRK = MAX( N+LWQP3, LWSVDJ, N+LWLQF, 2*N+LWQRF,
- $ N+LWSVDJ, N+LWUNMLQ )
- END IF
- IF ( LQUERY ) THEN
- CALL ZGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A,
- $ LDA, CDUMMY, -1, RDUMMY, -1, IERR )
- LWRK_ZGESVJ = INT( CDUMMY(1) )
- CALL ZUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY,
- $ V, LDV, CDUMMY, -1, IERR )
- LWRK_ZUNMLQ = INT( CDUMMY(1) )
- IF ( ERREST ) THEN
- OPTWRK = MAX( N+LWRK_ZGEQP3, LWCON, LWRK_ZGESVJ,
- $ N+LWRK_ZGELQF, 2*N+LWRK_ZGEQRF,
- $ N+LWRK_ZGESVJ, N+LWRK_ZUNMLQ )
- ELSE
- OPTWRK = MAX( N+LWRK_ZGEQP3, LWRK_ZGESVJ,N+LWRK_ZGELQF,
- $ 2*N+LWRK_ZGEQRF, N+LWRK_ZGESVJ,
- $ N+LWRK_ZUNMLQ )
- END IF
- END IF
- IF ( L2TRAN .OR. ROWPIV ) THEN
- IF ( ERREST ) THEN
- MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON )
- ELSE
- MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ )
- END IF
- ELSE
- IF ( ERREST ) THEN
- MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )
- ELSE
- MINRWRK = MAX( 7, LRWQP3, LRWSVDJ )
- END IF
- END IF
- IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
- ELSE IF ( LSVEC .AND. (.NOT.RSVEC) ) THEN
-* .. minimal and optimal sizes of the complex workspace if the
-* singular values and the left singular vectors are requested
- IF ( ERREST ) THEN
- MINWRK = N + MAX( LWQP3,LWCON,N+LWQRF,LWSVDJ,LWUNMQRM )
- ELSE
- MINWRK = N + MAX( LWQP3, N+LWQRF, LWSVDJ, LWUNMQRM )
- END IF
- IF ( LQUERY ) THEN
- CALL ZGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A,
- $ LDA, CDUMMY, -1, RDUMMY, -1, IERR )
- LWRK_ZGESVJ = INT( CDUMMY(1) )
- CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,
- $ LDU, CDUMMY, -1, IERR )
- LWRK_ZUNMQRM = INT( CDUMMY(1) )
- IF ( ERREST ) THEN
- OPTWRK = N + MAX( LWRK_ZGEQP3, LWCON, N+LWRK_ZGEQRF,
- $ LWRK_ZGESVJ, LWRK_ZUNMQRM )
- ELSE
- OPTWRK = N + MAX( LWRK_ZGEQP3, N+LWRK_ZGEQRF,
- $ LWRK_ZGESVJ, LWRK_ZUNMQRM )
- END IF
- END IF
- IF ( L2TRAN .OR. ROWPIV ) THEN
- IF ( ERREST ) THEN
- MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON )
- ELSE
- MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ )
- END IF
- ELSE
- IF ( ERREST ) THEN
- MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )
- ELSE
- MINRWRK = MAX( 7, LRWQP3, LRWSVDJ )
- END IF
- END IF
- IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
- ELSE
-* .. minimal and optimal sizes of the complex workspace if the
-* full SVD is requested
- IF ( .NOT. JRACC ) THEN
- IF ( ERREST ) THEN
- MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+N**2+LWCON,
- $ 2*N+LWQRF, 2*N+LWQP3,
- $ 2*N+N**2+N+LWLQF, 2*N+N**2+N+N**2+LWCON,
- $ 2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV,
- $ 2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ,
- $ N+N**2+LWSVDJ, N+LWUNMQRM )
- ELSE
- MINWRK = MAX( N+LWQP3, 2*N+N**2+LWCON,
- $ 2*N+LWQRF, 2*N+LWQP3,
- $ 2*N+N**2+N+LWLQF, 2*N+N**2+N+N**2+LWCON,
- $ 2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV,
- $ 2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ,
- $ N+N**2+LWSVDJ, N+LWUNMQRM )
- END IF
- MINIWRK = MINIWRK + N
- IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
- ELSE
- IF ( ERREST ) THEN
- MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+LWQRF,
- $ 2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR,
- $ N+LWUNMQRM )
- ELSE
- MINWRK = MAX( N+LWQP3, 2*N+LWQRF,
- $ 2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR,
- $ N+LWUNMQRM )
- END IF
- IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
- END IF
- IF ( LQUERY ) THEN
- CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,
- $ LDU, CDUMMY, -1, IERR )
- LWRK_ZUNMQRM = INT( CDUMMY(1) )
- CALL ZUNMQR( 'L', 'N', N, N, N, A, LDA, CDUMMY, U,
- $ LDU, CDUMMY, -1, IERR )
- LWRK_ZUNMQR = INT( CDUMMY(1) )
- IF ( .NOT. JRACC ) THEN
- CALL ZGEQP3( N,N, A, LDA, IWORK, CDUMMY,CDUMMY, -1,
- $ RDUMMY, IERR )
- LWRK_ZGEQP3N = INT( CDUMMY(1) )
- CALL ZGESVJ( 'L', 'U', 'N', N, N, U, LDU, SVA,
- $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
- LWRK_ZGESVJ = INT( CDUMMY(1) )
- CALL ZGESVJ( 'U', 'U', 'N', N, N, U, LDU, SVA,
- $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
- LWRK_ZGESVJU = INT( CDUMMY(1) )
- CALL ZGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA,
- $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
- LWRK_ZGESVJV = INT( CDUMMY(1) )
- CALL ZUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY,
- $ V, LDV, CDUMMY, -1, IERR )
- LWRK_ZUNMLQ = INT( CDUMMY(1) )
- IF ( ERREST ) THEN
- OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWCON,
- $ 2*N+N**2+LWCON, 2*N+LWRK_ZGEQRF,
- $ 2*N+LWRK_ZGEQP3N,
- $ 2*N+N**2+N+LWRK_ZGELQF,
- $ 2*N+N**2+N+N**2+LWCON,
- $ 2*N+N**2+N+LWRK_ZGESVJ,
- $ 2*N+N**2+N+LWRK_ZGESVJV,
- $ 2*N+N**2+N+LWRK_ZUNMQR,
- $ 2*N+N**2+N+LWRK_ZUNMLQ,
- $ N+N**2+LWRK_ZGESVJU,
- $ N+LWRK_ZUNMQRM )
- ELSE
- OPTWRK = MAX( N+LWRK_ZGEQP3,
- $ 2*N+N**2+LWCON, 2*N+LWRK_ZGEQRF,
- $ 2*N+LWRK_ZGEQP3N,
- $ 2*N+N**2+N+LWRK_ZGELQF,
- $ 2*N+N**2+N+N**2+LWCON,
- $ 2*N+N**2+N+LWRK_ZGESVJ,
- $ 2*N+N**2+N+LWRK_ZGESVJV,
- $ 2*N+N**2+N+LWRK_ZUNMQR,
- $ 2*N+N**2+N+LWRK_ZUNMLQ,
- $ N+N**2+LWRK_ZGESVJU,
- $ N+LWRK_ZUNMQRM )
- END IF
- ELSE
- CALL ZGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA,
- $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
- LWRK_ZGESVJV = INT( CDUMMY(1) )
- CALL ZUNMQR( 'L', 'N', N, N, N, CDUMMY, N, CDUMMY,
- $ V, LDV, CDUMMY, -1, IERR )
- LWRK_ZUNMQR = INT( CDUMMY(1) )
- CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,
- $ LDU, CDUMMY, -1, IERR )
- LWRK_ZUNMQRM = INT( CDUMMY(1) )
- IF ( ERREST ) THEN
- OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWCON,
- $ 2*N+LWRK_ZGEQRF, 2*N+N**2,
- $ 2*N+N**2+LWRK_ZGESVJV,
- $ 2*N+N**2+N+LWRK_ZUNMQR,N+LWRK_ZUNMQRM )
- ELSE
- OPTWRK = MAX( N+LWRK_ZGEQP3, 2*N+LWRK_ZGEQRF,
- $ 2*N+N**2, 2*N+N**2+LWRK_ZGESVJV,
- $ 2*N+N**2+N+LWRK_ZUNMQR,
- $ N+LWRK_ZUNMQRM )
- END IF
- END IF
- END IF
- IF ( L2TRAN .OR. ROWPIV ) THEN
- MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON )
- ELSE
- MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )
- END IF
- END IF
- MINWRK = MAX( 2, MINWRK )
- OPTWRK = MAX( MINWRK, OPTWRK )
- IF ( LWORK .LT. MINWRK .AND. (.NOT.LQUERY) ) INFO = - 17
- IF ( LRWORK .LT. MINRWRK .AND. (.NOT.LQUERY) ) INFO = - 19
- END IF
-*
- IF ( INFO .NE. 0 ) THEN
-* #:(
- CALL XERBLA( 'ZGEJSV', - INFO )
- RETURN
- ELSE IF ( LQUERY ) THEN
- CWORK(1) = OPTWRK
- CWORK(2) = MINWRK
- RWORK(1) = MINRWRK
- IWORK(1) = MAX( 4, MINIWRK )
- RETURN
- END IF
-*
-* Quick return for void matrix (Y3K safe)
-* #:)
- IF ( ( M .EQ. 0 ) .OR. ( N .EQ. 0 ) ) THEN
- IWORK(1:4) = 0
- RWORK(1:7) = 0
- RETURN
- ENDIF
-*
-* Determine whether the matrix U should be M x N or M x M
-*
- IF ( LSVEC ) THEN
- N1 = N
- IF ( LSAME( JOBU, 'F' ) ) N1 = M
- END IF
-*
-* Set numerical parameters
-*
-*! NOTE: Make sure DLAMCH() does not fail on the target architecture.
-*
- EPSLN = DLAMCH('Epsilon')
- SFMIN = DLAMCH('SafeMinimum')
- SMALL = SFMIN / EPSLN
- BIG = DLAMCH('O')
-* BIG = ONE / SFMIN
-*
-* Initialize SVA(1:N) = diag( ||A e_i||_2 )_1^N
-*
-*(!) If necessary, scale SVA() to protect the largest norm from
-* overflow. It is possible that this scaling pushes the smallest
-* column norm left from the underflow threshold (extreme case).
-*
- SCALEM = ONE / SQRT(DBLE(M)*DBLE(N))
- NOSCAL = .TRUE.
- GOSCAL = .TRUE.
- DO 1874 p = 1, N
- AAPP = ZERO
- AAQQ = ONE
- CALL ZLASSQ( M, A(1,p), 1, AAPP, AAQQ )
- IF ( AAPP .GT. BIG ) THEN
- INFO = - 9
- CALL XERBLA( 'ZGEJSV', -INFO )
- RETURN
- END IF
- AAQQ = SQRT(AAQQ)
- IF ( ( AAPP .LT. (BIG / AAQQ) ) .AND. NOSCAL ) THEN
- SVA(p) = AAPP * AAQQ
- ELSE
- NOSCAL = .FALSE.
- SVA(p) = AAPP * ( AAQQ * SCALEM )
- IF ( GOSCAL ) THEN
- GOSCAL = .FALSE.
- CALL DSCAL( p-1, SCALEM, SVA, 1 )
- END IF
- END IF
- 1874 CONTINUE
-*
- IF ( NOSCAL ) SCALEM = ONE
-*
- AAPP = ZERO
- AAQQ = BIG
- DO 4781 p = 1, N
- AAPP = MAX( AAPP, SVA(p) )
- IF ( SVA(p) .NE. ZERO ) AAQQ = MIN( AAQQ, SVA(p) )
- 4781 CONTINUE
-*
-* Quick return for zero M x N matrix
-* #:)
- IF ( AAPP .EQ. ZERO ) THEN
- IF ( LSVEC ) CALL ZLASET( 'G', M, N1, CZERO, CONE, U, LDU )
- IF ( RSVEC ) CALL ZLASET( 'G', N, N, CZERO, CONE, V, LDV )
- RWORK(1) = ONE
- RWORK(2) = ONE
- IF ( ERREST ) RWORK(3) = ONE
- IF ( LSVEC .AND. RSVEC ) THEN
- RWORK(4) = ONE
- RWORK(5) = ONE
- END IF
- IF ( L2TRAN ) THEN
- RWORK(6) = ZERO
- RWORK(7) = ZERO
- END IF
- IWORK(1) = 0
- IWORK(2) = 0
- IWORK(3) = 0
- IWORK(4) = -1
- RETURN
- END IF
-*
-* Issue warning if denormalized column norms detected. Override the
-* high relative accuracy request. Issue licence to kill nonzero columns
-* (set them to zero) whose norm is less than sigma_max / BIG (roughly).
-* #:(
- WARNING = 0
- IF ( AAQQ .LE. SFMIN ) THEN
- L2RANK = .TRUE.
- L2KILL = .TRUE.
- WARNING = 1
- END IF
-*
-* Quick return for one-column matrix
-* #:)
- IF ( N .EQ. 1 ) THEN
-*
- IF ( LSVEC ) THEN
- CALL ZLASCL( 'G',0,0,SVA(1),SCALEM, M,1,A(1,1),LDA,IERR )
- CALL ZLACPY( 'A', M, 1, A, LDA, U, LDU )
-* computing all M left singular vectors of the M x 1 matrix
- IF ( N1 .NE. N ) THEN
- CALL ZGEQRF( M, N, U,LDU, CWORK, CWORK(N+1),LWORK-N,IERR )
- CALL ZUNGQR( M,N1,1, U,LDU,CWORK,CWORK(N+1),LWORK-N,IERR )
- CALL ZCOPY( M, A(1,1), 1, U(1,1), 1 )
- END IF
- END IF
- IF ( RSVEC ) THEN
- V(1,1) = CONE
- END IF
- IF ( SVA(1) .LT. (BIG*SCALEM) ) THEN
- SVA(1) = SVA(1) / SCALEM
- SCALEM = ONE
- END IF
- RWORK(1) = ONE / SCALEM
- RWORK(2) = ONE
- IF ( SVA(1) .NE. ZERO ) THEN
- IWORK(1) = 1
- IF ( ( SVA(1) / SCALEM) .GE. SFMIN ) THEN
- IWORK(2) = 1
- ELSE
- IWORK(2) = 0
- END IF
- ELSE
- IWORK(1) = 0
- IWORK(2) = 0
- END IF
- IWORK(3) = 0
- IWORK(4) = -1
- IF ( ERREST ) RWORK(3) = ONE
- IF ( LSVEC .AND. RSVEC ) THEN
- RWORK(4) = ONE
- RWORK(5) = ONE
- END IF
- IF ( L2TRAN ) THEN
- RWORK(6) = ZERO
- RWORK(7) = ZERO
- END IF
- RETURN
-*
- END IF
-*
- TRANSP = .FALSE.
-*
- AATMAX = -ONE
- AATMIN = BIG
- IF ( ROWPIV .OR. L2TRAN ) THEN
-*
-* Compute the row norms, needed to determine row pivoting sequence
-* (in the case of heavily row weighted A, row pivoting is strongly
-* advised) and to collect information needed to compare the
-* structures of A * A^* and A^* * A (in the case L2TRAN.EQ..TRUE.).
-*
- IF ( L2TRAN ) THEN
- DO 1950 p = 1, M
- XSC = ZERO
- TEMP1 = ONE
- CALL ZLASSQ( N, A(p,1), LDA, XSC, TEMP1 )
-* ZLASSQ gets both the ell_2 and the ell_infinity norm
-* in one pass through the vector
- RWORK(M+p) = XSC * SCALEM
- RWORK(p) = XSC * (SCALEM*SQRT(TEMP1))
- AATMAX = MAX( AATMAX, RWORK(p) )
- IF (RWORK(p) .NE. ZERO)
- $ AATMIN = MIN(AATMIN,RWORK(p))
- 1950 CONTINUE
- ELSE
- DO 1904 p = 1, M
- RWORK(M+p) = SCALEM*ABS( A(p,IZAMAX(N,A(p,1),LDA)) )
- AATMAX = MAX( AATMAX, RWORK(M+p) )
- AATMIN = MIN( AATMIN, RWORK(M+p) )
- 1904 CONTINUE
- END IF
-*
- END IF
-*
-* For square matrix A try to determine whether A^* would be better
-* input for the preconditioned Jacobi SVD, with faster convergence.
-* The decision is based on an O(N) function of the vector of column
-* and row norms of A, based on the Shannon entropy. This should give
-* the right choice in most cases when the difference actually matters.
-* It may fail and pick the slower converging side.
-*
- ENTRA = ZERO
- ENTRAT = ZERO
- IF ( L2TRAN ) THEN
-*
- XSC = ZERO
- TEMP1 = ONE
- CALL DLASSQ( N, SVA, 1, XSC, TEMP1 )
- TEMP1 = ONE / TEMP1
-*
- ENTRA = ZERO
- DO 1113 p = 1, N
- BIG1 = ( ( SVA(p) / XSC )**2 ) * TEMP1
- IF ( BIG1 .NE. ZERO ) ENTRA = ENTRA + BIG1 * DLOG(BIG1)
- 1113 CONTINUE
- ENTRA = - ENTRA / DLOG(DBLE(N))
-*
-* Now, SVA().^2/Trace(A^* * A) is a point in the probability simplex.
-* It is derived from the diagonal of A^* * A. Do the same with the
-* diagonal of A * A^*, compute the entropy of the corresponding
-* probability distribution. Note that A * A^* and A^* * A have the
-* same trace.
-*
- ENTRAT = ZERO
- DO 1114 p = 1, M
- BIG1 = ( ( RWORK(p) / XSC )**2 ) * TEMP1
- IF ( BIG1 .NE. ZERO ) ENTRAT = ENTRAT + BIG1 * DLOG(BIG1)
- 1114 CONTINUE
- ENTRAT = - ENTRAT / DLOG(DBLE(M))
-*
-* Analyze the entropies and decide A or A^*. Smaller entropy
-* usually means better input for the algorithm.
-*
- TRANSP = ( ENTRAT .LT. ENTRA )
-*
-* If A^* is better than A, take the adjoint of A. This is allowed
-* only for square matrices, M=N.
- IF ( TRANSP ) THEN
-* In an optimal implementation, this trivial transpose
-* should be replaced with faster transpose.
- DO 1115 p = 1, N - 1
- A(p,p) = CONJG(A(p,p))
- DO 1116 q = p + 1, N
- CTEMP = CONJG(A(q,p))
- A(q,p) = CONJG(A(p,q))
- A(p,q) = CTEMP
- 1116 CONTINUE
- 1115 CONTINUE
- A(N,N) = CONJG(A(N,N))
- DO 1117 p = 1, N
- RWORK(M+p) = SVA(p)
- SVA(p) = RWORK(p)
-* previously computed row 2-norms are now column 2-norms
-* of the transposed matrix
- 1117 CONTINUE
- TEMP1 = AAPP
- AAPP = AATMAX
- AATMAX = TEMP1
- TEMP1 = AAQQ
- AAQQ = AATMIN
- AATMIN = TEMP1
- KILL = LSVEC
- LSVEC = RSVEC
- RSVEC = KILL
- IF ( LSVEC ) N1 = N
-*
- ROWPIV = .TRUE.
- END IF
-*
- END IF
-* END IF L2TRAN
-*
-* Scale the matrix so that its maximal singular value remains less
-* than SQRT(BIG) -- the matrix is scaled so that its maximal column
-* has Euclidean norm equal to SQRT(BIG/N). The only reason to keep
-* SQRT(BIG) instead of BIG is the fact that ZGEJSV uses LAPACK and
-* BLAS routines that, in some implementations, are not capable of
-* working in the full interval [SFMIN,BIG] and that they may provoke
-* overflows in the intermediate results. If the singular values spread
-* from SFMIN to BIG, then ZGESVJ will compute them. So, in that case,
-* one should use ZGESVJ instead of ZGEJSV.
-* >> change in the April 2016 update: allow bigger range, i.e. the
-* largest column is allowed up to BIG/N and ZGESVJ will do the rest.
- BIG1 = SQRT( BIG )
- TEMP1 = SQRT( BIG / DBLE(N) )
-* TEMP1 = BIG/DBLE(N)
-*
- CALL DLASCL( 'G', 0, 0, AAPP, TEMP1, N, 1, SVA, N, IERR )
- IF ( AAQQ .GT. (AAPP * SFMIN) ) THEN
- AAQQ = ( AAQQ / AAPP ) * TEMP1
- ELSE
- AAQQ = ( AAQQ * TEMP1 ) / AAPP
- END IF
- TEMP1 = TEMP1 * SCALEM
- CALL ZLASCL( 'G', 0, 0, AAPP, TEMP1, M, N, A, LDA, IERR )
-*
-* To undo scaling at the end of this procedure, multiply the
-* computed singular values with USCAL2 / USCAL1.
-*
- USCAL1 = TEMP1
- USCAL2 = AAPP
-*
- IF ( L2KILL ) THEN
-* L2KILL enforces computation of nonzero singular values in
-* the restricted range of condition number of the initial A,
-* sigma_max(A) / sigma_min(A) approx. SQRT(BIG)/SQRT(SFMIN).
- XSC = SQRT( SFMIN )
- ELSE
- XSC = SMALL
-*
-* Now, if the condition number of A is too big,
-* sigma_max(A) / sigma_min(A) .GT. SQRT(BIG/N) * EPSLN / SFMIN,
-* as a precaution measure, the full SVD is computed using ZGESVJ
-* with accumulated Jacobi rotations. This provides numerically
-* more robust computation, at the cost of slightly increased run
-* time. Depending on the concrete implementation of BLAS and LAPACK
-* (i.e. how they behave in presence of extreme ill-conditioning) the
-* implementor may decide to remove this switch.
- IF ( ( AAQQ.LT.SQRT(SFMIN) ) .AND. LSVEC .AND. RSVEC ) THEN
- JRACC = .TRUE.
- END IF
-*
- END IF
- IF ( AAQQ .LT. XSC ) THEN
- DO 700 p = 1, N
- IF ( SVA(p) .LT. XSC ) THEN
- CALL ZLASET( 'A', M, 1, CZERO, CZERO, A(1,p), LDA )
- SVA(p) = ZERO
- END IF
- 700 CONTINUE
- END IF
-*
-* Preconditioning using QR factorization with pivoting
-*
- IF ( ROWPIV ) THEN
-* Optional row permutation (Bjoerck row pivoting):
-* A result by Cox and Higham shows that the Bjoerck's
-* row pivoting combined with standard column pivoting
-* has similar effect as Powell-Reid complete pivoting.
-* The ell-infinity norms of A are made nonincreasing.
- IF ( ( LSVEC .AND. RSVEC ) .AND. .NOT.( JRACC ) ) THEN
- IWOFF = 2*N
- ELSE
- IWOFF = N
- END IF
- DO 1952 p = 1, M - 1
- q = IDAMAX( M-p+1, RWORK(M+p), 1 ) + p - 1
- IWORK(IWOFF+p) = q
- IF ( p .NE. q ) THEN
- TEMP1 = RWORK(M+p)
- RWORK(M+p) = RWORK(M+q)
- RWORK(M+q) = TEMP1
- END IF
- 1952 CONTINUE
- CALL ZLASWP( N, A, LDA, 1, M-1, IWORK(IWOFF+1), 1 )
- END IF
-*
-* End of the preparation phase (scaling, optional sorting and
-* transposing, optional flushing of small columns).
-*
-* Preconditioning
-*
-* If the full SVD is needed, the right singular vectors are computed
-* from a matrix equation, and for that we need theoretical analysis
-* of the Businger-Golub pivoting. So we use ZGEQP3 as the first RR QRF.
-* In all other cases the first RR QRF can be chosen by other criteria
-* (eg speed by replacing global with restricted window pivoting, such
-* as in xGEQPX from TOMS # 782). Good results will be obtained using
-* xGEQPX with properly (!) chosen numerical parameters.
-* Any improvement of ZGEQP3 improves overall performance of ZGEJSV.
-*
-* A * P1 = Q1 * [ R1^* 0]^*:
- DO 1963 p = 1, N
-* .. all columns are free columns
- IWORK(p) = 0
- 1963 CONTINUE
- CALL ZGEQP3( M, N, A, LDA, IWORK, CWORK, CWORK(N+1), LWORK-N,
- $ RWORK, IERR )
-*
-* The upper triangular matrix R1 from the first QRF is inspected for
-* rank deficiency and possibilities for deflation, or possible
-* ill-conditioning. Depending on the user specified flag L2RANK,
-* the procedure explores possibilities to reduce the numerical
-* rank by inspecting the computed upper triangular factor. If
-* L2RANK or L2ABER are up, then ZGEJSV will compute the SVD of
-* A + dA, where ||dA|| <= f(M,N)*EPSLN.
-*
- NR = 1
- IF ( L2ABER ) THEN
-* Standard absolute error bound suffices. All sigma_i with
-* sigma_i < N*EPSLN*||A|| are flushed to zero. This is an
-* aggressive enforcement of lower numerical rank by introducing a
-* backward error of the order of N*EPSLN*||A||.
- TEMP1 = SQRT(DBLE(N))*EPSLN
- DO 3001 p = 2, N
- IF ( ABS(A(p,p)) .GE. (TEMP1*ABS(A(1,1))) ) THEN
- NR = NR + 1
- ELSE
- GO TO 3002
- END IF
- 3001 CONTINUE
- 3002 CONTINUE
- ELSE IF ( L2RANK ) THEN
-* .. similarly as above, only slightly more gentle (less aggressive).
-* Sudden drop on the diagonal of R1 is used as the criterion for
-* close-to-rank-deficient.
- TEMP1 = SQRT(SFMIN)
- DO 3401 p = 2, N
- IF ( ( ABS(A(p,p)) .LT. (EPSLN*ABS(A(p-1,p-1))) ) .OR.
- $ ( ABS(A(p,p)) .LT. SMALL ) .OR.
- $ ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3402
- NR = NR + 1
- 3401 CONTINUE
- 3402 CONTINUE
-*
- ELSE
-* The goal is high relative accuracy. However, if the matrix
-* has high scaled condition number the relative accuracy is in
-* general not feasible. Later on, a condition number estimator
-* will be deployed to estimate the scaled condition number.
-* Here we just remove the underflowed part of the triangular
-* factor. This prevents the situation in which the code is
-* working hard to get the accuracy not warranted by the data.
- TEMP1 = SQRT(SFMIN)
- DO 3301 p = 2, N
- IF ( ( ABS(A(p,p)) .LT. SMALL ) .OR.
- $ ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3302
- NR = NR + 1
- 3301 CONTINUE
- 3302 CONTINUE
-*
- END IF
-*
- ALMORT = .FALSE.
- IF ( NR .EQ. N ) THEN
- MAXPRJ = ONE
- DO 3051 p = 2, N
- TEMP1 = ABS(A(p,p)) / SVA(IWORK(p))
- MAXPRJ = MIN( MAXPRJ, TEMP1 )
- 3051 CONTINUE
- IF ( MAXPRJ**2 .GE. ONE - DBLE(N)*EPSLN ) ALMORT = .TRUE.
- END IF
-*
-*
- SCONDA = - ONE
- CONDR1 = - ONE
- CONDR2 = - ONE
-*
- IF ( ERREST ) THEN
- IF ( N .EQ. NR ) THEN
- IF ( RSVEC ) THEN
-* .. V is available as workspace
- CALL ZLACPY( 'U', N, N, A, LDA, V, LDV )
- DO 3053 p = 1, N
- TEMP1 = SVA(IWORK(p))
- CALL ZDSCAL( p, ONE/TEMP1, V(1,p), 1 )
- 3053 CONTINUE
- IF ( LSVEC )THEN
- CALL ZPOCON( 'U', N, V, LDV, ONE, TEMP1,
- $ CWORK(N+1), RWORK, IERR )
- ELSE
- CALL ZPOCON( 'U', N, V, LDV, ONE, TEMP1,
- $ CWORK, RWORK, IERR )
- END IF
-*
- ELSE IF ( LSVEC ) THEN
-* .. U is available as workspace
- CALL ZLACPY( 'U', N, N, A, LDA, U, LDU )
- DO 3054 p = 1, N
- TEMP1 = SVA(IWORK(p))
- CALL ZDSCAL( p, ONE/TEMP1, U(1,p), 1 )
- 3054 CONTINUE
- CALL ZPOCON( 'U', N, U, LDU, ONE, TEMP1,
- $ CWORK(N+1), RWORK, IERR )
- ELSE
- CALL ZLACPY( 'U', N, N, A, LDA, CWORK, N )
-*[] CALL ZLACPY( 'U', N, N, A, LDA, CWORK(N+1), N )
-* Change: here index shifted by N to the left, CWORK(1:N)
-* not needed for SIGMA only computation
- DO 3052 p = 1, N
- TEMP1 = SVA(IWORK(p))
-*[] CALL ZDSCAL( p, ONE/TEMP1, CWORK(N+(p-1)*N+1), 1 )
- CALL ZDSCAL( p, ONE/TEMP1, CWORK((p-1)*N+1), 1 )
- 3052 CONTINUE
-* .. the columns of R are scaled to have unit Euclidean lengths.
-*[] CALL ZPOCON( 'U', N, CWORK(N+1), N, ONE, TEMP1,
-*[] $ CWORK(N+N*N+1), RWORK, IERR )
- CALL ZPOCON( 'U', N, CWORK, N, ONE, TEMP1,
- $ CWORK(N*N+1), RWORK, IERR )
-*
- END IF
- IF ( TEMP1 .NE. ZERO ) THEN
- SCONDA = ONE / SQRT(TEMP1)
- ELSE
- SCONDA = - ONE
- END IF
-* SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1).
-* N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA
- ELSE
- SCONDA = - ONE
- END IF
- END IF
-*
- L2PERT = L2PERT .AND. ( ABS( A(1,1)/A(NR,NR) ) .GT. SQRT(BIG1) )
-* If there is no violent scaling, artificial perturbation is not needed.
-*
-* Phase 3:
-*
- IF ( .NOT. ( RSVEC .OR. LSVEC ) ) THEN
-*
-* Singular Values only
-*
-* .. transpose A(1:NR,1:N)
- DO 1946 p = 1, MIN( N-1, NR )
- CALL ZCOPY( N-p, A(p,p+1), LDA, A(p+1,p), 1 )
- CALL ZLACGV( N-p+1, A(p,p), 1 )
- 1946 CONTINUE
- IF ( NR .EQ. N ) A(N,N) = CONJG(A(N,N))
-*
-* The following two DO-loops introduce small relative perturbation
-* into the strict upper triangle of the lower triangular matrix.
-* Small entries below the main diagonal are also changed.
-* This modification is useful if the computing environment does not
-* provide/allow FLUSH TO ZERO underflow, for it prevents many
-* annoying denormalized numbers in case of strongly scaled matrices.
-* The perturbation is structured so that it does not introduce any
-* new perturbation of the singular values, and it does not destroy
-* the job done by the preconditioner.
-* The licence for this perturbation is in the variable L2PERT, which
-* should be .FALSE. if FLUSH TO ZERO underflow is active.
-*
- IF ( .NOT. ALMORT ) THEN
-*
- IF ( L2PERT ) THEN
-* XSC = SQRT(SMALL)
- XSC = EPSLN / DBLE(N)
- DO 4947 q = 1, NR
- CTEMP = DCMPLX(XSC*ABS(A(q,q)),ZERO)
- DO 4949 p = 1, N
- IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) )
- $ .OR. ( p .LT. q ) )
-* $ A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) )
- $ A(p,q) = CTEMP
- 4949 CONTINUE
- 4947 CONTINUE
- ELSE
- CALL ZLASET( 'U', NR-1,NR-1, CZERO,CZERO, A(1,2),LDA )
- END IF
-*
-* .. second preconditioning using the QR factorization
-*
- CALL ZGEQRF( N,NR, A,LDA, CWORK, CWORK(N+1),LWORK-N, IERR )
-*
-* .. and transpose upper to lower triangular
- DO 1948 p = 1, NR - 1
- CALL ZCOPY( NR-p, A(p,p+1), LDA, A(p+1,p), 1 )
- CALL ZLACGV( NR-p+1, A(p,p), 1 )
- 1948 CONTINUE
-*
- END IF
-*
-* Row-cyclic Jacobi SVD algorithm with column pivoting
-*
-* .. again some perturbation (a "background noise") is added
-* to drown denormals
- IF ( L2PERT ) THEN
-* XSC = SQRT(SMALL)
- XSC = EPSLN / DBLE(N)
- DO 1947 q = 1, NR
- CTEMP = DCMPLX(XSC*ABS(A(q,q)),ZERO)
- DO 1949 p = 1, NR
- IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) )
- $ .OR. ( p .LT. q ) )
-* $ A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) )
- $ A(p,q) = CTEMP
- 1949 CONTINUE
- 1947 CONTINUE
- ELSE
- CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, A(1,2), LDA )
- END IF
-*
-* .. and one-sided Jacobi rotations are started on a lower
-* triangular matrix (plus perturbation which is ignored in
-* the part which destroys triangular form (confusing?!))
-*
- CALL ZGESVJ( 'L', 'N', 'N', NR, NR, A, LDA, SVA,
- $ N, V, LDV, CWORK, LWORK, RWORK, LRWORK, INFO )
-*
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
-*
-*
- ELSE IF ( ( RSVEC .AND. ( .NOT. LSVEC ) .AND. ( .NOT. JRACC ) )
- $ .OR.
- $ ( JRACC .AND. ( .NOT. LSVEC ) .AND. ( NR .NE. N ) ) ) THEN
-*
-* -> Singular Values and Right Singular Vectors <-
-*
- IF ( ALMORT ) THEN
-*
-* .. in this case NR equals N
- DO 1998 p = 1, NR
- CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
- CALL ZLACGV( N-p+1, V(p,p), 1 )
- 1998 CONTINUE
- CALL ZLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV )
-*
- CALL ZGESVJ( 'L','U','N', N, NR, V, LDV, SVA, NR, A, LDA,
- $ CWORK, LWORK, RWORK, LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
-
- ELSE
-*
-* .. two more QR factorizations ( one QRF is not enough, two require
-* accumulated product of Jacobi rotations, three are perfect )
-*
- CALL ZLASET( 'L', NR-1,NR-1, CZERO, CZERO, A(2,1), LDA )
- CALL ZGELQF( NR,N, A, LDA, CWORK, CWORK(N+1), LWORK-N, IERR)
- CALL ZLACPY( 'L', NR, NR, A, LDA, V, LDV )
- CALL ZLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV )
- CALL ZGEQRF( NR, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
- $ LWORK-2*N, IERR )
- DO 8998 p = 1, NR
- CALL ZCOPY( NR-p+1, V(p,p), LDV, V(p,p), 1 )
- CALL ZLACGV( NR-p+1, V(p,p), 1 )
- 8998 CONTINUE
- CALL ZLASET('U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV)
-*
- CALL ZGESVJ( 'L', 'U','N', NR, NR, V,LDV, SVA, NR, U,
- $ LDU, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
- IF ( NR .LT. N ) THEN
- CALL ZLASET( 'A',N-NR, NR, CZERO,CZERO, V(NR+1,1), LDV )
- CALL ZLASET( 'A',NR, N-NR, CZERO,CZERO, V(1,NR+1), LDV )
- CALL ZLASET( 'A',N-NR,N-NR,CZERO,CONE, V(NR+1,NR+1),LDV )
- END IF
-*
- CALL ZUNMLQ( 'L', 'C', N, N, NR, A, LDA, CWORK,
- $ V, LDV, CWORK(N+1), LWORK-N, IERR )
-*
- END IF
-* .. permute the rows of V
-* DO 8991 p = 1, N
-* CALL ZCOPY( N, V(p,1), LDV, A(IWORK(p),1), LDA )
-* 8991 CONTINUE
-* CALL ZLACPY( 'All', N, N, A, LDA, V, LDV )
- CALL ZLAPMR( .FALSE., N, N, V, LDV, IWORK )
-*
- IF ( TRANSP ) THEN
- CALL ZLACPY( 'A', N, N, V, LDV, U, LDU )
- END IF
-*
- ELSE IF ( JRACC .AND. (.NOT. LSVEC) .AND. ( NR.EQ. N ) ) THEN
-*
- CALL ZLASET( 'L', N-1,N-1, CZERO, CZERO, A(2,1), LDA )
-*
- CALL ZGESVJ( 'U','N','V', N, N, A, LDA, SVA, N, V, LDV,
- $ CWORK, LWORK, RWORK, LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
- CALL ZLAPMR( .FALSE., N, N, V, LDV, IWORK )
-*
- ELSE IF ( LSVEC .AND. ( .NOT. RSVEC ) ) THEN
-*
-* .. Singular Values and Left Singular Vectors ..
-*
-* .. second preconditioning step to avoid need to accumulate
-* Jacobi rotations in the Jacobi iterations.
- DO 1965 p = 1, NR
- CALL ZCOPY( N-p+1, A(p,p), LDA, U(p,p), 1 )
- CALL ZLACGV( N-p+1, U(p,p), 1 )
- 1965 CONTINUE
- CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )
-*
- CALL ZGEQRF( N, NR, U, LDU, CWORK(N+1), CWORK(2*N+1),
- $ LWORK-2*N, IERR )
-*
- DO 1967 p = 1, NR - 1
- CALL ZCOPY( NR-p, U(p,p+1), LDU, U(p+1,p), 1 )
- CALL ZLACGV( N-p+1, U(p,p), 1 )
- 1967 CONTINUE
- CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )
-*
- CALL ZGESVJ( 'L', 'U', 'N', NR,NR, U, LDU, SVA, NR, A,
- $ LDA, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
-*
- IF ( NR .LT. M ) THEN
- CALL ZLASET( 'A', M-NR, NR,CZERO, CZERO, U(NR+1,1), LDU )
- IF ( NR .LT. N1 ) THEN
- CALL ZLASET( 'A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU )
- CALL ZLASET( 'A',M-NR,N1-NR,CZERO,CONE,U(NR+1,NR+1),LDU )
- END IF
- END IF
-*
- CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
- $ LDU, CWORK(N+1), LWORK-N, IERR )
-*
- IF ( ROWPIV )
- $ CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
-*
- DO 1974 p = 1, N1
- XSC = ONE / DZNRM2( M, U(1,p), 1 )
- CALL ZDSCAL( M, XSC, U(1,p), 1 )
- 1974 CONTINUE
-*
- IF ( TRANSP ) THEN
- CALL ZLACPY( 'A', N, N, U, LDU, V, LDV )
- END IF
-*
- ELSE
-*
-* .. Full SVD ..
-*
- IF ( .NOT. JRACC ) THEN
-*
- IF ( .NOT. ALMORT ) THEN
-*
-* Second Preconditioning Step (QRF [with pivoting])
-* Note that the composition of TRANSPOSE, QRF and TRANSPOSE is
-* equivalent to an LQF CALL. Since in many libraries the QRF
-* seems to be better optimized than the LQF, we do explicit
-* transpose and use the QRF. This is subject to changes in an
-* optimized implementation of ZGEJSV.
-*
- DO 1968 p = 1, NR
- CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
- CALL ZLACGV( N-p+1, V(p,p), 1 )
- 1968 CONTINUE
-*
-* .. the following two loops perturb small entries to avoid
-* denormals in the second QR factorization, where they are
-* as good as zeros. This is done to avoid painfully slow
-* computation with denormals. The relative size of the perturbation
-* is a parameter that can be changed by the implementer.
-* This perturbation device will be obsolete on machines with
-* properly implemented arithmetic.
-* To switch it off, set L2PERT=.FALSE. To remove it from the
-* code, remove the action under L2PERT=.TRUE., leave the ELSE part.
-* The following two loops should be blocked and fused with the
-* transposed copy above.
-*
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL)
- DO 2969 q = 1, NR
- CTEMP = DCMPLX(XSC*ABS( V(q,q) ),ZERO)
- DO 2968 p = 1, N
- IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 )
- $ .OR. ( p .LT. q ) )
-* $ V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) )
- $ V(p,q) = CTEMP
- IF ( p .LT. q ) V(p,q) = - V(p,q)
- 2968 CONTINUE
- 2969 CONTINUE
- ELSE
- CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV )
- END IF
-*
-* Estimate the row scaled condition number of R1
-* (If R1 is rectangular, N > NR, then the condition number
-* of the leading NR x NR submatrix is estimated.)
-*
- CALL ZLACPY( 'L', NR, NR, V, LDV, CWORK(2*N+1), NR )
- DO 3950 p = 1, NR
- TEMP1 = DZNRM2(NR-p+1,CWORK(2*N+(p-1)*NR+p),1)
- CALL ZDSCAL(NR-p+1,ONE/TEMP1,CWORK(2*N+(p-1)*NR+p),1)
- 3950 CONTINUE
- CALL ZPOCON('L',NR,CWORK(2*N+1),NR,ONE,TEMP1,
- $ CWORK(2*N+NR*NR+1),RWORK,IERR)
- CONDR1 = ONE / SQRT(TEMP1)
-* .. here need a second opinion on the condition number
-* .. then assume worst case scenario
-* R1 is OK for inverse <=> CONDR1 .LT. DBLE(N)
-* more conservative <=> CONDR1 .LT. SQRT(DBLE(N))
-*
- COND_OK = SQRT(SQRT(DBLE(NR)))
-*[TP] COND_OK is a tuning parameter.
-*
- IF ( CONDR1 .LT. COND_OK ) THEN
-* .. the second QRF without pivoting. Note: in an optimized
-* implementation, this QRF should be implemented as the QRF
-* of a lower triangular matrix.
-* R1^* = Q2 * R2
- CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
- $ LWORK-2*N, IERR )
-*
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL)/EPSLN
- DO 3959 p = 2, NR
- DO 3958 q = 1, p - 1
- CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),
- $ ZERO)
- IF ( ABS(V(q,p)) .LE. TEMP1 )
-* $ V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) )
- $ V(q,p) = CTEMP
- 3958 CONTINUE
- 3959 CONTINUE
- END IF
-*
- IF ( NR .NE. N )
- $ CALL ZLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N )
-* .. save ...
-*
-* .. this transposed copy should be better than naive
- DO 1969 p = 1, NR - 1
- CALL ZCOPY( NR-p, V(p,p+1), LDV, V(p+1,p), 1 )
- CALL ZLACGV(NR-p+1, V(p,p), 1 )
- 1969 CONTINUE
- V(NR,NR)=CONJG(V(NR,NR))
-*
- CONDR2 = CONDR1
-*
- ELSE
-*
-* .. ill-conditioned case: second QRF with pivoting
-* Note that windowed pivoting would be equally good
-* numerically, and more run-time efficient. So, in
-* an optimal implementation, the next call to ZGEQP3
-* should be replaced with eg. CALL ZGEQPX (ACM TOMS #782)
-* with properly (carefully) chosen parameters.
-*
-* R1^* * P2 = Q2 * R2
- DO 3003 p = 1, NR
- IWORK(N+p) = 0
- 3003 CONTINUE
- CALL ZGEQP3( N, NR, V, LDV, IWORK(N+1), CWORK(N+1),
- $ CWORK(2*N+1), LWORK-2*N, RWORK, IERR )
-** CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
-** $ LWORK-2*N, IERR )
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL)
- DO 3969 p = 2, NR
- DO 3968 q = 1, p - 1
- CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),
- $ ZERO)
- IF ( ABS(V(q,p)) .LE. TEMP1 )
-* $ V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) )
- $ V(q,p) = CTEMP
- 3968 CONTINUE
- 3969 CONTINUE
- END IF
-*
- CALL ZLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N )
-*
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL)
- DO 8970 p = 2, NR
- DO 8971 q = 1, p - 1
- CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),
- $ ZERO)
-* V(p,q) = - TEMP1*( V(q,p) / ABS(V(q,p)) )
- V(p,q) = - CTEMP
- 8971 CONTINUE
- 8970 CONTINUE
- ELSE
- CALL ZLASET( 'L',NR-1,NR-1,CZERO,CZERO,V(2,1),LDV )
- END IF
-* Now, compute R2 = L3 * Q3, the LQ factorization.
- CALL ZGELQF( NR, NR, V, LDV, CWORK(2*N+N*NR+1),
- $ CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, IERR )
-* .. and estimate the condition number
- CALL ZLACPY( 'L',NR,NR,V,LDV,CWORK(2*N+N*NR+NR+1),NR )
- DO 4950 p = 1, NR
- TEMP1 = DZNRM2( p, CWORK(2*N+N*NR+NR+p), NR )
- CALL ZDSCAL( p, ONE/TEMP1, CWORK(2*N+N*NR+NR+p), NR )
- 4950 CONTINUE
- CALL ZPOCON( 'L',NR,CWORK(2*N+N*NR+NR+1),NR,ONE,TEMP1,
- $ CWORK(2*N+N*NR+NR+NR*NR+1),RWORK,IERR )
- CONDR2 = ONE / SQRT(TEMP1)
-*
-*
- IF ( CONDR2 .GE. COND_OK ) THEN
-* .. save the Householder vectors used for Q3
-* (this overwrites the copy of R2, as it will not be
-* needed in this branch, but it does not overwritte the
-* Huseholder vectors of Q2.).
- CALL ZLACPY( 'U', NR, NR, V, LDV, CWORK(2*N+1), N )
-* .. and the rest of the information on Q3 is in
-* WORK(2*N+N*NR+1:2*N+N*NR+N)
- END IF
-*
- END IF
-*
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL)
- DO 4968 q = 2, NR
- CTEMP = XSC * V(q,q)
- DO 4969 p = 1, q - 1
-* V(p,q) = - TEMP1*( V(p,q) / ABS(V(p,q)) )
- V(p,q) = - CTEMP
- 4969 CONTINUE
- 4968 CONTINUE
- ELSE
- CALL ZLASET( 'U', NR-1,NR-1, CZERO,CZERO, V(1,2), LDV )
- END IF
-*
-* Second preconditioning finished; continue with Jacobi SVD
-* The input matrix is lower trinagular.
-*
-* Recover the right singular vectors as solution of a well
-* conditioned triangular matrix equation.
-*
- IF ( CONDR1 .LT. COND_OK ) THEN
-*
- CALL ZGESVJ( 'L','U','N',NR,NR,V,LDV,SVA,NR,U, LDU,
- $ CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,RWORK,
- $ LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
- DO 3970 p = 1, NR
- CALL ZCOPY( NR, V(1,p), 1, U(1,p), 1 )
- CALL ZDSCAL( NR, SVA(p), V(1,p), 1 )
- 3970 CONTINUE
-
-* .. pick the right matrix equation and solve it
-*
- IF ( NR .EQ. N ) THEN
-* :)) .. best case, R1 is inverted. The solution of this matrix
-* equation is Q2*V2 = the product of the Jacobi rotations
-* used in ZGESVJ, premultiplied with the orthogonal matrix
-* from the second QR factorization.
- CALL ZTRSM('L','U','N','N', NR,NR,CONE, A,LDA, V,LDV)
- ELSE
-* .. R1 is well conditioned, but non-square. Adjoint of R2
-* is inverted to get the product of the Jacobi rotations
-* used in ZGESVJ. The Q-factor from the second QR
-* factorization is then built in explicitly.
- CALL ZTRSM('L','U','C','N',NR,NR,CONE,CWORK(2*N+1),
- $ N,V,LDV)
- IF ( NR .LT. N ) THEN
- CALL ZLASET('A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV)
- CALL ZLASET('A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV)
- CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)
- END IF
- CALL ZUNMQR('L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
- $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR)
- END IF
-*
- ELSE IF ( CONDR2 .LT. COND_OK ) THEN
-*
-* The matrix R2 is inverted. The solution of the matrix equation
-* is Q3^* * V3 = the product of the Jacobi rotations (appplied to
-* the lower triangular L3 from the LQ factorization of
-* R2=L3*Q3), pre-multiplied with the transposed Q3.
- CALL ZGESVJ( 'L', 'U', 'N', NR, NR, V, LDV, SVA, NR, U,
- $ LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR,
- $ RWORK, LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
- DO 3870 p = 1, NR
- CALL ZCOPY( NR, V(1,p), 1, U(1,p), 1 )
- CALL ZDSCAL( NR, SVA(p), U(1,p), 1 )
- 3870 CONTINUE
- CALL ZTRSM('L','U','N','N',NR,NR,CONE,CWORK(2*N+1),N,
- $ U,LDU)
-* .. apply the permutation from the second QR factorization
- DO 873 q = 1, NR
- DO 872 p = 1, NR
- CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q)
- 872 CONTINUE
- DO 874 p = 1, NR
- U(p,q) = CWORK(2*N+N*NR+NR+p)
- 874 CONTINUE
- 873 CONTINUE
- IF ( NR .LT. N ) THEN
- CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )
- CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )
- CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)
- END IF
- CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
- $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
- ELSE
-* Last line of defense.
-* #:( This is a rather pathological case: no scaled condition
-* improvement after two pivoted QR factorizations. Other
-* possibility is that the rank revealing QR factorization
-* or the condition estimator has failed, or the COND_OK
-* is set very close to ONE (which is unnecessary). Normally,
-* this branch should never be executed, but in rare cases of
-* failure of the RRQR or condition estimator, the last line of
-* defense ensures that ZGEJSV completes the task.
-* Compute the full SVD of L3 using ZGESVJ with explicit
-* accumulation of Jacobi rotations.
- CALL ZGESVJ( 'L', 'U', 'V', NR, NR, V, LDV, SVA, NR, U,
- $ LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR,
- $ RWORK, LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
- IF ( NR .LT. N ) THEN
- CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )
- CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )
- CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)
- END IF
- CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
- $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
-*
- CALL ZUNMLQ( 'L', 'C', NR, NR, NR, CWORK(2*N+1), N,
- $ CWORK(2*N+N*NR+1), U, LDU, CWORK(2*N+N*NR+NR+1),
- $ LWORK-2*N-N*NR-NR, IERR )
- DO 773 q = 1, NR
- DO 772 p = 1, NR
- CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q)
- 772 CONTINUE
- DO 774 p = 1, NR
- U(p,q) = CWORK(2*N+N*NR+NR+p)
- 774 CONTINUE
- 773 CONTINUE
-*
- END IF
-*
-* Permute the rows of V using the (column) permutation from the
-* first QRF. Also, scale the columns to make them unit in
-* Euclidean norm. This applies to all cases.
-*
- TEMP1 = SQRT(DBLE(N)) * EPSLN
- DO 1972 q = 1, N
- DO 972 p = 1, N
- CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q)
- 972 CONTINUE
- DO 973 p = 1, N
- V(p,q) = CWORK(2*N+N*NR+NR+p)
- 973 CONTINUE
- XSC = ONE / DZNRM2( N, V(1,q), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL ZDSCAL( N, XSC, V(1,q), 1 )
- 1972 CONTINUE
-* At this moment, V contains the right singular vectors of A.
-* Next, assemble the left singular vector matrix U (M x N).
- IF ( NR .LT. M ) THEN
- CALL ZLASET('A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU)
- IF ( NR .LT. N1 ) THEN
- CALL ZLASET('A',NR,N1-NR,CZERO,CZERO,U(1,NR+1),LDU)
- CALL ZLASET('A',M-NR,N1-NR,CZERO,CONE,
- $ U(NR+1,NR+1),LDU)
- END IF
- END IF
-*
-* The Q matrix from the first QRF is built into the left singular
-* matrix U. This applies to all cases.
-*
- CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
- $ LDU, CWORK(N+1), LWORK-N, IERR )
-
-* The columns of U are normalized. The cost is O(M*N) flops.
- TEMP1 = SQRT(DBLE(M)) * EPSLN
- DO 1973 p = 1, NR
- XSC = ONE / DZNRM2( M, U(1,p), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL ZDSCAL( M, XSC, U(1,p), 1 )
- 1973 CONTINUE
-*
-* If the initial QRF is computed with row pivoting, the left
-* singular vectors must be adjusted.
-*
- IF ( ROWPIV )
- $ CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
-*
- ELSE
-*
-* .. the initial matrix A has almost orthogonal columns and
-* the second QRF is not needed
-*
- CALL ZLACPY( 'U', N, N, A, LDA, CWORK(N+1), N )
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL)
- DO 5970 p = 2, N
- CTEMP = XSC * CWORK( N + (p-1)*N + p )
- DO 5971 q = 1, p - 1
-* CWORK(N+(q-1)*N+p)=-TEMP1 * ( CWORK(N+(p-1)*N+q) /
-* $ ABS(CWORK(N+(p-1)*N+q)) )
- CWORK(N+(q-1)*N+p)=-CTEMP
- 5971 CONTINUE
- 5970 CONTINUE
- ELSE
- CALL ZLASET( 'L',N-1,N-1,CZERO,CZERO,CWORK(N+2),N )
- END IF
-*
- CALL ZGESVJ( 'U', 'U', 'N', N, N, CWORK(N+1), N, SVA,
- $ N, U, LDU, CWORK(N+N*N+1), LWORK-N-N*N, RWORK, LRWORK,
- $ INFO )
-*
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
- DO 6970 p = 1, N
- CALL ZCOPY( N, CWORK(N+(p-1)*N+1), 1, U(1,p), 1 )
- CALL ZDSCAL( N, SVA(p), CWORK(N+(p-1)*N+1), 1 )
- 6970 CONTINUE
-*
- CALL ZTRSM( 'L', 'U', 'N', 'N', N, N,
- $ CONE, A, LDA, CWORK(N+1), N )
- DO 6972 p = 1, N
- CALL ZCOPY( N, CWORK(N+p), N, V(IWORK(p),1), LDV )
- 6972 CONTINUE
- TEMP1 = SQRT(DBLE(N))*EPSLN
- DO 6971 p = 1, N
- XSC = ONE / DZNRM2( N, V(1,p), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL ZDSCAL( N, XSC, V(1,p), 1 )
- 6971 CONTINUE
-*
-* Assemble the left singular vector matrix U (M x N).
-*
- IF ( N .LT. M ) THEN
- CALL ZLASET( 'A', M-N, N, CZERO, CZERO, U(N+1,1), LDU )
- IF ( N .LT. N1 ) THEN
- CALL ZLASET('A',N, N1-N, CZERO, CZERO, U(1,N+1),LDU)
- CALL ZLASET( 'A',M-N,N1-N, CZERO, CONE,U(N+1,N+1),LDU)
- END IF
- END IF
- CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
- $ LDU, CWORK(N+1), LWORK-N, IERR )
- TEMP1 = SQRT(DBLE(M))*EPSLN
- DO 6973 p = 1, N1
- XSC = ONE / DZNRM2( M, U(1,p), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL ZDSCAL( M, XSC, U(1,p), 1 )
- 6973 CONTINUE
-*
- IF ( ROWPIV )
- $ CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
-*
- END IF
-*
-* end of the >> almost orthogonal case << in the full SVD
-*
- ELSE
-*
-* This branch deploys a preconditioned Jacobi SVD with explicitly
-* accumulated rotations. It is included as optional, mainly for
-* experimental purposes. It does perform well, and can also be used.
-* In this implementation, this branch will be automatically activated
-* if the condition number sigma_max(A) / sigma_min(A) is predicted
-* to be greater than the overflow threshold. This is because the
-* a posteriori computation of the singular vectors assumes robust
-* implementation of BLAS and some LAPACK procedures, capable of working
-* in presence of extreme values, e.g. when the singular values spread from
-* the underflow to the overflow threshold.
-*
- DO 7968 p = 1, NR
- CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
- CALL ZLACGV( N-p+1, V(p,p), 1 )
- 7968 CONTINUE
-*
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL/EPSLN)
- DO 5969 q = 1, NR
- CTEMP = DCMPLX(XSC*ABS( V(q,q) ),ZERO)
- DO 5968 p = 1, N
- IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 )
- $ .OR. ( p .LT. q ) )
-* $ V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) )
- $ V(p,q) = CTEMP
- IF ( p .LT. q ) V(p,q) = - V(p,q)
- 5968 CONTINUE
- 5969 CONTINUE
- ELSE
- CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV )
- END IF
-
- CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
- $ LWORK-2*N, IERR )
- CALL ZLACPY( 'L', N, NR, V, LDV, CWORK(2*N+1), N )
-*
- DO 7969 p = 1, NR
- CALL ZCOPY( NR-p+1, V(p,p), LDV, U(p,p), 1 )
- CALL ZLACGV( NR-p+1, U(p,p), 1 )
- 7969 CONTINUE
-
- IF ( L2PERT ) THEN
- XSC = SQRT(SMALL/EPSLN)
- DO 9970 q = 2, NR
- DO 9971 p = 1, q - 1
- CTEMP = DCMPLX(XSC * MIN(ABS(U(p,p)),ABS(U(q,q))),
- $ ZERO)
-* U(p,q) = - TEMP1 * ( U(q,p) / ABS(U(q,p)) )
- U(p,q) = - CTEMP
- 9971 CONTINUE
- 9970 CONTINUE
- ELSE
- CALL ZLASET('U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )
- END IF
-
- CALL ZGESVJ( 'L', 'U', 'V', NR, NR, U, LDU, SVA,
- $ N, V, LDV, CWORK(2*N+N*NR+1), LWORK-2*N-N*NR,
- $ RWORK, LRWORK, INFO )
- SCALEM = RWORK(1)
- NUMRANK = NINT(RWORK(2))
-
- IF ( NR .LT. N ) THEN
- CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )
- CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )
- CALL ZLASET( 'A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV )
- END IF
-
- CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
- $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
-*
-* Permute the rows of V using the (column) permutation from the
-* first QRF. Also, scale the columns to make them unit in
-* Euclidean norm. This applies to all cases.
-*
- TEMP1 = SQRT(DBLE(N)) * EPSLN
- DO 7972 q = 1, N
- DO 8972 p = 1, N
- CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q)
- 8972 CONTINUE
- DO 8973 p = 1, N
- V(p,q) = CWORK(2*N+N*NR+NR+p)
- 8973 CONTINUE
- XSC = ONE / DZNRM2( N, V(1,q), 1 )
- IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
- $ CALL ZDSCAL( N, XSC, V(1,q), 1 )
- 7972 CONTINUE
-*
-* At this moment, V contains the right singular vectors of A.
-* Next, assemble the left singular vector matrix U (M x N).
-*
- IF ( NR .LT. M ) THEN
- CALL ZLASET( 'A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU )
- IF ( NR .LT. N1 ) THEN
- CALL ZLASET('A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU)
- CALL ZLASET('A',M-NR,N1-NR, CZERO, CONE,U(NR+1,NR+1),LDU)
- END IF
- END IF
-*
- CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
- $ LDU, CWORK(N+1), LWORK-N, IERR )
-*
- IF ( ROWPIV )
- $ CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
-*
-*
- END IF
- IF ( TRANSP ) THEN
-* .. swap U and V because the procedure worked on A^*
- DO 6974 p = 1, N
- CALL ZSWAP( N, U(1,p), 1, V(1,p), 1 )
- 6974 CONTINUE
- END IF
-*
- END IF
-* end of the full SVD
-*
-* Undo scaling, if necessary (and possible)
-*
- IF ( USCAL2 .LE. (BIG/SVA(1))*USCAL1 ) THEN
- CALL DLASCL( 'G', 0, 0, USCAL1, USCAL2, NR, 1, SVA, N, IERR )
- USCAL1 = ONE
- USCAL2 = ONE
- END IF
-*
- IF ( NR .LT. N ) THEN
- DO 3004 p = NR+1, N
- SVA(p) = ZERO
- 3004 CONTINUE
- END IF
-*
- RWORK(1) = USCAL2 * SCALEM
- RWORK(2) = USCAL1
- IF ( ERREST ) RWORK(3) = SCONDA
- IF ( LSVEC .AND. RSVEC ) THEN
- RWORK(4) = CONDR1
- RWORK(5) = CONDR2
- END IF
- IF ( L2TRAN ) THEN
- RWORK(6) = ENTRA
- RWORK(7) = ENTRAT
- END IF
-*
- IWORK(1) = NR
- IWORK(2) = NUMRANK
- IWORK(3) = WARNING
- IF ( TRANSP ) THEN
- IWORK(4) = 1
- ELSE
- IWORK(4) = -1
- END IF
-
-*
- RETURN
-* ..
-* .. END OF ZGEJSV
-* ..
- END
-*
diff --git a/lapack-netlib/zgesvx.f b/lapack-netlib/zgesvx.f
deleted file mode 100644
index 3b193a1b2a..0000000000
--- a/lapack-netlib/zgesvx.f
+++ /dev/null
@@ -1,602 +0,0 @@
-*> \brief ZGESVX computes the solution to system of linear equations A * X = B for GE matrices
-*
-* =========== DOCUMENTATION ===========
-*
-* Online html documentation available at
-* http://www.netlib.org/lapack/explore-html/
-*
-*> \htmlonly
-*> Download ZGESVX + dependencies
-*>
-*> [TGZ]
-*>
-*> [ZIP]
-*>
-*> [TXT]
-*> \endhtmlonly
-*
-* Definition:
-* ===========
-*
-* SUBROUTINE ZGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
-* EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
-* WORK, RWORK, INFO )
-*
-* .. Scalar Arguments ..
-* CHARACTER EQUED, FACT, TRANS
-* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
-* DOUBLE PRECISION RCOND
-* ..
-* .. Array Arguments ..
-* INTEGER IPIV( * )
-* DOUBLE PRECISION BERR( * ), C( * ), FERR( * ), R( * ),
-* $ RWORK( * )
-* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
-* $ WORK( * ), X( LDX, * )
-* ..
-*
-*
-*> \par Purpose:
-* =============
-*>
-*> \verbatim
-*>
-*> ZGESVX uses the LU factorization to compute the solution to a complex
-*> system of linear equations
-*> A * X = B,
-*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*>
-*> Error bounds on the solution and a condition estimate are also
-*> provided.
-*> \endverbatim
-*
-*> \par Description:
-* =================
-*>
-*> \verbatim
-*>
-*> The following steps are performed:
-*>
-*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
-*> the system:
-*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*> Whether or not the system will be equilibrated depends on the
-*> scaling of the matrix A, but if equilibration is used, A is
-*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-*> or diag(C)*B (if TRANS = 'T' or 'C').
-*>
-*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-*> matrix A (after equilibration if FACT = 'E') as
-*> A = P * L * U,
-*> where P is a permutation matrix, L is a unit lower triangular
-*> matrix, and U is upper triangular.
-*>
-*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-*> returns with INFO = i. Otherwise, the factored form of A is used
-*> to estimate the condition number of the matrix A. If the
-*> reciprocal of the condition number is less than machine precision,
-*> INFO = N+1 is returned as a warning, but the routine still goes on
-*> to solve for X and compute error bounds as described below.
-*>
-*> 4. The system of equations is solved for X using the factored form
-*> of A.
-*>
-*> 5. Iterative refinement is applied to improve the computed solution
-*> matrix and calculate error bounds and backward error estimates
-*> for it.
-*>
-*> 6. If equilibration was used, the matrix X is premultiplied by
-*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-*> that it solves the original system before equilibration.
-*> \endverbatim
-*
-* Arguments:
-* ==========
-*
-*> \param[in] FACT
-*> \verbatim
-*> FACT is CHARACTER*1
-*> Specifies whether or not the factored form of the matrix A is
-*> supplied on entry, and if not, whether the matrix A should be
-*> equilibrated before it is factored.
-*> = 'F': On entry, AF and IPIV contain the factored form of A.
-*> If EQUED is not 'N', the matrix A has been
-*> equilibrated with scaling factors given by R and C.
-*> A, AF, and IPIV are not modified.
-*> = 'N': The matrix A will be copied to AF and factored.
-*> = 'E': The matrix A will be equilibrated if necessary, then
-*> copied to AF and factored.
-*> \endverbatim
-*>
-*> \param[in] TRANS
-*> \verbatim
-*> TRANS is CHARACTER*1
-*> Specifies the form of the system of equations:
-*> = 'N': A * X = B (No transpose)
-*> = 'T': A**T * X = B (Transpose)
-*> = 'C': A**H * X = B (Conjugate transpose)
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*> N is INTEGER
-*> The number of linear equations, i.e., the order of the
-*> matrix A. N >= 0.
-*> \endverbatim
-*>
-*> \param[in] NRHS
-*> \verbatim
-*> NRHS is INTEGER
-*> The number of right hand sides, i.e., the number of columns
-*> of the matrices B and X. NRHS >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] A
-*> \verbatim
-*> A is COMPLEX*16 array, dimension (LDA,N)
-*> On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
-*> not 'N', then A must have been equilibrated by the scaling
-*> factors in R and/or C. A is not modified if FACT = 'F' or
-*> 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*>
-*> On exit, if EQUED .ne. 'N', A is scaled as follows:
-*> EQUED = 'R': A := diag(R) * A
-*> EQUED = 'C': A := A * diag(C)
-*> EQUED = 'B': A := diag(R) * A * diag(C).
-*> \endverbatim
-*>
-*> \param[in] LDA
-*> \verbatim
-*> LDA is INTEGER
-*> The leading dimension of the array A. LDA >= max(1,N).
-*> \endverbatim
-*>
-*> \param[in,out] AF
-*> \verbatim
-*> AF is COMPLEX*16 array, dimension (LDAF,N)
-*> If FACT = 'F', then AF is an input argument and on entry
-*> contains the factors L and U from the factorization
-*> A = P*L*U as computed by ZGETRF. If EQUED .ne. 'N', then
-*> AF is the factored form of the equilibrated matrix A.
-*>
-*> If FACT = 'N', then AF is an output argument and on exit
-*> returns the factors L and U from the factorization A = P*L*U
-*> of the original matrix A.
-*>
-*> If FACT = 'E', then AF is an output argument and on exit
-*> returns the factors L and U from the factorization A = P*L*U
-*> of the equilibrated matrix A (see the description of A for
-*> the form of the equilibrated matrix).
-*> \endverbatim
-*>
-*> \param[in] LDAF
-*> \verbatim
-*> LDAF is INTEGER
-*> The leading dimension of the array AF. LDAF >= max(1,N).
-*> \endverbatim
-*>
-*> \param[in,out] IPIV
-*> \verbatim
-*> IPIV is INTEGER array, dimension (N)
-*> If FACT = 'F', then IPIV is an input argument and on entry
-*> contains the pivot indices from the factorization A = P*L*U
-*> as computed by ZGETRF; row i of the matrix was interchanged
-*> with row IPIV(i).
-*>
-*> If FACT = 'N', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = P*L*U
-*> of the original matrix A.
-*>
-*> If FACT = 'E', then IPIV is an output argument and on exit
-*> contains the pivot indices from the factorization A = P*L*U
-*> of the equilibrated matrix A.
-*> \endverbatim
-*>
-*> \param[in,out] EQUED
-*> \verbatim
-*> EQUED is CHARACTER*1
-*> Specifies the form of equilibration that was done.
-*> = 'N': No equilibration (always true if FACT = 'N').
-*> = 'R': Row equilibration, i.e., A has been premultiplied by
-*> diag(R).
-*> = 'C': Column equilibration, i.e., A has been postmultiplied
-*> by diag(C).
-*> = 'B': Both row and column equilibration, i.e., A has been
-*> replaced by diag(R) * A * diag(C).
-*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
-*> output argument.
-*> \endverbatim
-*>
-*> \param[in,out] R
-*> \verbatim
-*> R is DOUBLE PRECISION array, dimension (N)
-*> The row scale factors for A. If EQUED = 'R' or 'B', A is
-*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-*> is not accessed. R is an input argument if FACT = 'F';
-*> otherwise, R is an output argument. If FACT = 'F' and
-*> EQUED = 'R' or 'B', each element of R must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] C
-*> \verbatim
-*> C is DOUBLE PRECISION array, dimension (N)
-*> The column scale factors for A. If EQUED = 'C' or 'B', A is
-*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-*> is not accessed. C is an input argument if FACT = 'F';
-*> otherwise, C is an output argument. If FACT = 'F' and
-*> EQUED = 'C' or 'B', each element of C must be positive.
-*> \endverbatim
-*>
-*> \param[in,out] B
-*> \verbatim
-*> B is COMPLEX*16 array, dimension (LDB,NRHS)
-*> On entry, the N-by-NRHS right hand side matrix B.
-*> On exit,
-*> if EQUED = 'N', B is not modified;
-*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-*> diag(R)*B;
-*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-*> overwritten by diag(C)*B.
-*> \endverbatim
-*>
-*> \param[in] LDB
-*> \verbatim
-*> LDB is INTEGER
-*> The leading dimension of the array B. LDB >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] X
-*> \verbatim
-*> X is COMPLEX*16 array, dimension (LDX,NRHS)
-*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-*> to the original system of equations. Note that A and B are
-*> modified on exit if EQUED .ne. 'N', and the solution to the
-*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-*> and EQUED = 'R' or 'B'.
-*> \endverbatim
-*>
-*> \param[in] LDX
-*> \verbatim
-*> LDX is INTEGER
-*> The leading dimension of the array X. LDX >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] RCOND
-*> \verbatim
-*> RCOND is DOUBLE PRECISION
-*> The estimate of the reciprocal condition number of the matrix
-*> A after equilibration (if done). If RCOND is less than the
-*> machine precision (in particular, if RCOND = 0), the matrix
-*> is singular to working precision. This condition is
-*> indicated by a return code of INFO > 0.
-*> \endverbatim
-*>
-*> \param[out] FERR
-*> \verbatim
-*> FERR is DOUBLE PRECISION array, dimension (NRHS)
-*> The estimated forward error bound for each solution vector
-*> X(j) (the j-th column of the solution matrix X).
-*> If XTRUE is the true solution corresponding to X(j), FERR(j)
-*> is an estimated upper bound for the magnitude of the largest
-*> element in (X(j) - XTRUE) divided by the magnitude of the
-*> largest element in X(j). The estimate is as reliable as
-*> the estimate for RCOND, and is almost always a slight
-*> overestimate of the true error.
-*> \endverbatim
-*>
-*> \param[out] BERR
-*> \verbatim
-*> BERR is DOUBLE PRECISION array, dimension (NRHS)
-*> The componentwise relative backward error of each solution
-*> vector X(j) (i.e., the smallest relative change in
-*> any element of A or B that makes X(j) an exact solution).
-*> \endverbatim
-*>
-*> \param[out] WORK
-*> \verbatim
-*> WORK is COMPLEX*16 array, dimension (2*N)
-*> \endverbatim
-*>
-*> \param[out] RWORK
-*> \verbatim
-*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,2*N))
-*> On exit, RWORK(1) contains the reciprocal pivot growth
-*> factor norm(A)/norm(U). The "max absolute element" norm is
-*> used. If RWORK(1) is much less than 1, then the stability
-*> of the LU factorization of the (equilibrated) matrix A
-*> could be poor. This also means that the solution X, condition
-*> estimator RCOND, and forward error bound FERR could be
-*> unreliable. If factorization fails with 0 RWORK(1) contains the reciprocal pivot growth factor for the
-*> leading INFO columns of A.
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*> INFO is INTEGER
-*> = 0: successful exit
-*> < 0: if INFO = -i, the i-th argument had an illegal value
-*> > 0: if INFO = i, and i is
-*> <= N: U(i,i) is exactly zero. The factorization has
-*> been completed, but the factor U is exactly
-*> singular, so the solution and error bounds
-*> could not be computed. RCOND = 0 is returned.
-*> = N+1: U is nonsingular, but RCOND is less than machine
-*> precision, meaning that the matrix is singular
-*> to working precision. Nevertheless, the
-*> solution and error bounds are computed because
-*> there are a number of situations where the
-*> computed solution can be more accurate than the
-*> value of RCOND would suggest.
-*> \endverbatim
-*
-* Authors:
-* ========
-*
-*> \author Univ. of Tennessee
-*> \author Univ. of California Berkeley
-*> \author Univ. of Colorado Denver
-*> \author NAG Ltd.
-*
-*> \ingroup complex16GEsolve
-*
-* =====================================================================
- SUBROUTINE ZGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
- $ EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
- $ WORK, RWORK, INFO )
-*
-* -- LAPACK driver routine --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER EQUED, FACT, TRANS
- INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
- DOUBLE PRECISION RCOND
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION BERR( * ), C( * ), FERR( * ), R( * ),
- $ RWORK( * )
- COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
- $ WORK( * ), X( LDX, * )
-* ..
-*
-* =====================================================================
-*
-* .. Parameters ..
- DOUBLE PRECISION ZERO, ONE
- PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 )
-* ..
-* .. Local Scalars ..
- LOGICAL COLEQU, EQUIL, NOFACT, NOTRAN, ROWEQU
- CHARACTER NORM
- INTEGER I, INFEQU, J
- DOUBLE PRECISION AMAX, ANORM, BIGNUM, COLCND, RCMAX, RCMIN,
- $ ROWCND, RPVGRW, SMLNUM
-* ..
-* .. External Functions ..
- LOGICAL LSAME
- DOUBLE PRECISION DLAMCH, ZLANGE, ZLANTR
- EXTERNAL LSAME, DLAMCH, ZLANGE, ZLANTR
-* ..
-* .. External Subroutines ..
- EXTERNAL XERBLA, ZGECON, ZGEEQU, ZGERFS, ZGETRF, ZGETRS,
- $ ZLACPY, ZLAQGE
-* ..
-* .. Intrinsic Functions ..
- INTRINSIC MAX, MIN
-* ..
-* .. Executable Statements ..
-*
- INFO = 0
- NOFACT = LSAME( FACT, 'N' )
- EQUIL = LSAME( FACT, 'E' )
- NOTRAN = LSAME( TRANS, 'N' )
- IF( NOFACT .OR. EQUIL ) THEN
- EQUED = 'N'
- ROWEQU = .FALSE.
- COLEQU = .FALSE.
- ELSE
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- SMLNUM = DLAMCH( 'Safe minimum' )
- BIGNUM = ONE / SMLNUM
- END IF
-*
-* Test the input parameters.
-*
- IF( .NOT.NOFACT .AND. .NOT.EQUIL .AND. .NOT.LSAME( FACT, 'F' ) )
- $ THEN
- INFO = -1
- ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
- $ LSAME( TRANS, 'C' ) ) THEN
- INFO = -2
- ELSE IF( N.LT.0 ) THEN
- INFO = -3
- ELSE IF( NRHS.LT.0 ) THEN
- INFO = -4
- ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
- INFO = -6
- ELSE IF( LDAF.LT.MAX( 1, N ) ) THEN
- INFO = -8
- ELSE IF( LSAME( FACT, 'F' ) .AND. .NOT.
- $ ( ROWEQU .OR. COLEQU .OR. LSAME( EQUED, 'N' ) ) ) THEN
- INFO = -10
- ELSE
- IF( ROWEQU ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 10 J = 1, N
- RCMIN = MIN( RCMIN, R( J ) )
- RCMAX = MAX( RCMAX, R( J ) )
- 10 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -11
- ELSE IF( N.GT.0 ) THEN
- ROWCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- ROWCND = ONE
- END IF
- END IF
- IF( COLEQU .AND. INFO.EQ.0 ) THEN
- RCMIN = BIGNUM
- RCMAX = ZERO
- DO 20 J = 1, N
- RCMIN = MIN( RCMIN, C( J ) )
- RCMAX = MAX( RCMAX, C( J ) )
- 20 CONTINUE
- IF( RCMIN.LE.ZERO ) THEN
- INFO = -12
- ELSE IF( N.GT.0 ) THEN
- COLCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
- ELSE
- COLCND = ONE
- END IF
- END IF
- IF( INFO.EQ.0 ) THEN
- IF( LDB.LT.MAX( 1, N ) ) THEN
- INFO = -14
- ELSE IF( LDX.LT.MAX( 1, N ) ) THEN
- INFO = -16
- END IF
- END IF
- END IF
-*
- IF( INFO.NE.0 ) THEN
- CALL XERBLA( 'ZGESVX', -INFO )
- RETURN
- END IF
-*
- IF( EQUIL ) THEN
-*
-* Compute row and column scalings to equilibrate the matrix A.
-*
- CALL ZGEEQU( N, N, A, LDA, R, C, ROWCND, COLCND, AMAX, INFEQU )
- IF( INFEQU.EQ.0 ) THEN
-*
-* Equilibrate the matrix.
-*
- CALL ZLAQGE( N, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
- $ EQUED )
- ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
- COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
- END IF
- END IF
-*
-* Scale the right hand side.
-*
- IF( NOTRAN ) THEN
- IF( ROWEQU ) THEN
- DO 40 J = 1, NRHS
- DO 30 I = 1, N
- B( I, J ) = R( I )*B( I, J )
- 30 CONTINUE
- 40 CONTINUE
- END IF
- ELSE IF( COLEQU ) THEN
- DO 60 J = 1, NRHS
- DO 50 I = 1, N
- B( I, J ) = C( I )*B( I, J )
- 50 CONTINUE
- 60 CONTINUE
- END IF
-*
- IF( NOFACT .OR. EQUIL ) THEN
-*
-* Compute the LU factorization of A.
-*
- CALL ZLACPY( 'Full', N, N, A, LDA, AF, LDAF )
- CALL ZGETRF( N, N, AF, LDAF, IPIV, INFO )
-*
-* Return if INFO is non-zero.
-*
- IF( INFO.GT.0 ) THEN
-*
-* Compute the reciprocal pivot growth factor of the
-* leading rank-deficient INFO columns of A.
-*
- RPVGRW = ZLANTR( 'M', 'U', 'N', INFO, INFO, AF, LDAF,
- $ RWORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = ZLANGE( 'M', N, INFO, A, LDA, RWORK ) /
- $ RPVGRW
- END IF
- RWORK( 1 ) = RPVGRW
- RCOND = ZERO
- RETURN
- END IF
- END IF
-*
-* Compute the norm of the matrix A and the
-* reciprocal pivot growth factor RPVGRW.
-*
- IF( NOTRAN ) THEN
- NORM = '1'
- ELSE
- NORM = 'I'
- END IF
- ANORM = ZLANGE( NORM, N, N, A, LDA, RWORK )
- RPVGRW = ZLANTR( 'M', 'U', 'N', N, N, AF, LDAF, RWORK )
- IF( RPVGRW.EQ.ZERO ) THEN
- RPVGRW = ONE
- ELSE
- RPVGRW = ZLANGE( 'M', N, N, A, LDA, RWORK ) / RPVGRW
- END IF
-*
-* Compute the reciprocal of the condition number of A.
-*
- CALL ZGECON( NORM, N, AF, LDAF, ANORM, RCOND, WORK, RWORK, INFO )
-*
-* Compute the solution matrix X.
-*
- CALL ZLACPY( 'Full', N, NRHS, B, LDB, X, LDX )
- CALL ZGETRS( TRANS, N, NRHS, AF, LDAF, IPIV, X, LDX, INFO )
-*
-* Use iterative refinement to improve the computed solution and
-* compute error bounds and backward error estimates for it.
-*
- CALL ZGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, X,
- $ LDX, FERR, BERR, WORK, RWORK, INFO )
-*
-* Transform the solution matrix X to a solution of the original
-* system.
-*
- IF( NOTRAN ) THEN
- IF( COLEQU ) THEN
- DO 80 J = 1, NRHS
- DO 70 I = 1, N
- X( I, J ) = C( I )*X( I, J )
- 70 CONTINUE
- 80 CONTINUE
- DO 90 J = 1, NRHS
- FERR( J ) = FERR( J ) / COLCND
- 90 CONTINUE
- END IF
- ELSE IF( ROWEQU ) THEN
- DO 110 J = 1, NRHS
- DO 100 I = 1, N
- X( I, J ) = R( I )*X( I, J )
- 100 CONTINUE
- 110 CONTINUE
- DO 120 J = 1, NRHS
- FERR( J ) = FERR( J ) / ROWCND
- 120 CONTINUE
- END IF
-*
-* Set INFO = N+1 if the matrix is singular to working precision.
-*
- IF( RCOND.LT.DLAMCH( 'Epsilon' ) )
- $ INFO = N + 1
-*
- RWORK( 1 ) = RPVGRW
- RETURN
-*
-* End of ZGESVX
-*
- END
diff --git a/lapack/potrf/potrf_parallel.c b/lapack/potrf/potrf_parallel.c
index a7c28f4c22..c38a2632d5 100644
--- a/lapack/potrf/potrf_parallel.c
+++ b/lapack/potrf/potrf_parallel.c
@@ -105,6 +105,14 @@ typedef struct {
BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE];
} job_t;
+#ifdef HAVE_C11
+#define atomic_load_long(p) __atomic_load_n(p, __ATOMIC_RELAXED)
+#define atomic_store_long(p, v) __atomic_store_n(p, v, __ATOMIC_RELAXED)
+#else
+#define atomic_load_long(p) (BLASLONG)(*(volatile BLASLONG*)(p))
+#define atomic_store_long(p, v) (*(volatile BLASLONG *)(p)) = (v)
+#endif
+
#ifndef KERNEL_OPERATION
#ifndef COMPLEX
@@ -233,14 +241,18 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
}
#ifndef LOWER
+ MB;
for (i = 0; i <= mypos; i++)
- job[mypos].working[i][CACHE_LINE_SIZE * bufferside] = (BLASLONG)buffer[bufferside];
+ atomic_store_long(&job[mypos].working[i][CACHE_LINE_SIZE * bufferside], (BLASLONG)buffer[bufferside]);
+ // job[mypos].working[i][CACHE_LINE_SIZE * bufferside] = (BLASLONG)buffer[bufferside];
#else
+ MB
for (i = mypos; i < args -> nthreads; i++)
- job[mypos].working[i][CACHE_LINE_SIZE * bufferside] = (BLASLONG)buffer[bufferside];
+ atomic_store_long(&job[mypos].working[i][CACHE_LINE_SIZE * bufferside], (BLASLONG)buffer[bufferside]);
+// job[mypos].working[i][CACHE_LINE_SIZE * bufferside] = (BLASLONG)buffer[bufferside];
#endif
- WMB;
+// WMB;
}
min_i = m_to - m_from;
@@ -271,14 +283,21 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
for (xxx = range_n[current], bufferside = 0; xxx < range_n[current + 1]; xxx += div_n, bufferside ++) {
/* thread has to wait */
- if (current != mypos) while(job[current].working[mypos][CACHE_LINE_SIZE * bufferside] == 0) {YIELDING;};
+ if (current != mypos)
+ do {
+ jw = atomic_load_long(&job[current].working[mypos][CACHE_LINE_SIZE * bufferside]);
+ } while (jw == 0);
+ MB;
+
+ //while(job[current].working[mypos][CACHE_LINE_SIZE * bufferside] == 0) {YIELDING;};
KERNEL_OPERATION(min_i, MIN(range_n[current + 1] - xxx, div_n), k, alpha,
sa, (FLOAT *)job[current].working[mypos][CACHE_LINE_SIZE * bufferside],
c, lda, m_from, xxx);
if (m_from + min_i >= m_to) {
- job[current].working[mypos][CACHE_LINE_SIZE * bufferside] &= 0;
+ atomic_store_long(&job[current].working[mypos][CACHE_LINE_SIZE * bufferside], job[current].working[mypos][CACHE_LINE_SIZE * bufferside] &= 0);
+// job[current].working[mypos][CACHE_LINE_SIZE * bufferside] &= 0;
WMB;
}
}
@@ -323,7 +342,8 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
c, lda, is, xxx);
if (is + min_i >= m_to) {
- job[current].working[mypos][CACHE_LINE_SIZE * bufferside] &= 0;
+ atomic_store_long(&job[current].working[mypos][CACHE_LINE_SIZE * bufferside], job[current].working[mypos][CACHE_LINE_SIZE * bufferside] &= 0);
+// job[current].working[mypos][CACHE_LINE_SIZE * bufferside] &= 0;
WMB;
}
}
@@ -337,9 +357,18 @@ static int inner_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
for (i = 0; i < args -> nthreads; i++) {
if (i != mypos) {
- for (xxx = 0; xxx < DIVIDE_RATE; xxx++) {
+ for (xxx = 0; xxx < DIVIDE_RATE; xxx++)
+ #if 1
+ {
+ do {
+ jw = atomic_load_long(&job[mypos].working[i][CACHE_LINE_SIZE * xxx]);
+ } while (jw);
+ MB;
+ }
+#else
while (job[mypos].working[i][CACHE_LINE_SIZE * xxx] ) {YIELDING;};
- }
+#endif
+ // }
}
}
diff --git a/mkdocs.yml b/mkdocs.yml
new file mode 100644
index 0000000000..74a18a5bb8
--- /dev/null
+++ b/mkdocs.yml
@@ -0,0 +1,25 @@
+site_name: OpenBLAS
+site_url: https://openblas.net/docs/
+theme:
+ name: material
+ logo: logo.svg
+ favicon: logo.svg
+ palette:
+ primary: grey
+markdown_extensions:
+ - admonition
+ - pymdownx.details
+ - pymdownx.superfences
+ - toc:
+ toc_depth: 4
+nav:
+ - index.md
+ - install.md
+ - user_manual.md
+ - extensions.md
+ - developers.md
+ - build_system.md
+ - distributing.md
+ - ci.md
+ - about.md
+ - faq.md
diff --git a/openblas.pc.in b/openblas.pc.in
index 6c27c462b8..23804f4a2a 100644
--- a/openblas.pc.in
+++ b/openblas.pc.in
@@ -2,6 +2,6 @@ Name: openblas
Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version
Version: ${version}
URL: https://github.com/xianyi/OpenBLAS
-Libs: -L${libdir} -l$(libprefix}openblas${libnamesuffix}
+Libs: -L${libdir} -l${libprefix}openblas${libnamesuffix}
Libs.private: ${extralib}
Cflags: -I${includedir}
diff --git a/param.h b/param.h
index fef3a09914..84e241fcd2 100644
--- a/param.h
+++ b/param.h
@@ -614,7 +614,13 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define SYMV_P 8
-#define SWITCH_RATIO 16
+#if defined(XDOUBLE) || defined(DOUBLE)
+#define SWITCH_RATIO 4
+#define GEMM_PREFERED_SIZE 4
+#else
+#define SWITCH_RATIO 8
+#define GEMM_PREFERED_SIZE 8
+#endif
#ifdef ARCH_X86
@@ -2836,7 +2842,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define SNUMOPT 2
#define DNUMOPT 2
-#define GEMM_DEFAULT_OFFSET_A 0
+#define GEMM_DEFAULT_OFFSET_A 0x20000
#define GEMM_DEFAULT_OFFSET_B 0
#define GEMM_DEFAULT_ALIGN 0x0ffffUL
@@ -2866,20 +2872,20 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define QGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1
-#define SGEMM_DEFAULT_P 256
-#define DGEMM_DEFAULT_P 32
+#define SGEMM_DEFAULT_P sgemm_p
+#define DGEMM_DEFAULT_P dgemm_p
#define CGEMM_DEFAULT_P 128
-#define ZGEMM_DEFAULT_P 128
+#define ZGEMM_DEFAULT_P zgemm_p
-#define SGEMM_DEFAULT_R 1024
-#define DGEMM_DEFAULT_R 858
+#define SGEMM_DEFAULT_R sgemm_r
+#define DGEMM_DEFAULT_R dgemm_r
#define CGEMM_DEFAULT_R 4096
-#define ZGEMM_DEFAULT_R 4096
+#define ZGEMM_DEFAULT_R zgemm_r
-#define SGEMM_DEFAULT_Q 256
-#define DGEMM_DEFAULT_Q 152
+#define SGEMM_DEFAULT_Q sgemm_q
+#define DGEMM_DEFAULT_Q dgemm_q
#define CGEMM_DEFAULT_Q 128
-#define ZGEMM_DEFAULT_Q 128
+#define ZGEMM_DEFAULT_Q zgemm_q
#define SYMV_P 16
#endif
@@ -3351,6 +3357,41 @@ is a big desktop or server with abundant cache rather than a phone or embedded d
#define CGEMM_DEFAULT_R 4096
#define ZGEMM_DEFAULT_R 2048
+#elif defined(CORTEXA76)
+
+#define SGEMM_DEFAULT_UNROLL_M 16
+#define SGEMM_DEFAULT_UNROLL_N 4
+
+#define DGEMM_DEFAULT_UNROLL_M 8
+#define DGEMM_DEFAULT_UNROLL_N 4
+
+#define CGEMM_DEFAULT_UNROLL_M 8
+#define CGEMM_DEFAULT_UNROLL_N 4
+
+#define ZGEMM_DEFAULT_UNROLL_M 4
+#define ZGEMM_DEFAULT_UNROLL_N 4
+
+#if defined(XDOUBLE) || defined(DOUBLE)
+#define SWITCH_RATIO 8
+#else
+#define SWITCH_RATIO 16
+#endif
+
+ #define SGEMM_DEFAULT_P 256
+ #define DGEMM_DEFAULT_P 128
+ #define CGEMM_DEFAULT_P 128
+ #define ZGEMM_DEFAULT_P 64
+
+ #define SGEMM_DEFAULT_Q 512
+ #define DGEMM_DEFAULT_Q 256
+ #define CGEMM_DEFAULT_Q 256
+ #define ZGEMM_DEFAULT_Q 256
+
+#define SGEMM_DEFAULT_R 4096
+#define DGEMM_DEFAULT_R 4096
+#define CGEMM_DEFAULT_R 4096
+#define ZGEMM_DEFAULT_R 4096
+
#elif defined(CORTEXA53) || defined(CORTEXA55)
#define SGEMM_DEFAULT_UNROLL_M 8
@@ -3506,8 +3547,10 @@ is a big desktop or server with abundant cache rather than a phone or embedded d
#if defined(XDOUBLE) || defined(DOUBLE)
#define SWITCH_RATIO 8
+#define GEMM_PREFERED_SIZE 4
#else
#define SWITCH_RATIO 16
+#define GEMM_PREFERED_SIZE 8
#endif
#define SGEMM_DEFAULT_UNROLL_M 16
diff --git a/utest/Makefile b/utest/Makefile
index 0e3f2b8a72..ce0f5c4307 100644
--- a/utest/Makefile
+++ b/utest/Makefile
@@ -63,20 +63,18 @@ endif
all : run_test
ifeq ($(OSNAME), AIX)
-ifeq ($(USE_OPENMP), 1)
$(UTESTBIN): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB)
+
+$(UTESTEXTBIN): $(OBJS_EXT)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB)
else
$(UTESTBIN): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
-endif
-else
-$(UTESTBIN): $(OBJS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
-endif
$(UTESTEXTBIN): $(OBJS_EXT)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
+endif
run_test: $(UTESTBIN) $(UTESTEXTBIN)
ifneq ($(CROSS), 1)
@@ -88,4 +86,4 @@ clean:
-rm -f *.o $(UTESTBIN) $(UTESTEXTBIN)
-rm -f $(DIR_EXT)/*.o
-libs:
\ No newline at end of file
+libs:
diff --git a/utest/test_extensions/test_damin.c b/utest/test_extensions/test_damin.c
index 736921fa3b..50bc5a928e 100644
--- a/utest/test_extensions/test_damin.c
+++ b/utest/test_extensions/test_damin.c
@@ -351,4 +351,4 @@ CTEST(damin, negative_step_2_N_70){
double amin = BLASFUNC(damin)(&N, x, &inc);
ASSERT_DBL_NEAR_TOL(1.0, amin, DOUBLE_EPS);
}
-#endif
\ No newline at end of file
+#endif
diff --git a/utest/test_extensions/test_dsum.c b/utest/test_extensions/test_dsum.c
index e987c5a42a..304619d0a9 100644
--- a/utest/test_extensions/test_dsum.c
+++ b/utest/test_extensions/test_dsum.c
@@ -62,6 +62,7 @@ CTEST(dsum, step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
double x[ELEMENTS];
+ x[0]=0.;
for (i = 0; i < N * inc; i ++) {
x[i] = i + 1000;
}
@@ -243,6 +244,7 @@ CTEST(dsum, c_api_step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
double x[ELEMENTS];
+ x[0]=0.;
for (i = 0; i < N * inc; i ++) {
x[i] = i + 1000;
}
@@ -400,4 +402,4 @@ CTEST(dsum, c_api_step_2_N_50){
double sum = cblas_dsum(N, x, inc);
ASSERT_DBL_NEAR_TOL(50.0, sum, DOUBLE_EPS);
}
-#endif
\ No newline at end of file
+#endif
diff --git a/utest/test_extensions/test_dzsum.c b/utest/test_extensions/test_dzsum.c
index 5139f59cbf..a184ad9475 100644
--- a/utest/test_extensions/test_dzsum.c
+++ b/utest/test_extensions/test_dzsum.c
@@ -62,6 +62,7 @@ CTEST(dzsum, step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
double x[ELEMENTS];
+ x[0] = 0.0;
for (i = 0; i < N * inc * 2; i ++) {
x[i] = i + 1000;
}
@@ -243,6 +244,7 @@ CTEST(dzsum, c_api_step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
double x[ELEMENTS];
+ x[0] = 0.0;
for (i = 0; i < N * inc * 2; i ++) {
x[i] = i + 1000;
}
@@ -400,4 +402,4 @@ CTEST(dzsum, c_api_step_2_N_50){
double sum = cblas_dzsum(N, x, inc);
ASSERT_DBL_NEAR_TOL(0.0, sum, DOUBLE_EPS);
}
-#endif
\ No newline at end of file
+#endif
diff --git a/utest/test_extensions/test_scsum.c b/utest/test_extensions/test_scsum.c
index 492e1a4ca1..8e943de229 100644
--- a/utest/test_extensions/test_scsum.c
+++ b/utest/test_extensions/test_scsum.c
@@ -62,6 +62,7 @@ CTEST(scsum, step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
float x[ELEMENTS];
+ x[0] = 0.0f;
for (i = 0; i < N * inc * 2; i ++) {
x[i] = i + 1000;
}
@@ -243,6 +244,7 @@ CTEST(scsum, c_api_step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
float x[ELEMENTS];
+ x[0] = 0.0f;
for (i = 0; i < N * inc * 2; i ++) {
x[i] = i + 1000;
}
@@ -400,4 +402,4 @@ CTEST(scsum, c_api_step_2_N_50){
float sum = cblas_scsum(N, x, inc);
ASSERT_DBL_NEAR_TOL(0.0f, sum, SINGLE_EPS);
}
-#endif
\ No newline at end of file
+#endif
diff --git a/utest/test_extensions/test_ssum.c b/utest/test_extensions/test_ssum.c
index 971a0d2e07..9c5e297286 100644
--- a/utest/test_extensions/test_ssum.c
+++ b/utest/test_extensions/test_ssum.c
@@ -62,6 +62,7 @@ CTEST(ssum, step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
float x[ELEMENTS];
+ x[0] = 0.0f;
for (i = 0; i < N * inc; i ++) {
x[i] = i + 1000;
}
@@ -243,6 +244,7 @@ CTEST(ssum, c_api_step_zero){
blasint i;
blasint N = ELEMENTS, inc = 0;
float x[ELEMENTS];
+ x[0] = 0.0f;
for (i = 0; i < N * inc; i ++) {
x[i] = i + 1000;
}
@@ -400,4 +402,4 @@ CTEST(ssum, c_api_step_2_N_50){
float sum = cblas_ssum(N, x, inc);
ASSERT_DBL_NEAR_TOL(50.0f, sum, SINGLE_EPS);
}
-#endif
\ No newline at end of file
+#endif
diff --git a/utest/test_zscal.c b/utest/test_zscal.c
index ffc851e8b5..195e4945f3 100644
--- a/utest/test_zscal.c
+++ b/utest/test_zscal.c
@@ -11,9 +11,11 @@
CTEST(zscal, i_nan)
{
+ blasint N=9;
+ blasint incX=1;
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double nan[] = {NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0};
- cblas_zscal(9, i, &nan, 1);
+ BLASFUNC(zscal)(&N, i, nan, &incX);
ASSERT_TRUE(isnan(nan[0]));
ASSERT_TRUE(isnan(nan[1]));
ASSERT_TRUE(isnan(nan[16]));
@@ -22,10 +24,12 @@ CTEST(zscal, i_nan)
CTEST(zscal, i_nan_inc_2)
{
+ blasint N=9;
+ blasint incX=1;
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double nan[] = {NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0,
NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0};
- cblas_zscal(9, i, &nan, 2);
+ BLASFUNC(zscal)(&N, i, nan, &incX);
ASSERT_TRUE(isnan(nan[0]));
ASSERT_TRUE(isnan(nan[1]));
ASSERT_TRUE(isnan(nan[16]));
@@ -34,9 +38,11 @@ CTEST(zscal, i_nan_inc_2)
CTEST(zscal, nan_i)
{
+ blasint N=9;
+ blasint incX=1;
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double nan[] = {NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0};
- cblas_zscal(9, &nan, &i, 1);
+ BLASFUNC(zscal)(&N, nan, i, &incX);
ASSERT_TRUE(isnan(i[0]));
ASSERT_TRUE(isnan(i[1]));
ASSERT_TRUE(isnan(i[16]));
@@ -45,10 +51,12 @@ CTEST(zscal, nan_i)
CTEST(zscal, nan_i_inc_2)
{
+ blasint N=9;
+ blasint incX=1;
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1,
0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double nan[] = {NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0, NAN,0};
- cblas_zscal(9, &nan, &i, 2);
+ BLASFUNC(zscal)(&N, nan, i, &incX);
ASSERT_TRUE(isnan(i[0]));
ASSERT_TRUE(isnan(i[1]));
ASSERT_TRUE(isnan(i[16]));
@@ -57,9 +65,11 @@ CTEST(zscal, nan_i_inc_2)
CTEST(zscal, i_inf)
{
+ blasint N=9;
+ blasint incX=1;
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double inf[] = {INFINITY, 0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0};
- cblas_zscal(9, i, &inf, 1);
+ BLASFUNC(zscal)(&N, i, inf, &incX);
ASSERT_TRUE(isnan(inf[0]));
ASSERT_TRUE(isinf(inf[1]));
ASSERT_TRUE(isnan(inf[16]));
@@ -68,10 +78,12 @@ CTEST(zscal, i_inf)
CTEST(zscal, i_inf_inc_2)
{
+ blasint N=9;
+ blasint incX=2;
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double inf[] = {INFINITY, 0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0,
INFINITY, 0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0};
- cblas_zscal(9, i, &inf, 2);
+ BLASFUNC(zscal)(&N, i, inf, &incX);
ASSERT_TRUE(isnan(inf[0]));
ASSERT_TRUE(isinf(inf[1]));
ASSERT_TRUE(isnan(inf[16]));
@@ -80,9 +92,11 @@ CTEST(zscal, i_inf_inc_2)
CTEST(zscal, inf_i)
{
+ blasint N=9;
+ blasint incX=1;
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double inf[] = {INFINITY, 0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0};
- cblas_zscal(9, &inf, &i, 1);
+ BLASFUNC(zscal)(&N, inf, i, &incX);
ASSERT_TRUE(isnan(i[0]));
ASSERT_TRUE(isinf(i[1]));
ASSERT_TRUE(isnan(i[16]));
@@ -91,10 +105,12 @@ CTEST(zscal, inf_i)
CTEST(zscal, inf_i_inc_2)
{
+ blasint N=9;
+ blasint incX=2;
double i[] = {0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1,
0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1 };
double inf[] = {INFINITY, 0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0, INFINITY,0};
- cblas_zscal(9, &inf, &i, 2);
+ BLASFUNC(zscal)(&N, inf, i, &incX);
ASSERT_TRUE(isnan(i[0]));
ASSERT_TRUE(isinf(i[1]));
ASSERT_TRUE(isnan(i[16]));