Fix typos in comments and documentation of LAPACK (Reference-LAPACK PR 820) (#4045)
* Fix typos in comments and documentation (Reference-LAPACK PR 820)
This commit is contained in:
parent
9f2233bfdf
commit
be05ba4374
|
@ -1,4 +1,4 @@
|
|||
# This module perdorms several try-compiles to determine the default integer
|
||||
# This module performs several try-compiles to determine the default integer
|
||||
# size being used by the fortran compiler
|
||||
#
|
||||
# After execution, the following variables are set. If they are un set then
|
||||
|
|
|
@ -36,7 +36,7 @@ function(add_coverage TNAME)
|
|||
endfunction()
|
||||
|
||||
|
||||
# Find the reuired flags foreach language.
|
||||
# Find the required flags foreach language.
|
||||
set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET})
|
||||
set(CMAKE_REQUIRED_QUIET ${codecov_FIND_QUIETLY})
|
||||
|
||||
|
@ -118,7 +118,7 @@ function (codecov_path_of_source FILE RETURN_VAR)
|
|||
|
||||
# If expression was found, SOURCEFILE is a generator-expression for an
|
||||
# object library. Currently we found no way to call this function automatic
|
||||
# for the referenced target, so it must be called in the directoryso of the
|
||||
# for the referenced target, so it must be called in the directory of the
|
||||
# object library definition.
|
||||
if(NOT "${_source}" STREQUAL "")
|
||||
set(${RETURN_VAR} "" PARENT_SCOPE)
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
cmake_minimum_required(VERSION 2.8.12)
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
project(LAPACK Fortran C)
|
||||
|
||||
set(LAPACK_MAJOR_VERSION 3)
|
||||
set(LAPACK_MINOR_VERSION 9)
|
||||
set(LAPACK_MINOR_VERSION 11)
|
||||
set(LAPACK_PATCH_VERSION 0)
|
||||
set(
|
||||
LAPACK_VERSION
|
||||
${LAPACK_MAJOR_VERSION}.${LAPACK_MINOR_VERSION}.${LAPACK_PATCH_VERSION}
|
||||
)
|
||||
|
||||
# Add the CMake directory for custon CMake modules
|
||||
# Allow setting a prefix for the library names
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "lib${LIBRARY_PREFIX}")
|
||||
set(CMAKE_SHARED_LIBRARY_PREFIX "lib${LIBRARY_PREFIX}")
|
||||
|
||||
# Add the CMake directory for custom CMake modules
|
||||
set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH})
|
||||
|
||||
# Export all symbols on Windows when building shared libraries
|
||||
|
@ -41,6 +45,40 @@ if(_is_coverage_build)
|
|||
find_package(codecov)
|
||||
endif()
|
||||
|
||||
# By default test Fortran compiler complex abs and complex division
|
||||
option(TEST_FORTRAN_COMPILER "Test Fortran compiler complex abs and complex division" OFF)
|
||||
if( TEST_FORTRAN_COMPILER )
|
||||
|
||||
add_executable( test_zcomplexabs ${LAPACK_SOURCE_DIR}/INSTALL/test_zcomplexabs.f )
|
||||
add_custom_target( run_test_zcomplexabs
|
||||
COMMAND test_zcomplexabs 2> test_zcomplexabs.err
|
||||
WORKING_DIRECTORY ${LAPACK_BINARY_DIR}/INSTALL
|
||||
COMMENT "Running test_zcomplexabs in ${LAPACK_BINARY_DIR}/INSTALL with stderr: test_zcomplexabs.err"
|
||||
SOURCES ${LAPACK_SOURCE_DIR}/INSTALL/test_zcomplexabs.f )
|
||||
|
||||
add_executable( test_zcomplexdiv ${LAPACK_SOURCE_DIR}/INSTALL/test_zcomplexdiv.f )
|
||||
add_custom_target( run_test_zcomplexdiv
|
||||
COMMAND test_zcomplexdiv 2> test_zcomplexdiv.err
|
||||
WORKING_DIRECTORY ${LAPACK_BINARY_DIR}/INSTALL
|
||||
COMMENT "Running test_zcomplexdiv in ${LAPACK_BINARY_DIR}/INSTALL with stderr: test_zcomplexdiv.err"
|
||||
SOURCES ${LAPACK_SOURCE_DIR}/INSTALL/test_zcomplexdiv.f )
|
||||
|
||||
add_executable( test_zcomplexmult ${LAPACK_SOURCE_DIR}/INSTALL/test_zcomplexmult.f )
|
||||
add_custom_target( run_test_zcomplexmult
|
||||
COMMAND test_zcomplexmult 2> test_zcomplexmult.err
|
||||
WORKING_DIRECTORY ${LAPACK_BINARY_DIR}/INSTALL
|
||||
COMMENT "Running test_zcomplexmult in ${LAPACK_BINARY_DIR}/INSTALL with stderr: test_zcomplexmult.err"
|
||||
SOURCES ${LAPACK_SOURCE_DIR}/INSTALL/test_zcomplexmult.f )
|
||||
|
||||
add_executable( test_zminMax ${LAPACK_SOURCE_DIR}/INSTALL/test_zminMax.f )
|
||||
add_custom_target( run_test_zminMax
|
||||
COMMAND test_zminMax 2> test_zminMax.err
|
||||
WORKING_DIRECTORY ${LAPACK_BINARY_DIR}/INSTALL
|
||||
COMMENT "Running test_zminMax in ${LAPACK_BINARY_DIR}/INSTALL with stderr: test_zminMax.err"
|
||||
SOURCES ${LAPACK_SOURCE_DIR}/INSTALL/test_zminMax.f )
|
||||
|
||||
endif()
|
||||
|
||||
# By default static library
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
||||
|
||||
|
@ -89,12 +127,57 @@ configure_file(
|
|||
include(PreventInSourceBuilds)
|
||||
include(PreventInBuildInstalls)
|
||||
|
||||
# Check if recursive flag exists
|
||||
include(CheckFortranCompilerFlag)
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL Flang)
|
||||
check_fortran_compiler_flag("-Mrecursive" _MrecursiveFlag)
|
||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
|
||||
check_fortran_compiler_flag("-frecursive" _frecursiveFlag)
|
||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
|
||||
check_fortran_compiler_flag("-recursive" _recursiveFlag)
|
||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL XL)
|
||||
check_fortran_compiler_flag("-qrecur" _qrecurFlag)
|
||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL NAG)
|
||||
check_fortran_compiler_flag("-recursive" _recursiveFlag)
|
||||
else()
|
||||
message(WARNING "Fortran local arrays should be allocated on the stack."
|
||||
" Please use a compiler which guarantees that feature."
|
||||
" See https://github.com/Reference-LAPACK/lapack/pull/188 and references therein.")
|
||||
endif()
|
||||
|
||||
# Add recursive flag
|
||||
if(_MrecursiveFlag)
|
||||
string(REGEX MATCH "-Mrecursive" output_test <string> "${CMAKE_Fortran_FLAGS}")
|
||||
if(NOT output_test)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Mrecursive"
|
||||
CACHE STRING "Recursive flag must be set" FORCE)
|
||||
endif()
|
||||
elseif(_frecursiveFlag)
|
||||
string(REGEX MATCH "-frecursive" output_test <string> "${CMAKE_Fortran_FLAGS}")
|
||||
if(NOT output_test)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -frecursive"
|
||||
CACHE STRING "Recursive flag must be set" FORCE)
|
||||
endif()
|
||||
elseif(_recursiveFlag)
|
||||
string(REGEX MATCH "-recursive" output_test <string> "${CMAKE_Fortran_FLAGS}")
|
||||
if(NOT output_test)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -recursive"
|
||||
CACHE STRING "Recursive flag must be set" FORCE)
|
||||
endif()
|
||||
elseif(_qrecurFlag)
|
||||
string(REGEX MATCH "-qrecur" output_test <string> "${CMAKE_Fortran_FLAGS}")
|
||||
if(NOT output_test)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qrecur"
|
||||
CACHE STRING "Recursive flag must be set" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fp-model strict")
|
||||
endif()
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL XL)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qnosave -qstrict=none")
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qnosave -qstrict")
|
||||
endif()
|
||||
# Delete libmtsk in linking sequence for Sun/Oracle Fortran Compiler.
|
||||
# This library is not present in the Sun package SolarisStudio12.3-linux-x86-bin
|
||||
|
@ -128,6 +211,22 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL Compaq)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# Add option to enable flat namespace for symbol resolution on macOS
|
||||
if(APPLE)
|
||||
option(USE_FLAT_NAMESPACE "Use flat namespaces for symbol resolution during build and runtime." OFF)
|
||||
|
||||
if(USE_FLAT_NAMESPACE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-flat_namespace")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-flat_namespace")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-flat_namespace")
|
||||
else()
|
||||
if(BUILD_SHARED_LIBS AND BUILD_TESTING)
|
||||
message(WARNING
|
||||
"LAPACK test suite might fail with shared libraries and the default two-level namespace. "
|
||||
"Disable shared libraries or enable flat namespace for symbol resolution via -DUSE_FLAT_NAMESPACE=ON.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# --------------------------------------------------
|
||||
set(LAPACK_INSTALL_EXPORT_NAME ${LAPACKLIB}-targets)
|
||||
|
@ -149,13 +248,14 @@ option(BUILD_TESTING "Build tests" ${_is_coverage_build})
|
|||
include(CTest)
|
||||
message(STATUS "Build tests: ${BUILD_TESTING}")
|
||||
|
||||
# lapack_testing.py uses features from python 2.7 and greater
|
||||
if(BUILD_TESTING)
|
||||
set(_msg "Looking for Python >= 2.7 needed for summary tests")
|
||||
set(_msg "Looking for Python3 needed for summary tests")
|
||||
message(STATUS "${_msg}")
|
||||
find_package(PythonInterp 2.7 QUIET)
|
||||
if(PYTHONINTERP_FOUND)
|
||||
message(STATUS "${_msg} - found (${PYTHON_VERSION_STRING})")
|
||||
# find_package(PythonInterp 3) cannot be used because /usr/bin/python may be
|
||||
# a Python2 interpreter.
|
||||
find_program(PYTHON_EXECUTABLE python3)
|
||||
if(PYTHON_EXECUTABLE)
|
||||
message(STATUS "${_msg} - found")
|
||||
else()
|
||||
message(STATUS "${_msg} - not found (skipping summary tests)")
|
||||
endif()
|
||||
|
@ -177,7 +277,7 @@ CheckLAPACKCompilerFlags()
|
|||
# Check second function
|
||||
|
||||
include(CheckTimeFunction)
|
||||
set(TIME_FUNC NONE ${TIME_FUNC})
|
||||
set(TIME_FUNC NONE)
|
||||
CHECK_TIME_FUNCTION(NONE TIME_FUNC)
|
||||
CHECK_TIME_FUNCTION(INT_CPU_TIME TIME_FUNC)
|
||||
CHECK_TIME_FUNCTION(EXT_ETIME TIME_FUNC)
|
||||
|
@ -210,6 +310,7 @@ if(NOT (BUILD_SINGLE OR BUILD_DOUBLE OR BUILD_COMPLEX OR BUILD_COMPLEX16))
|
|||
BUILD_SINGLE, BUILD_DOUBLE, BUILD_COMPLEX, BUILD_COMPLEX16.")
|
||||
endif()
|
||||
|
||||
|
||||
# --------------------------------------------------
|
||||
# Subdirectories that need to be processed
|
||||
option(USE_OPTIMIZED_BLAS "Whether or not to use an optimized BLAS library instead of included netlib BLAS" OFF)
|
||||
|
@ -325,35 +426,80 @@ option(LAPACKE_WITH_TMG "Build LAPACKE with tmglib routines" OFF)
|
|||
if(LAPACKE_WITH_TMG)
|
||||
set(LAPACKE ON)
|
||||
endif()
|
||||
if(BUILD_TESTING OR LAPACKE_WITH_TMG) #already included, avoid double inclusion
|
||||
|
||||
# TMGLIB
|
||||
# Cache export target
|
||||
set(LAPACK_INSTALL_EXPORT_NAME_CACHE ${LAPACK_INSTALL_EXPORT_NAME})
|
||||
if(BUILD_TESTING OR LAPACKE_WITH_TMG)
|
||||
if(LATESTLAPACK_FOUND AND LAPACKE_WITH_TMG)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES})
|
||||
# Check if dlatms (part of tmg) is found
|
||||
CHECK_FORTRAN_FUNCTION_EXISTS("dlatms" LAPACK_WITH_TMGLIB_FOUND)
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
if(NOT LAPACK_WITH_TMGLIB_FOUND)
|
||||
# Build and install TMG as part of LAPACKE targets (as opposed to LAPACK
|
||||
# targets)
|
||||
set(LAPACK_INSTALL_EXPORT_NAME ${LAPACKELIB}-targets)
|
||||
endif()
|
||||
endif()
|
||||
add_subdirectory(TESTING/MATGEN)
|
||||
endif()
|
||||
# Reset export target
|
||||
set(LAPACK_INSTALL_EXPORT_NAME ${LAPACK_INSTALL_EXPORT_NAME_CACHE})
|
||||
unset(LAPACK_INSTALL_EXPORT_NAME_CACHE)
|
||||
|
||||
if(LAPACKE)
|
||||
add_subdirectory(LAPACKE)
|
||||
endif()
|
||||
|
||||
|
||||
#-------------------------------------
|
||||
# BLAS++ / LAPACK++
|
||||
option(BLAS++ "Build BLAS++" OFF)
|
||||
option(LAPACK++ "Build LAPACK++" OFF)
|
||||
|
||||
|
||||
|
||||
|
||||
function(_display_cpp_implementation_msg name)
|
||||
string(TOLOWER ${name} name_lc)
|
||||
message(STATUS "${name}++ enable")
|
||||
message(STATUS "----------------")
|
||||
message(STATUS "Thank you for your interest in ${name}++, a newly developed C++ API for ${name} library")
|
||||
message(STATUS "The objective of ${name}++ is to provide a convenient, performance oriented API for development in the C++ language, that, for the most part, preserves established conventions, while, at the same time, takes advantages of modern C++ features, such as: namespaces, templates, exceptions, etc.")
|
||||
message(STATUS "We are still working on integrating ${name}++ in our library. For the moment, you can download directly ${name_lc}++ from https://bitbucket.org/icl/${name_lc}pp")
|
||||
message(STATUS "For support ${name}++ related question, please email: slate-user@icl.utk.edu")
|
||||
message(STATUS "----------------")
|
||||
endfunction()
|
||||
if(BLAS++)
|
||||
if (BLAS++)
|
||||
_display_cpp_implementation_msg("BLAS")
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(blaspp
|
||||
URL https://bitbucket.org/icl/blaspp/downloads/blaspp-2020.10.02.tar.gz
|
||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env LIBRARY_PATH=$ENV{LIBRARY_PATH}:${CMAKE_BINARY_DIR}/lib LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${PROJECT_BINARY_DIR}/lib ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} ${PROJECT_BINARY_DIR}/blaspp-prefix/src/blaspp
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} -E env LIBRARY_PATH=$ENV{LIBRARY_PATH}:${PROJECT_BINARY_DIR}/lib LIB_SUFFIX="" make
|
||||
INSTALL_COMMAND make PREFIX=${PROJECT_BINARY_DIR} LIB_SUFFIX="" install
|
||||
)
|
||||
ExternalProject_Add_StepDependencies(blaspp build ${BLAS_LIBRARIES})
|
||||
endif()
|
||||
if(LAPACK++)
|
||||
if (LAPACK++)
|
||||
message (STATUS "linking lapack++ against ${LAPACK_LIBRARIES}")
|
||||
_display_cpp_implementation_msg("LAPACK")
|
||||
include(ExternalProject)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
ExternalProject_Add(lapackpp
|
||||
URL https://bitbucket.org/icl/lapackpp/downloads/lapackpp-2020.10.02.tar.gz
|
||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env LIBRARY_PATH=$ENV{LIBRARY_PATH}:${CMAKE_BINARY_DIR}/lib LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${PROJECT_BINARY_DIR}/lib ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DLAPACK_LIBRARIES=${LAPACK_LIBRARIES} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} ${PROJECT_BINARY_DIR}/lapackpp-prefix/src/lapackpp
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} -E env LIBRARY_PATH=$ENV{LIBRARY_PATH}:${PROJECT_BINARY_DIR}/lib LIB_SUFFIX="" make
|
||||
INSTALL_COMMAND make PREFIX=${PROJECT_BINARY_DIR} LIB_SUFFIX="" install
|
||||
)
|
||||
else ()
|
||||
# FIXME this does not really work as the libraries list gets converted to a semicolon-separated list somewhere in the lapack++ build files
|
||||
ExternalProject_Add(lapackpp
|
||||
URL https://bitbucket.org/icl/lapackpp/downloads/lapackpp-2020.10.02.tar.gz
|
||||
CONFIGURE_COMMAND env LIBRARY_PATH=$ENV{LIBRARY_PATH}:${CMAKE_BINARY_DIR}/lib LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${PROJECT_BINARY_DIR}/lib ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DLAPACK_LIBRARIES="${PROJECT_BINARY_DIR}/lib/liblapack.a -lgfortran" -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} ${PROJECT_BINARY_DIR}/lapackpp-prefix/src/lapackpp
|
||||
BUILD_COMMAND env LIBRARY_PATH=$ENV{LIBRARY_PATH}:${PROJECT_BINARY_DIR}/lib LIB_SUFFIX="" make
|
||||
INSTALL_COMMAND make PREFIX=${PROJECT_BINARY_DIR} LIB_SUFFIX="" install
|
||||
)
|
||||
endif()
|
||||
ExternalProject_Add_StepDependencies(lapackpp build blaspp ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
# --------------------------------------------------
|
||||
|
@ -370,7 +516,7 @@ set(CPACK_MONOLITHIC_INSTALL ON)
|
|||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "LAPACK")
|
||||
if(WIN32 AND NOT UNIX)
|
||||
# There is a bug in NSI that does not handle full unix paths properly. Make
|
||||
# sure there is at least one set of four (4) backlasshes.
|
||||
# sure there is at least one set of four (4) backslashes.
|
||||
set(CPACK_NSIS_HELP_LINK "http:\\\\\\\\http://icl.cs.utk.edu/lapack-forum")
|
||||
set(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.netlib.org/lapack")
|
||||
set(CPACK_NSIS_CONTACT "lapack@eecs.utk.edu")
|
||||
|
@ -396,10 +542,6 @@ if(NOT LATESTLAPACK_FOUND)
|
|||
set(ALL_TARGETS ${ALL_TARGETS} ${LAPACKLIB})
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTING OR LAPACKE_WITH_TMG)
|
||||
set(ALL_TARGETS ${ALL_TARGETS} ${TMGLIB})
|
||||
endif()
|
||||
|
||||
# Export lapack targets, not including lapacke, from the
|
||||
# install tree, if any.
|
||||
set(_lapack_config_install_guard_target "")
|
||||
|
@ -424,6 +566,10 @@ if(LAPACKE)
|
|||
set(ALL_TARGETS ${ALL_TARGETS} ${LAPACKELIB})
|
||||
endif()
|
||||
|
||||
if(NOT LAPACK_WITH_TMGLIB_FOUND AND LAPACKE_WITH_TMG)
|
||||
set(ALL_TARGETS ${ALL_TARGETS} ${TMGLIB})
|
||||
endif()
|
||||
|
||||
# Export lapack and lapacke targets from the build tree, if any.
|
||||
set(_lapack_config_build_guard_target "")
|
||||
if(ALL_TARGETS)
|
||||
|
@ -461,4 +607,114 @@ install(FILES
|
|||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${LAPACKLIB}-${LAPACK_VERSION}
|
||||
COMPONENT Development
|
||||
)
|
||||
|
||||
if (LAPACK++)
|
||||
install(
|
||||
DIRECTORY "${LAPACK_BINARY_DIR}/lib/"
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
FILES_MATCHING REGEX "liblapackpp.(a|so)$"
|
||||
)
|
||||
install(
|
||||
DIRECTORY "${PROJECT_BINARY_DIR}/lapackpp-prefix/src/lapackpp/include/"
|
||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||
FILES_MATCHING REGEX "\\.(h|hh)$"
|
||||
)
|
||||
write_basic_package_version_file(
|
||||
"lapackppConfigVersion.cmake"
|
||||
VERSION 2020.10.02
|
||||
COMPATIBILITY AnyNewerVersion
|
||||
)
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/lib/lapackpp/lapackppConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/lib/lapackpp/lapackppConfigVersion.cmake"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/"
|
||||
)
|
||||
|
||||
endif()
|
||||
if (BLAS++)
|
||||
write_basic_package_version_file(
|
||||
"blasppConfigVersion.cmake"
|
||||
VERSION 2020.10.02
|
||||
COMPATIBILITY AnyNewerVersion
|
||||
)
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/lib/blaspp/blasppConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/lib/blaspp/blasppConfigVersion.cmake"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/"
|
||||
)
|
||||
install(
|
||||
DIRECTORY "${LAPACK_BINARY_DIR}/lib/"
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
FILES_MATCHING REGEX "libblaspp.(a|so)$"
|
||||
)
|
||||
install(
|
||||
DIRECTORY "${PROJECT_BINARY_DIR}/blaspp-prefix/src/blaspp/include/"
|
||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||
FILES_MATCHING REGEX "\\.(h|hh)$"
|
||||
)
|
||||
endif()
|
||||
|
||||
# --------------------------------------------------
|
||||
# Generate MAN and/or HTML Documentation
|
||||
option(BUILD_HTML_DOCUMENTATION "Create and install the HTML based API
|
||||
documentation (requires Doxygen) - command: make html" OFF)
|
||||
option(BUILD_MAN_DOCUMENTATION "Create and install the MAN based documentation (requires Doxygen) - command: make man" OFF)
|
||||
message(STATUS "Build html documentation: ${BUILD_HTML_DOCUMENTATION}")
|
||||
message(STATUS "Build man documentation: ${BUILD_MAN_DOCUMENTATION}")
|
||||
|
||||
if(BUILD_HTML_DOCUMENTATION OR BUILD_MAN_DOCUMENTATION)
|
||||
find_package(Doxygen)
|
||||
if(NOT DOXYGEN_FOUND)
|
||||
message(WARNING "Doxygen is needed to build the documentation.")
|
||||
|
||||
else()
|
||||
|
||||
set(DOXYGEN_PROJECT_BRIEF "LAPACK: Linear Algebra PACKage")
|
||||
set(DOXYGEN_PROJECT_NUMBER ${LAPACK_VERSION})
|
||||
set(DOXYGEN_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DOCS)
|
||||
set(PROJECT_LOGO ${CMAKE_CURRENT_SOURCE_DIR}/DOCS/lapack.png)
|
||||
set(DOXYGEN_OPTIMIZE_FOR_FORTRAN YES)
|
||||
set(DOXYGEN_SOURCE_BROWSER YES)
|
||||
set(DISTRIBUTE_GROUP_DOC YES)
|
||||
set(DOXYGEN_CREATE_SUBDIRS YES)
|
||||
set(DOXYGEN_SEPARATE_MEMBER_PAGES YES)
|
||||
set(DOXYGEN_EXTRACT_ALL YES)
|
||||
set(DOXYGEN_FILE_PATTERNS "*.f;*.c;*.h")
|
||||
set(DOXYGEN_RECURSIVE YES)
|
||||
set(DOXYGEN_GENERATE_TREEVIEW YES)
|
||||
set(DOXYGEN_INTERACTIVE_SVG YES)
|
||||
set(DOXYGEN_QUIET YES)
|
||||
set(DOXYGEN_WARNINGS NO)
|
||||
set(DOXYGEN_GENERATE_HTML NO)
|
||||
set(DOXYGEN_GENERATE_MAN NO)
|
||||
|
||||
|
||||
if (BUILD_HTML_DOCUMENTATION)
|
||||
set(DOXYGEN_GENERATE_HTML YES)
|
||||
set(DOXYGEN_HTML_OUTPUT explore-html)
|
||||
set(DOXYGEN_INLINE_SOURCES YES)
|
||||
set(DOXYGEN_CALL_GRAPH YES)
|
||||
set(DOXYGEN_CALLER_GRAPH YES)
|
||||
|
||||
doxygen_add_docs(
|
||||
html
|
||||
${PROJECT_SOURCE_DIR}
|
||||
COMMENT "Generating html LAPACK documentation (it will take some time... time to grab a coffee)"
|
||||
)
|
||||
endif()
|
||||
if (BUILD_MAN_DOCUMENTATION)
|
||||
set(DOXYGEN_GENERATE_MAN YES)
|
||||
set(DOXYGEN_EXCLUDE SRC/VARIANTS)
|
||||
set(DOXYGEN_MAN_LINKS YES)
|
||||
set(DOXYGEN_INLINE_SOURCES NO)
|
||||
set(DOXYGEN_CALL_GRAPH NO)
|
||||
set(DOXYGEN_CALLER_GRAPH NO)
|
||||
|
||||
doxygen_add_docs(
|
||||
man
|
||||
${PROJECT_SOURCE_DIR}
|
||||
COMMENT "Generating man LAPACK documentation"
|
||||
)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -575,7 +575,7 @@ There are six machine-dependent functions in the test and timing
|
|||
package, at least three of which must be installed. They are
|
||||
|
||||
\begin{tabbing}
|
||||
MONOMO \= DOUBLE PRECYSION \= \kill
|
||||
MONOMO \= DOUBLE PRECISION \= \kill
|
||||
LSAME \> LOGICAL \> Test if two characters are the same regardless of case \\
|
||||
SLAMCH \> REAL \> Determine machine-dependent parameters \\
|
||||
DLAMCH \> DOUBLE PRECISION \> Determine machine-dependent parameters \\
|
||||
|
|
|
@ -54,7 +54,7 @@ void LAPACKE_cgb_trans( int matrix_layout, lapack_int m, lapack_int n,
|
|||
}
|
||||
} else if ( matrix_layout == LAPACK_ROW_MAJOR ) {
|
||||
/* TODO: interchange loops for performance.
|
||||
* This is just reference impemeltation.
|
||||
* This is just reference implementation.
|
||||
*/
|
||||
for( j = 0; j < MIN( n, ldin ); j++ ) {
|
||||
for( i = MAX( ku-j, 0 ); i < MIN3( ldout, m+ku-j, kl+ku+1 );
|
||||
|
|
|
@ -54,7 +54,7 @@ void LAPACKE_dgb_trans( int matrix_layout, lapack_int m, lapack_int n,
|
|||
}
|
||||
} else if ( matrix_layout == LAPACK_ROW_MAJOR ) {
|
||||
/* TODO: interchange loops for performance.
|
||||
* This is just reference impemeltation.
|
||||
* This is just reference implementation.
|
||||
*/
|
||||
for( j = 0; j < MIN( n, ldin ); j++ ) {
|
||||
for( i = MAX( ku-j, 0 ); i < MIN3( ldout, m+ku-j, kl+ku+1 );
|
||||
|
|
|
@ -54,7 +54,7 @@ void LAPACKE_sgb_trans( int matrix_layout, lapack_int m, lapack_int n,
|
|||
}
|
||||
} else if ( matrix_layout == LAPACK_ROW_MAJOR ) {
|
||||
/* TODO: interchange loops for performance.
|
||||
* This is just reference impemeltation.
|
||||
* This is just reference implementation.
|
||||
*/
|
||||
for( j = 0; j < MIN( n, ldin ); j++ ) {
|
||||
for( i = MAX( ku-j, 0 ); i < MIN3( ldout, m+ku-j, kl+ku+1 );
|
||||
|
|
|
@ -54,7 +54,7 @@ void LAPACKE_zgb_trans( int matrix_layout, lapack_int m, lapack_int n,
|
|||
}
|
||||
} else if ( matrix_layout == LAPACK_ROW_MAJOR ) {
|
||||
/* TODO: interchange loops for performance.
|
||||
* This is just reference impemeltation
|
||||
* This is just reference implementation
|
||||
*/
|
||||
for( j = 0; j < MIN( n, ldin ); j++ ) {
|
||||
for( i = MAX( ku-j, 0 ); i < MIN3( ldout, m+ku-j, kl+ku+1 );
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
*> In particular, if B is an N-by-N nonsingular matrix, then the GSVD of
|
||||
*> A and B implicitly gives the SVD of A*inv(B):
|
||||
*> A*inv(B) = U*(D1*inv(D2))*V**H.
|
||||
*> If ( A**H,B**H)**H has orthnormal columns, then the GSVD of A and B is also
|
||||
*> If ( A**H,B**H)**H has orthonormal columns, then the GSVD of A and B is also
|
||||
*> equal to the CS decomposition of A and B. Furthermore, the GSVD can
|
||||
*> be used to derive the solution of the eigenvalue problem:
|
||||
*> A**H*A x = lambda* B**H*B x.
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
*> In particular, if B is an N-by-N nonsingular matrix, then the GSVD of
|
||||
*> A and B implicitly gives the SVD of A*inv(B):
|
||||
*> A*inv(B) = U*(D1*inv(D2))*V**H.
|
||||
*> If ( A**H,B**H)**H has orthnormal columns, then the GSVD of A and B is also
|
||||
*> If ( A**H,B**H)**H has orthonormal columns, then the GSVD of A and B is also
|
||||
*> equal to the CS decomposition of A and B. Furthermore, the GSVD can
|
||||
*> be used to derive the solution of the eigenvalue problem:
|
||||
*> A**H*A x = lambda* B**H*B x.
|
||||
|
|
|
@ -252,7 +252,7 @@
|
|||
*> 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
|
||||
*> then V is used as workspace if the procedure
|
||||
*> 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
|
||||
|
|
|
@ -363,7 +363,7 @@
|
|||
*> an optimal implementation would do all necessary scaling before calling
|
||||
*> CGESVD and the scaling in CGESVD can be switched off.
|
||||
*> 3. Other comments related to code optimization are given in comments in the
|
||||
*> code, enlosed in [[double brackets]].
|
||||
*> code, enclosed in [[double brackets]].
|
||||
*> \endverbatim
|
||||
*
|
||||
*> \par Bugs, examples and comments
|
||||
|
|
|
@ -52,10 +52,10 @@
|
|||
*> Specifies whether the output from this procedure is used
|
||||
*> to compute the matrix V:
|
||||
*> = 'V': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the N-by-N array V.
|
||||
*> by postmultiplying the N-by-N array V.
|
||||
*> (See the description of V.)
|
||||
*> = 'A': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the MV-by-N array V.
|
||||
*> by postmultiplying the MV-by-N array V.
|
||||
*> (See the descriptions of MV and V.)
|
||||
*> = 'N': the Jacobi rotations are not accumulated.
|
||||
*> \endverbatim
|
||||
|
|
|
@ -75,10 +75,10 @@
|
|||
*> Specifies whether the output from this procedure is used
|
||||
*> to compute the matrix V:
|
||||
*> = 'V': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the N-by-N array V.
|
||||
*> by postmultiplying the N-by-N array V.
|
||||
*> (See the description of V.)
|
||||
*> = 'A': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the MV-by-N array V.
|
||||
*> by postmultiplying the MV-by-N array V.
|
||||
*> (See the descriptions of MV and V.)
|
||||
*> = 'N': the Jacobi rotations are not accumulated.
|
||||
*> \endverbatim
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
*> triangular part of the matrix A, and the strictly upper
|
||||
*> triangular part of A is not referenced.
|
||||
*>
|
||||
*> On exit, L is stored below (or above) the subdiaonal blocks,
|
||||
*> On exit, L is stored below (or above) the subdiagonal blocks,
|
||||
*> when UPLO is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -480,7 +480,7 @@
|
|||
A( J, K ) = CONJG( A( P, J ) )
|
||||
A( P, J ) = T
|
||||
14 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( P, K ) = CONJG( A( P, K ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = REAL( A( K, K ) )
|
||||
|
@ -508,7 +508,7 @@
|
|||
A( J, KK ) = CONJG( A( KP, J ) )
|
||||
A( KP, J ) = T
|
||||
15 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( KP, KK ) = CONJG( A( KP, KK ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = REAL( A( KK, KK ) )
|
||||
|
@ -834,7 +834,7 @@
|
|||
A( J, K ) = CONJG( A( P, J ) )
|
||||
A( P, J ) = T
|
||||
44 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( P, K ) = CONJG( A( P, K ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = REAL( A( K, K ) )
|
||||
|
@ -862,7 +862,7 @@
|
|||
A( J, KK ) = CONJG( A( KP, J ) )
|
||||
A( KP, J ) = T
|
||||
45 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( KP, KK ) = CONJG( A( KP, KK ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = REAL( A( KK, KK ) )
|
||||
|
|
|
@ -420,7 +420,7 @@
|
|||
A( J, K ) = CONJG( A( P, J ) )
|
||||
A( P, J ) = T
|
||||
14 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( P, K ) = CONJG( A( P, K ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = REAL( A( K, K ) )
|
||||
|
@ -441,7 +441,7 @@
|
|||
A( J, KK ) = CONJG( A( KP, J ) )
|
||||
A( KP, J ) = T
|
||||
15 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( KP, KK ) = CONJG( A( KP, KK ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = REAL( A( KK, KK ) )
|
||||
|
@ -733,7 +733,7 @@
|
|||
A( J, K ) = CONJG( A( P, J ) )
|
||||
A( P, J ) = T
|
||||
44 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( P, K ) = CONJG( A( P, K ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = REAL( A( K, K ) )
|
||||
|
@ -754,7 +754,7 @@
|
|||
A( J, KK ) = CONJG( A( KP, J ) )
|
||||
A( KP, J ) = T
|
||||
45 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( KP, KK ) = CONJG( A( KP, KK ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = REAL( A( KK, KK ) )
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
*>
|
||||
*> On exit, the tridiagonal matrix is stored in the diagonals
|
||||
*> and the subdiagonals of A just below (or above) the diagonals,
|
||||
*> and L is stored below (or above) the subdiaonals, when UPLO
|
||||
*> and L is stored below (or above) the subdiagonals, when UPLO
|
||||
*> is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
*> triangular part of the matrix A, and the strictly upper
|
||||
*> triangular part of A is not referenced.
|
||||
*>
|
||||
*> On exit, L is stored below (or above) the subdiaonal blocks,
|
||||
*> On exit, L is stored below (or above) the subdiagonal blocks,
|
||||
*> when UPLO is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* Definition:
|
||||
* ===========
|
||||
*
|
||||
* SUBROUTINE CLA_GBRFSX_EXTENDED ( PREC_TYPE, TRANS_TYPE, N, KL, KU,
|
||||
* SUBROUTINE CLA_GBRFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, KL, KU,
|
||||
* NRHS, AB, LDAB, AFB, LDAFB, IPIV,
|
||||
* COLEQU, C, B, LDB, Y, LDY,
|
||||
* BERR_OUT, N_NORMS, ERR_BNDS_NORM,
|
||||
|
@ -400,7 +400,7 @@
|
|||
*> \ingroup complexGBcomputational
|
||||
*
|
||||
* =====================================================================
|
||||
SUBROUTINE CLA_GBRFSX_EXTENDED ( PREC_TYPE, TRANS_TYPE, N, KL, KU,
|
||||
SUBROUTINE CLA_GBRFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, KL, KU,
|
||||
$ NRHS, AB, LDAB, AFB, LDAFB, IPIV,
|
||||
$ COLEQU, C, B, LDB, Y, LDY,
|
||||
$ BERR_OUT, N_NORMS, ERR_BNDS_NORM,
|
||||
|
@ -651,7 +651,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF ( Y_PREC_STATE .LT. EXTRA_Y ) THEN
|
||||
CALL CAXPY( N, (1.0E+0,0.0E+0), DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -637,7 +637,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF ( Y_PREC_STATE .LT. EXTRA_Y ) THEN
|
||||
CALL CAXPY( N, (1.0E+0,0.0E+0), DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -654,7 +654,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF ( Y_PREC_STATE .LT. EXTRA_Y ) THEN
|
||||
CALL CAXPY( N, CMPLX(1.0), DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -625,7 +625,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF (Y_PREC_STATE .LT. EXTRA_Y) THEN
|
||||
CALL CAXPY( N, CMPLX(1.0), DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -654,7 +654,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF ( Y_PREC_STATE .LT. EXTRA_Y ) THEN
|
||||
CALL CAXPY( N, CMPLX(1.0), DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -363,7 +363,7 @@
|
|||
RETURN
|
||||
END IF
|
||||
*
|
||||
* Prepare the INDXQ sorting premutation.
|
||||
* Prepare the INDXQ sorting permutation.
|
||||
*
|
||||
N1 = K
|
||||
N2 = N - K
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
*> Anal., 29(2006), pp. 199--227.
|
||||
*>
|
||||
*> Ref: T. Steel, D. Camps, K. Meerbergen, R. Vandebril "A multishift,
|
||||
*> multipole rational QZ method with agressive early deflation"
|
||||
*> multipole rational QZ method with aggressive early deflation"
|
||||
*> \endverbatim
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -310,7 +310,7 @@
|
|||
CHARACTER :: JBCMPZ*3
|
||||
|
||||
* External Functions
|
||||
EXTERNAL :: XERBLA, CHGEQZ, CLAQZ2, CLAQZ3, CLASET, SLABAD,
|
||||
EXTERNAL :: XERBLA, CHGEQZ, CLAQZ2, CLAQZ3, CLASET,
|
||||
$ CLARTG, CROT
|
||||
REAL, EXTERNAL :: SLAMCH, CLANHS
|
||||
LOGICAL, EXTERNAL :: LSAME
|
||||
|
@ -462,7 +462,6 @@
|
|||
* Get machine constants
|
||||
SAFMIN = SLAMCH( 'SAFE MINIMUM' )
|
||||
SAFMAX = ONE/SAFMIN
|
||||
CALL SLABAD( SAFMIN, SAFMAX )
|
||||
ULP = SLAMCH( 'PRECISION' )
|
||||
SMLNUM = SAFMIN*( REAL( N )/ULP )
|
||||
|
||||
|
@ -533,7 +532,7 @@
|
|||
DO WHILE ( K.GE.ISTART2 )
|
||||
|
||||
IF( ABS( B( K, K ) ) .LT. BTOL ) THEN
|
||||
* A diagonal element of B is negligable, move it
|
||||
* A diagonal element of B is negligible, move it
|
||||
* to the top and deflate it
|
||||
|
||||
DO K2 = K, ISTART2+1, -1
|
||||
|
|
|
@ -452,7 +452,7 @@
|
|||
IF( LNOTIDENT ) THEN
|
||||
*
|
||||
* col2_(2) Compute W2: = (V1**H) * W2 = (A1**H) * W2,
|
||||
* V1 is not an identy matrix, but unit lower-triangular
|
||||
* V1 is not an identity matrix, but unit lower-triangular
|
||||
* V1 stored in A1 (diagonal ones are not stored).
|
||||
*
|
||||
*
|
||||
|
|
|
@ -227,7 +227,7 @@
|
|||
BM = RHS( J ) - CONE
|
||||
SPLUS = ONE
|
||||
*
|
||||
* Lockahead for L- part RHS(1:N-1) = +-1
|
||||
* Look-ahead for L- part RHS(1:N-1) = +-1
|
||||
* SPLUS and SMIN computed more efficiently than in BSOLVE[1].
|
||||
*
|
||||
SPLUS = SPLUS + REAL( CDOTC( N-J, Z( J+1, J ), 1, Z( J+1,
|
||||
|
|
|
@ -577,7 +577,7 @@
|
|||
* Prepare the linear update to be executed with GEMM.
|
||||
* For each column, compute a consistent scaling, a
|
||||
* scaling factor to survive the linear update, and
|
||||
* rescale the column segments, if necesssary. Then
|
||||
* rescale the column segments, if necessary. Then
|
||||
* the linear update is safely executed.
|
||||
*
|
||||
DO KK = 1, K2-K1
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
*> CSYTRF provided on entry in parameter A into the factorization
|
||||
*> output format used in CSYTRF_RK (or CSYTRF_BK) that is stored
|
||||
*> on exit in parameters A and E. It also converts in place details of
|
||||
*> the intechanges stored in IPIV from the format used in CSYTRF into
|
||||
*> the interchanges stored in IPIV from the format used in CSYTRF into
|
||||
*> the format used in CSYTRF_RK (or CSYTRF_BK).
|
||||
*>
|
||||
*> If parameter WAY = 'R':
|
||||
|
@ -48,7 +48,7 @@
|
|||
*> (or CSYTRF_BK) provided on entry in parameters A and E into
|
||||
*> the factorization output format used in CSYTRF that is stored
|
||||
*> on exit in parameter A. It also converts in place details of
|
||||
*> the intechanges stored in IPIV from the format used in CSYTRF_RK
|
||||
*> the interchanges stored in IPIV from the format used in CSYTRF_RK
|
||||
*> (or CSYTRF_BK) into the format used in CSYTRF.
|
||||
*>
|
||||
*> CSYCONVF can also convert in Hermitian matrix case, i.e. between
|
||||
|
@ -325,7 +325,7 @@
|
|||
END IF
|
||||
*
|
||||
* Convert IPIV
|
||||
* There is no interchnge of rows i and and IPIV(i),
|
||||
* There is no interchange of rows i and and IPIV(i),
|
||||
* so this should be reflected in IPIV format for
|
||||
* *SYTRF_RK ( or *SYTRF_BK)
|
||||
*
|
||||
|
@ -469,7 +469,7 @@
|
|||
END IF
|
||||
*
|
||||
* Convert IPIV
|
||||
* There is no interchnge of rows i and and IPIV(i),
|
||||
* There is no interchange of rows i and and IPIV(i),
|
||||
* so this should be reflected in IPIV format for
|
||||
* *SYTRF_RK ( or *SYTRF_BK)
|
||||
*
|
||||
|
@ -535,7 +535,7 @@
|
|||
*
|
||||
* Revert VALUE
|
||||
* Assign subdiagonal entries of D from array E to
|
||||
* subgiagonal entries of A.
|
||||
* subdiagonal entries of A.
|
||||
*
|
||||
I = 1
|
||||
DO WHILE ( I.LE.N-1 )
|
||||
|
|
|
@ -520,7 +520,7 @@
|
|||
*
|
||||
* Revert VALUE
|
||||
* Assign subdiagonal entries of D from array E to
|
||||
* subgiagonal entries of A.
|
||||
* subdiagonal entries of A.
|
||||
*
|
||||
I = 1
|
||||
DO WHILE ( I.LE.N-1 )
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
*> triangular part of the matrix A, and the strictly upper
|
||||
*> triangular part of A is not referenced.
|
||||
*>
|
||||
*> On exit, L is stored below (or above) the subdiaonal blocks,
|
||||
*> On exit, L is stored below (or above) the subdiagonal blocks,
|
||||
*> when UPLO is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
*>
|
||||
*> On exit, the tridiagonal matrix is stored in the diagonals
|
||||
*> and the subdiagonals of A just below (or above) the diagonals,
|
||||
*> and L is stored below (or above) the subdiaonals, when UPLO
|
||||
*> and L is stored below (or above) the subdiagonals, when UPLO
|
||||
*> is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
*> triangular part of the matrix A, and the strictly upper
|
||||
*> triangular part of A is not referenced.
|
||||
*>
|
||||
*> On exit, L is stored below (or above) the subdiaonal blocks,
|
||||
*> On exit, L is stored below (or above) the subdiagonal blocks,
|
||||
*> when UPLO is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
*>
|
||||
*> The Schur form T is reordered by a unitary similarity transformation
|
||||
*> Z**H*T*Z, and optionally the matrix Q of Schur vectors is updated by
|
||||
*> postmultplying it with Z.
|
||||
*> postmultiplying it with Z.
|
||||
*> \endverbatim
|
||||
*
|
||||
* Arguments:
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*>\verbatim
|
||||
*>
|
||||
*> CUNBDB1 simultaneously bidiagonalizes the blocks of a tall and skinny
|
||||
*> matrix X with orthonomal columns:
|
||||
*> matrix X with orthonormal columns:
|
||||
*>
|
||||
*> [ B11 ]
|
||||
*> [ X11 ] [ P1 | ] [ 0 ]
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*>\verbatim
|
||||
*>
|
||||
*> CUNBDB2 simultaneously bidiagonalizes the blocks of a tall and skinny
|
||||
*> matrix X with orthonomal columns:
|
||||
*> matrix X with orthonormal columns:
|
||||
*>
|
||||
*> [ B11 ]
|
||||
*> [ X11 ] [ P1 | ] [ 0 ]
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*>\verbatim
|
||||
*>
|
||||
*> CUNBDB3 simultaneously bidiagonalizes the blocks of a tall and skinny
|
||||
*> matrix X with orthonomal columns:
|
||||
*> matrix X with orthonormal columns:
|
||||
*>
|
||||
*> [ B11 ]
|
||||
*> [ X11 ] [ P1 | ] [ 0 ]
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
*>\verbatim
|
||||
*>
|
||||
*> CUNBDB4 simultaneously bidiagonalizes the blocks of a tall and skinny
|
||||
*> matrix X with orthonomal columns:
|
||||
*> matrix X with orthonormal columns:
|
||||
*>
|
||||
*> [ B11 ]
|
||||
*> [ X11 ] [ P1 | ] [ 0 ]
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
*>
|
||||
*> Given an upper bidiagonal B with diagonal D = [ d_1 d_2 ... d_N ]
|
||||
*> and superdiagonal E = [ e_1 e_2 ... e_N-1 ], DBDSVDX computes the
|
||||
*> singular value decompositon of B through the eigenvalues and
|
||||
*> singular value decomposition of B through the eigenvalues and
|
||||
*> eigenvectors of the N*2-by-N*2 tridiagonal matrix
|
||||
*>
|
||||
*> | 0 d_1 |
|
||||
|
|
|
@ -253,7 +253,7 @@
|
|||
*> 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
|
||||
*> then V is used as workspace if the procedure
|
||||
*> 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
|
||||
|
|
|
@ -365,7 +365,7 @@
|
|||
*> an optimal implementation would do all necessary scaling before calling
|
||||
*> CGESVD and the scaling in CGESVD can be switched off.
|
||||
*> 3. Other comments related to code optimization are given in comments in the
|
||||
*> code, enlosed in [[double brackets]].
|
||||
*> code, enclosed in [[double brackets]].
|
||||
*> \endverbatim
|
||||
*
|
||||
*> \par Bugs, examples and comments
|
||||
|
|
|
@ -52,10 +52,10 @@
|
|||
*> Specifies whether the output from this procedure is used
|
||||
*> to compute the matrix V:
|
||||
*> = 'V': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the N-by-N array V.
|
||||
*> by postmultiplying the N-by-N array V.
|
||||
*> (See the description of V.)
|
||||
*> = 'A': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the MV-by-N array V.
|
||||
*> by postmultiplying the MV-by-N array V.
|
||||
*> (See the descriptions of MV and V.)
|
||||
*> = 'N': the Jacobi rotations are not accumulated.
|
||||
*> \endverbatim
|
||||
|
|
|
@ -75,10 +75,10 @@
|
|||
*> Specifies whether the output from this procedure is used
|
||||
*> to compute the matrix V:
|
||||
*> = 'V': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the N-by-N array V.
|
||||
*> by postmultiplying the N-by-N array V.
|
||||
*> (See the description of V.)
|
||||
*> = 'A': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the MV-by-N array V.
|
||||
*> by postmultiplying the MV-by-N array V.
|
||||
*> (See the descriptions of MV and V.)
|
||||
*> = 'N': the Jacobi rotations are not accumulated.
|
||||
*> \endverbatim
|
||||
|
|
|
@ -645,7 +645,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF (Y_PREC_STATE .LT. EXTRA_Y) THEN
|
||||
CALL DAXPY( N, 1.0D+0, DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -625,7 +625,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF ( Y_PREC_STATE .LT. EXTRA_Y ) THEN
|
||||
CALL DAXPY( N, 1.0D+0, DY, 1, Y( 1, J ), 1 )
|
||||
|
|
|
@ -617,7 +617,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF (Y_PREC_STATE .LT. EXTRA_Y) THEN
|
||||
CALL DAXPY( N, 1.0D+0, DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -647,7 +647,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF (Y_PREC_STATE .LT. EXTRA_Y) THEN
|
||||
CALL DAXPY( N, 1.0D+0, DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
*> Anal., 29(2006), pp. 199--227.
|
||||
*>
|
||||
*> Ref: T. Steel, D. Camps, K. Meerbergen, R. Vandebril "A multishift,
|
||||
*> multipole rational QZ method with agressive early deflation"
|
||||
*> multipole rational QZ method with aggressive early deflation"
|
||||
*> \endverbatim
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -332,7 +332,7 @@
|
|||
CHARACTER :: JBCMPZ*3
|
||||
|
||||
* External Functions
|
||||
EXTERNAL :: XERBLA, DHGEQZ, DLASET, DLAQZ3, DLAQZ4, DLABAD,
|
||||
EXTERNAL :: XERBLA, DHGEQZ, DLASET, DLAQZ3, DLAQZ4,
|
||||
$ DLARTG, DROT
|
||||
DOUBLE PRECISION, EXTERNAL :: DLAMCH, DLANHS
|
||||
LOGICAL, EXTERNAL :: LSAME
|
||||
|
@ -482,7 +482,6 @@
|
|||
* Get machine constants
|
||||
SAFMIN = DLAMCH( 'SAFE MINIMUM' )
|
||||
SAFMAX = ONE/SAFMIN
|
||||
CALL DLABAD( SAFMIN, SAFMAX )
|
||||
ULP = DLAMCH( 'PRECISION' )
|
||||
SMLNUM = SAFMIN*( DBLE( N )/ULP )
|
||||
|
||||
|
@ -567,7 +566,7 @@
|
|||
DO WHILE ( K.GE.ISTART2 )
|
||||
|
||||
IF( ABS( B( K, K ) ) .LT. BTOL ) THEN
|
||||
* A diagonal element of B is negligable, move it
|
||||
* A diagonal element of B is negligible, move it
|
||||
* to the top and deflate it
|
||||
|
||||
DO K2 = K, ISTART2+1, -1
|
||||
|
|
|
@ -451,7 +451,7 @@
|
|||
IF( LNOTIDENT ) THEN
|
||||
*
|
||||
* col2_(2) Compute W2: = (V1**T) * W2 = (A1**T) * W2,
|
||||
* V1 is not an identy matrix, but unit lower-triangular
|
||||
* V1 is not an identity matrix, but unit lower-triangular
|
||||
* V1 stored in A1 (diagonal ones are not stored).
|
||||
*
|
||||
*
|
||||
|
|
|
@ -574,7 +574,7 @@
|
|||
* Prepare the linear update to be executed with GEMM.
|
||||
* For each column, compute a consistent scaling, a
|
||||
* scaling factor to survive the linear update, and
|
||||
* rescale the column segments, if necesssary. Then
|
||||
* rescale the column segments, if necessary. Then
|
||||
* the linear update is safely executed.
|
||||
*
|
||||
DO KK = 1, K2-K1
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*>\verbatim
|
||||
*>
|
||||
*> DORBDB1 simultaneously bidiagonalizes the blocks of a tall and skinny
|
||||
*> matrix X with orthonomal columns:
|
||||
*> matrix X with orthonormal columns:
|
||||
*>
|
||||
*> [ B11 ]
|
||||
*> [ X11 ] [ P1 | ] [ 0 ]
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*>\verbatim
|
||||
*>
|
||||
*> DORBDB2 simultaneously bidiagonalizes the blocks of a tall and skinny
|
||||
*> matrix X with orthonomal columns:
|
||||
*> matrix X with orthonormal columns:
|
||||
*>
|
||||
*> [ B11 ]
|
||||
*> [ X11 ] [ P1 | ] [ 0 ]
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*>\verbatim
|
||||
*>
|
||||
*> DORBDB3 simultaneously bidiagonalizes the blocks of a tall and skinny
|
||||
*> matrix X with orthonomal columns:
|
||||
*> matrix X with orthonormal columns:
|
||||
*>
|
||||
*> [ B11 ]
|
||||
*> [ X11 ] [ P1 | ] [ 0 ]
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
*>\verbatim
|
||||
*>
|
||||
*> DORBDB4 simultaneously bidiagonalizes the blocks of a tall and skinny
|
||||
*> matrix X with orthonomal columns:
|
||||
*> matrix X with orthonormal columns:
|
||||
*>
|
||||
*> [ B11 ]
|
||||
*> [ X11 ] [ P1 | ] [ 0 ]
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
*> DSYTRF provided on entry in parameter A into the factorization
|
||||
*> output format used in DSYTRF_RK (or DSYTRF_BK) that is stored
|
||||
*> on exit in parameters A and E. It also converts in place details of
|
||||
*> the intechanges stored in IPIV from the format used in DSYTRF into
|
||||
*> the interchanges stored in IPIV from the format used in DSYTRF into
|
||||
*> the format used in DSYTRF_RK (or DSYTRF_BK).
|
||||
*>
|
||||
*> If parameter WAY = 'R':
|
||||
|
@ -48,7 +48,7 @@
|
|||
*> (or DSYTRF_BK) provided on entry in parameters A and E into
|
||||
*> the factorization output format used in DSYTRF that is stored
|
||||
*> on exit in parameter A. It also converts in place details of
|
||||
*> the intechanges stored in IPIV from the format used in DSYTRF_RK
|
||||
*> the interchanges stored in IPIV from the format used in DSYTRF_RK
|
||||
*> (or DSYTRF_BK) into the format used in DSYTRF.
|
||||
*> \endverbatim
|
||||
*
|
||||
|
@ -322,7 +322,7 @@
|
|||
END IF
|
||||
*
|
||||
* Convert IPIV
|
||||
* There is no interchnge of rows i and and IPIV(i),
|
||||
* There is no interchange of rows i and and IPIV(i),
|
||||
* so this should be reflected in IPIV format for
|
||||
* *SYTRF_RK ( or *SYTRF_BK)
|
||||
*
|
||||
|
@ -466,7 +466,7 @@
|
|||
END IF
|
||||
*
|
||||
* Convert IPIV
|
||||
* There is no interchnge of rows i and and IPIV(i),
|
||||
* There is no interchange of rows i and and IPIV(i),
|
||||
* so this should be reflected in IPIV format for
|
||||
* *SYTRF_RK ( or *SYTRF_BK)
|
||||
*
|
||||
|
@ -532,7 +532,7 @@
|
|||
*
|
||||
* Revert VALUE
|
||||
* Assign subdiagonal entries of D from array E to
|
||||
* subgiagonal entries of A.
|
||||
* subdiagonal entries of A.
|
||||
*
|
||||
I = 1
|
||||
DO WHILE ( I.LE.N-1 )
|
||||
|
|
|
@ -517,7 +517,7 @@
|
|||
*
|
||||
* Revert VALUE
|
||||
* Assign subdiagonal entries of D from array E to
|
||||
* subgiagonal entries of A.
|
||||
* subdiagonal entries of A.
|
||||
*
|
||||
I = 1
|
||||
DO WHILE ( I.LE.N-1 )
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
*> triangular part of the matrix A, and the strictly upper
|
||||
*> triangular part of A is not referenced.
|
||||
*>
|
||||
*> On exit, L is stored below (or above) the subdiaonal blocks,
|
||||
*> On exit, L is stored below (or above) the subdiagonal blocks,
|
||||
*> when UPLO is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
*>
|
||||
*> On exit, the tridiagonal matrix is stored in the diagonals
|
||||
*> and the subdiagonals of A just below (or above) the diagonals,
|
||||
*> and L is stored below (or above) the subdiaonals, when UPLO
|
||||
*> and L is stored below (or above) the subdiagonals, when UPLO
|
||||
*> is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
*> triangular part of the matrix A, and the strictly upper
|
||||
*> triangular part of A is not referenced.
|
||||
*>
|
||||
*> On exit, L is stored below (or above) the subdiaonal blocks,
|
||||
*> On exit, L is stored below (or above) the subdiagonal blocks,
|
||||
*> when UPLO is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
*>
|
||||
*> Given an upper bidiagonal B with diagonal D = [ d_1 d_2 ... d_N ]
|
||||
*> and superdiagonal E = [ e_1 e_2 ... e_N-1 ], SBDSVDX computes the
|
||||
*> singular value decompositon of B through the eigenvalues and
|
||||
*> singular value decomposition of B through the eigenvalues and
|
||||
*> eigenvectors of the N*2-by-N*2 tridiagonal matrix
|
||||
*>
|
||||
*> | 0 d_1 |
|
||||
|
|
|
@ -253,7 +253,7 @@
|
|||
*> 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
|
||||
*> then V is used as workspace if the procedure
|
||||
*> 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
|
||||
|
|
|
@ -365,7 +365,7 @@
|
|||
*> an optimal implementation would do all necessary scaling before calling
|
||||
*> CGESVD and the scaling in CGESVD can be switched off.
|
||||
*> 3. Other comments related to code optimization are given in comments in the
|
||||
*> code, enlosed in [[double brackets]].
|
||||
*> code, enclosed in [[double brackets]].
|
||||
*> \endverbatim
|
||||
*
|
||||
*> \par Bugs, examples and comments
|
||||
|
|
|
@ -52,10 +52,10 @@
|
|||
*> Specifies whether the output from this procedure is used
|
||||
*> to compute the matrix V:
|
||||
*> = 'V': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the N-by-N array V.
|
||||
*> by postmultiplying the N-by-N array V.
|
||||
*> (See the description of V.)
|
||||
*> = 'A': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the MV-by-N array V.
|
||||
*> by postmultiplying the MV-by-N array V.
|
||||
*> (See the descriptions of MV and V.)
|
||||
*> = 'N': the Jacobi rotations are not accumulated.
|
||||
*> \endverbatim
|
||||
|
|
|
@ -75,10 +75,10 @@
|
|||
*> Specifies whether the output from this procedure is used
|
||||
*> to compute the matrix V:
|
||||
*> = 'V': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the N-by-N array V.
|
||||
*> by postmultiplying the N-by-N array V.
|
||||
*> (See the description of V.)
|
||||
*> = 'A': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the MV-by-N array V.
|
||||
*> by postmultiplying the MV-by-N array V.
|
||||
*> (See the descriptions of MV and V.)
|
||||
*> = 'N': the Jacobi rotations are not accumulated.
|
||||
*> \endverbatim
|
||||
|
|
|
@ -644,7 +644,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF (Y_PREC_STATE .LT. EXTRA_Y) THEN
|
||||
CALL SAXPY( N, 1.0, DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -628,7 +628,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF ( Y_PREC_STATE .LT. EXTRA_Y ) THEN
|
||||
CALL SAXPY( N, 1.0, DY, 1, Y( 1, J ), 1 )
|
||||
|
|
|
@ -617,7 +617,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF (Y_PREC_STATE .LT. EXTRA_Y) THEN
|
||||
CALL SAXPY( N, 1.0, DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -647,7 +647,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF (Y_PREC_STATE .LT. EXTRA_Y) THEN
|
||||
CALL SAXPY( N, 1.0, DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
*> Anal., 29(2006), pp. 199--227.
|
||||
*>
|
||||
*> Ref: T. Steel, D. Camps, K. Meerbergen, R. Vandebril "A multishift,
|
||||
*> multipole rational QZ method with agressive early deflation"
|
||||
*> multipole rational QZ method with aggressive early deflation"
|
||||
*> \endverbatim
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -329,7 +329,7 @@
|
|||
CHARACTER :: JBCMPZ*3
|
||||
|
||||
* External Functions
|
||||
EXTERNAL :: XERBLA, SHGEQZ, SLAQZ3, SLAQZ4, SLASET, SLABAD,
|
||||
EXTERNAL :: XERBLA, SHGEQZ, SLAQZ3, SLAQZ4, SLASET,
|
||||
$ SLARTG, SROT
|
||||
REAL, EXTERNAL :: SLAMCH, SLANHS
|
||||
LOGICAL, EXTERNAL :: LSAME
|
||||
|
@ -479,7 +479,6 @@
|
|||
* Get machine constants
|
||||
SAFMIN = SLAMCH( 'SAFE MINIMUM' )
|
||||
SAFMAX = ONE/SAFMIN
|
||||
CALL SLABAD( SAFMIN, SAFMAX )
|
||||
ULP = SLAMCH( 'PRECISION' )
|
||||
SMLNUM = SAFMIN*( REAL( N )/ULP )
|
||||
|
||||
|
@ -564,7 +563,7 @@
|
|||
DO WHILE ( K.GE.ISTART2 )
|
||||
|
||||
IF( ABS( B( K, K ) ) .LT. BTOL ) THEN
|
||||
* A diagonal element of B is negligable, move it
|
||||
* A diagonal element of B is negligible, move it
|
||||
* to the top and deflate it
|
||||
|
||||
DO K2 = K, ISTART2+1, -1
|
||||
|
|
|
@ -451,7 +451,7 @@
|
|||
IF( LNOTIDENT ) THEN
|
||||
*
|
||||
* col2_(2) Compute W2: = (V1**T) * W2 = (A1**T) * W2,
|
||||
* V1 is not an identy matrix, but unit lower-triangular
|
||||
* V1 is not an identity matrix, but unit lower-triangular
|
||||
* V1 stored in A1 (diagonal ones are not stored).
|
||||
*
|
||||
*
|
||||
|
|
|
@ -574,7 +574,7 @@
|
|||
* Prepare the linear update to be executed with GEMM.
|
||||
* For each column, compute a consistent scaling, a
|
||||
* scaling factor to survive the linear update, and
|
||||
* rescale the column segments, if necesssary. Then
|
||||
* rescale the column segments, if necessary. Then
|
||||
* the linear update is safely executed.
|
||||
*
|
||||
DO KK = 1, K2-K1
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*>\verbatim
|
||||
*>
|
||||
*> SORBDB1 simultaneously bidiagonalizes the blocks of a tall and skinny
|
||||
*> matrix X with orthonomal columns:
|
||||
*> matrix X with orthonormal columns:
|
||||
*>
|
||||
*> [ B11 ]
|
||||
*> [ X11 ] [ P1 | ] [ 0 ]
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*>\verbatim
|
||||
*>
|
||||
*> SORBDB2 simultaneously bidiagonalizes the blocks of a tall and skinny
|
||||
*> matrix X with orthonomal columns:
|
||||
*> matrix X with orthonormal columns:
|
||||
*>
|
||||
*> [ B11 ]
|
||||
*> [ X11 ] [ P1 | ] [ 0 ]
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*>\verbatim
|
||||
*>
|
||||
*> SORBDB3 simultaneously bidiagonalizes the blocks of a tall and skinny
|
||||
*> matrix X with orthonomal columns:
|
||||
*> matrix X with orthonormal columns:
|
||||
*>
|
||||
*> [ B11 ]
|
||||
*> [ X11 ] [ P1 | ] [ 0 ]
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
*>\verbatim
|
||||
*>
|
||||
*> SORBDB4 simultaneously bidiagonalizes the blocks of a tall and skinny
|
||||
*> matrix X with orthonomal columns:
|
||||
*> matrix X with orthonormal columns:
|
||||
*>
|
||||
*> [ B11 ]
|
||||
*> [ X11 ] [ P1 | ] [ 0 ]
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
*> SSYTRF provided on entry in parameter A into the factorization
|
||||
*> output format used in SSYTRF_RK (or SSYTRF_BK) that is stored
|
||||
*> on exit in parameters A and E. It also converts in place details of
|
||||
*> the intechanges stored in IPIV from the format used in SSYTRF into
|
||||
*> the interchanges stored in IPIV from the format used in SSYTRF into
|
||||
*> the format used in SSYTRF_RK (or SSYTRF_BK).
|
||||
*>
|
||||
*> If parameter WAY = 'R':
|
||||
|
@ -48,7 +48,7 @@
|
|||
*> (or SSYTRF_BK) provided on entry in parameters A and E into
|
||||
*> the factorization output format used in SSYTRF that is stored
|
||||
*> on exit in parameter A. It also converts in place details of
|
||||
*> the intechanges stored in IPIV from the format used in SSYTRF_RK
|
||||
*> the interchanges stored in IPIV from the format used in SSYTRF_RK
|
||||
*> (or SSYTRF_BK) into the format used in SSYTRF.
|
||||
*> \endverbatim
|
||||
*
|
||||
|
@ -322,7 +322,7 @@
|
|||
END IF
|
||||
*
|
||||
* Convert IPIV
|
||||
* There is no interchnge of rows i and and IPIV(i),
|
||||
* There is no interchange of rows i and and IPIV(i),
|
||||
* so this should be reflected in IPIV format for
|
||||
* *SYTRF_RK ( or *SYTRF_BK)
|
||||
*
|
||||
|
@ -466,7 +466,7 @@
|
|||
END IF
|
||||
*
|
||||
* Convert IPIV
|
||||
* There is no interchnge of rows i and and IPIV(i),
|
||||
* There is no interchange of rows i and and IPIV(i),
|
||||
* so this should be reflected in IPIV format for
|
||||
* *SYTRF_RK ( or *SYTRF_BK)
|
||||
*
|
||||
|
@ -532,7 +532,7 @@
|
|||
*
|
||||
* Revert VALUE
|
||||
* Assign subdiagonal entries of D from array E to
|
||||
* subgiagonal entries of A.
|
||||
* subdiagonal entries of A.
|
||||
*
|
||||
I = 1
|
||||
DO WHILE ( I.LE.N-1 )
|
||||
|
|
|
@ -517,7 +517,7 @@
|
|||
*
|
||||
* Revert VALUE
|
||||
* Assign subdiagonal entries of D from array E to
|
||||
* subgiagonal entries of A.
|
||||
* subdiagonal entries of A.
|
||||
*
|
||||
I = 1
|
||||
DO WHILE ( I.LE.N-1 )
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
*> triangular part of the matrix A, and the strictly upper
|
||||
*> triangular part of A is not referenced.
|
||||
*>
|
||||
*> On exit, L is stored below (or above) the subdiaonal blocks,
|
||||
*> On exit, L is stored below (or above) the subdiagonal blocks,
|
||||
*> when UPLO is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
*>
|
||||
*> On exit, the tridiagonal matrix is stored in the diagonals
|
||||
*> and the subdiagonals of A just below (or above) the diagonals,
|
||||
*> and L is stored below (or above) the subdiaonals, when UPLO
|
||||
*> and L is stored below (or above) the subdiagonals, when UPLO
|
||||
*> is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
*> triangular part of the matrix A, and the strictly upper
|
||||
*> triangular part of A is not referenced.
|
||||
*>
|
||||
*> On exit, L is stored below (or above) the subdiaonal blocks,
|
||||
*> On exit, L is stored below (or above) the subdiagonal blocks,
|
||||
*> when UPLO is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -252,7 +252,7 @@
|
|||
*> 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
|
||||
*> then V is used as workspace if the procedure
|
||||
*> 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
|
||||
|
|
|
@ -363,7 +363,7 @@
|
|||
*> an optimal implementation would do all necessary scaling before calling
|
||||
*> CGESVD and the scaling in CGESVD can be switched off.
|
||||
*> 3. Other comments related to code optimization are given in comments in the
|
||||
*> code, enlosed in [[double brackets]].
|
||||
*> code, enclosed in [[double brackets]].
|
||||
*> \endverbatim
|
||||
*
|
||||
*> \par Bugs, examples and comments
|
||||
|
|
|
@ -52,10 +52,10 @@
|
|||
*> Specifies whether the output from this procedure is used
|
||||
*> to compute the matrix V:
|
||||
*> = 'V': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the N-by-N array V.
|
||||
*> by postmultiplying the N-by-N array V.
|
||||
*> (See the description of V.)
|
||||
*> = 'A': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the MV-by-N array V.
|
||||
*> by postmultiplying the MV-by-N array V.
|
||||
*> (See the descriptions of MV and V.)
|
||||
*> = 'N': the Jacobi rotations are not accumulated.
|
||||
*> \endverbatim
|
||||
|
|
|
@ -75,10 +75,10 @@
|
|||
*> Specifies whether the output from this procedure is used
|
||||
*> to compute the matrix V:
|
||||
*> = 'V': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the N-by-N array V.
|
||||
*> by postmultiplying the N-by-N array V.
|
||||
*> (See the description of V.)
|
||||
*> = 'A': the product of the Jacobi rotations is accumulated
|
||||
*> by postmulyiplying the MV-by-N array V.
|
||||
*> by postmultiplying the MV-by-N array V.
|
||||
*> (See the descriptions of MV and V.)
|
||||
*> = 'N': the Jacobi rotations are not accumulated.
|
||||
*> \endverbatim
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
*> triangular part of the matrix A, and the strictly upper
|
||||
*> triangular part of A is not referenced.
|
||||
*>
|
||||
*> On exit, L is stored below (or above) the subdiaonal blocks,
|
||||
*> On exit, L is stored below (or above) the subdiagonal blocks,
|
||||
*> when UPLO is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -480,7 +480,7 @@
|
|||
A( J, K ) = DCONJG( A( P, J ) )
|
||||
A( P, J ) = T
|
||||
14 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( P, K ) = DCONJG( A( P, K ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = DBLE( A( K, K ) )
|
||||
|
@ -508,7 +508,7 @@
|
|||
A( J, KK ) = DCONJG( A( KP, J ) )
|
||||
A( KP, J ) = T
|
||||
15 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( KP, KK ) = DCONJG( A( KP, KK ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = DBLE( A( KK, KK ) )
|
||||
|
@ -834,7 +834,7 @@
|
|||
A( J, K ) = DCONJG( A( P, J ) )
|
||||
A( P, J ) = T
|
||||
44 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( P, K ) = DCONJG( A( P, K ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = DBLE( A( K, K ) )
|
||||
|
@ -862,7 +862,7 @@
|
|||
A( J, KK ) = DCONJG( A( KP, J ) )
|
||||
A( KP, J ) = T
|
||||
45 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( KP, KK ) = DCONJG( A( KP, KK ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = DBLE( A( KK, KK ) )
|
||||
|
|
|
@ -420,7 +420,7 @@
|
|||
A( J, K ) = DCONJG( A( P, J ) )
|
||||
A( P, J ) = T
|
||||
14 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( P, K ) = DCONJG( A( P, K ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = DBLE( A( K, K ) )
|
||||
|
@ -441,7 +441,7 @@
|
|||
A( J, KK ) = DCONJG( A( KP, J ) )
|
||||
A( KP, J ) = T
|
||||
15 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( KP, KK ) = DCONJG( A( KP, KK ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = DBLE( A( KK, KK ) )
|
||||
|
@ -733,7 +733,7 @@
|
|||
A( J, K ) = DCONJG( A( P, J ) )
|
||||
A( P, J ) = T
|
||||
44 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( P, K ) = DCONJG( A( P, K ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = DBLE( A( K, K ) )
|
||||
|
@ -754,7 +754,7 @@
|
|||
A( J, KK ) = DCONJG( A( KP, J ) )
|
||||
A( KP, J ) = T
|
||||
45 CONTINUE
|
||||
* (3) Swap and conjugate corner elements at row-col interserction
|
||||
* (3) Swap and conjugate corner elements at row-col intersection
|
||||
A( KP, KK ) = DCONJG( A( KP, KK ) )
|
||||
* (4) Swap diagonal elements at row-col intersection
|
||||
R1 = DBLE( A( KK, KK ) )
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
*>
|
||||
*> On exit, the tridiagonal matrix is stored in the diagonals
|
||||
*> and the subdiagonals of A just below (or above) the diagonals,
|
||||
*> and L is stored below (or above) the subdiaonals, when UPLO
|
||||
*> and L is stored below (or above) the subdiagonals, when UPLO
|
||||
*> is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
*> triangular part of the matrix A, and the strictly upper
|
||||
*> triangular part of A is not referenced.
|
||||
*>
|
||||
*> On exit, L is stored below (or above) the subdiaonal blocks,
|
||||
*> On exit, L is stored below (or above) the subdiagonal blocks,
|
||||
*> when UPLO is 'L' (or 'U').
|
||||
*> \endverbatim
|
||||
*>
|
||||
|
|
|
@ -651,7 +651,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF ( Y_PREC_STATE .LT. EXTRA_Y ) THEN
|
||||
CALL ZAXPY( N, (1.0D+0,0.0D+0), DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -636,7 +636,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF ( Y_PREC_STATE .LT. EXTRA_Y ) THEN
|
||||
CALL ZAXPY( N, (1.0D+0,0.0D+0), DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -655,7 +655,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF ( Y_PREC_STATE .LT. EXTRA_Y ) THEN
|
||||
CALL ZAXPY( N, DCMPLX(1.0D+0), DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -626,7 +626,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF (Y_PREC_STATE .LT. EXTRA_Y) THEN
|
||||
CALL ZAXPY( N, DCMPLX(1.0D+0), DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -655,7 +655,7 @@
|
|||
PREVNORMDX = NORMDX
|
||||
PREV_DZ_Z = DZ_Z
|
||||
*
|
||||
* Update soluton.
|
||||
* Update solution.
|
||||
*
|
||||
IF ( Y_PREC_STATE .LT. EXTRA_Y ) THEN
|
||||
CALL ZAXPY( N, DCMPLX(1.0D+0), DY, 1, Y(1,J), 1 )
|
||||
|
|
|
@ -363,7 +363,7 @@
|
|||
RETURN
|
||||
END IF
|
||||
*
|
||||
* Prepare the INDXQ sorting premutation.
|
||||
* Prepare the INDXQ sorting permutation.
|
||||
*
|
||||
N1 = K
|
||||
N2 = N - K
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
*> Anal., 29(2006), pp. 199--227.
|
||||
*>
|
||||
*> Ref: T. Steel, D. Camps, K. Meerbergen, R. Vandebril "A multishift,
|
||||
*> multipole rational QZ method with agressive early deflation"
|
||||
*> multipole rational QZ method with aggressive early deflation"
|
||||
*> \endverbatim
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -312,7 +312,7 @@
|
|||
CHARACTER :: JBCMPZ*3
|
||||
|
||||
* External Functions
|
||||
EXTERNAL :: XERBLA, ZHGEQZ, ZLAQZ2, ZLAQZ3, ZLASET, DLABAD,
|
||||
EXTERNAL :: XERBLA, ZHGEQZ, ZLAQZ2, ZLAQZ3, ZLASET,
|
||||
$ ZLARTG, ZROT
|
||||
DOUBLE PRECISION, EXTERNAL :: DLAMCH, ZLANHS
|
||||
LOGICAL, EXTERNAL :: LSAME
|
||||
|
@ -464,7 +464,6 @@
|
|||
* Get machine constants
|
||||
SAFMIN = DLAMCH( 'SAFE MINIMUM' )
|
||||
SAFMAX = ONE/SAFMIN
|
||||
CALL DLABAD( SAFMIN, SAFMAX )
|
||||
ULP = DLAMCH( 'PRECISION' )
|
||||
SMLNUM = SAFMIN*( DBLE( N )/ULP )
|
||||
|
||||
|
@ -535,7 +534,7 @@
|
|||
DO WHILE ( K.GE.ISTART2 )
|
||||
|
||||
IF( ABS( B( K, K ) ) .LT. BTOL ) THEN
|
||||
* A diagonal element of B is negligable, move it
|
||||
* A diagonal element of B is negligible, move it
|
||||
* to the top and deflate it
|
||||
|
||||
DO K2 = K, ISTART2+1, -1
|
||||
|
|
|
@ -452,7 +452,7 @@
|
|||
IF( LNOTIDENT ) THEN
|
||||
*
|
||||
* col2_(2) Compute W2: = (V1**H) * W2 = (A1**H) * W2,
|
||||
* V1 is not an identy matrix, but unit lower-triangular
|
||||
* V1 is not an identity matrix, but unit lower-triangular
|
||||
* V1 stored in A1 (diagonal ones are not stored).
|
||||
*
|
||||
*
|
||||
|
|
|
@ -227,7 +227,7 @@
|
|||
BM = RHS( J ) - CONE
|
||||
SPLUS = ONE
|
||||
*
|
||||
* Lockahead for L- part RHS(1:N-1) = +-1
|
||||
* Look-ahead for L- part RHS(1:N-1) = +-1
|
||||
* SPLUS and SMIN computed more efficiently than in BSOLVE[1].
|
||||
*
|
||||
SPLUS = SPLUS + DBLE( ZDOTC( N-J, Z( J+1, J ), 1, Z( J+1,
|
||||
|
|
|
@ -577,7 +577,7 @@
|
|||
* Prepare the linear update to be executed with GEMM.
|
||||
* For each column, compute a consistent scaling, a
|
||||
* scaling factor to survive the linear update, and
|
||||
* rescale the column segments, if necesssary. Then
|
||||
* rescale the column segments, if necessary. Then
|
||||
* the linear update is safely executed.
|
||||
*
|
||||
DO KK = 1, K2 - K1
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue