Compare commits

..
76 Commits
Author SHA1 Message Date
thijssteel 7094cb0f7c add steqr wrappers for comparison 2024-03-06 17:07:20 +01:00
thijssteel 7a2ecc24e5 add fortran wrappers for steqr3 2024-03-06 16:33:46 +01:00
thijssteel b44c64faef add steqr3 2024-03-06 15:58:48 +01:00
thijssteel a4c4a4eb52 add steqr3 2024-03-06 14:24:35 +01:00
thijssteel 0d9803a29c add c wrapper to cpp rot 2024-03-06 11:58:41 +01:00
thijssteel 81be118bcb change filenames 2024-03-04 09:41:25 +01:00
thijssteel f57a792304 use direct overloading for rot 2024-03-01 18:10:27 +01:00
thijssteel 2bdd724ecf small change in template of lasr3 2024-03-01 18:10:08 +01:00
thijssteel 1a95ff9b67 add fortran wrappers for lasr3 2024-02-29 16:21:40 +01:00
thijssteel 5b521e6ccc copy over files from lapackv4 repo 2024-02-29 16:04:38 +01:00
langou fe843f99d6 Merge pull request #989 from angsch/bdsqr
Two small fixes of bdsqr
2024-02-26 06:19:52 -07:00
Angelika Schwarz 230b8c4862 Fix -ZERO singular value in bdsqr
[D,Z]BDSQR returns for

D = [ -4.0, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0]
E = [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]

as singular value  D(10) = -ZERO. By definition, singular values
are non-negative. LASQ1 already fixes the sign and returns +ZERO.
2024-02-23 19:46:45 +01:00
Angelika Schwarz acbac1092c Update documentation of work size in bdsqr (thanks @TarcioV)
In https://github.com/Reference-LAPACK/lapack/pull/234
only dbdsqr was updated. This updates the documentation
of the other precisions.
2024-02-23 19:46:34 +01:00
langou c6bc40164a Merge pull request #888 from mkrainiuk/lapacke_64
Add Index-64 API as extended API with _64 suffix for LAPACKE
2024-02-10 13:08:07 -07:00
Maria Kraynyuk bc5d836a31 resolve conflicts after rebasing 2024-02-05 11:37:53 -08:00
Maria Kraynyuk 15d05b4fbc fix code style in LAPACKE DGESV examples 2024-02-05 10:54:16 -08:00
Maria Kraynyuk 41909fd0c5 Add missed memory deallocation to LAPACKE DGESV examples 2024-02-05 10:54:16 -08:00
Maria Kraynyuk 21299d28eb Enable Index-64 extended API only for Intel and GNU compilers
Other compilers might not fully support preprocessing
2024-02-05 10:54:15 -08:00
Maria Kraynyuk 40ca7a2713 Include lapack_64.h only during the build 2024-02-05 10:54:04 -08:00
Maria Kraynyuk ee213a3ed3 resolve conflicts after rebasing 2024-02-05 10:32:21 -08:00
Maria Kraynyuk fe3e793c16 Remove unused lapack_64.h from la_constants 2024-02-05 10:32:21 -08:00
Maria Kraynyuk 81823e958c Fix -Werror=conversion problems in LAPACK with integer-8 2024-02-05 10:32:17 -08:00
Maria Kraynyuk ac2c5681bc MATGEN fix -Werror=conversion problems 2024-02-05 10:28:27 -08:00
Maria Kraynyuk 56aa979416 Fix problem with missed mod files in parallel LAPACK build 2024-02-05 10:28:27 -08:00
Maria Kraynyuk dae4c5a3a4 Add LAPACKE examples for extended _64 API 2024-02-05 10:28:27 -08:00
Maria Kraynyuk ba11da8301 MATGEN long lines updated by script 2024-02-05 10:28:27 -08:00
Maria Kraynyuk 19d3a4e638 Add extended API with _64 suffix to MATGEN 2024-02-05 10:28:26 -08:00
Maria Kraynyuk 3ccdccea9b LAPACK SRC long lines updated manually 2024-02-05 10:28:26 -08:00
Maria Kraynyuk a1e8cb4845 LAPACK SRC long lines updated by script 2024-02-05 10:28:25 -08:00
Maria Kraynyuk b891145899 Add extended API with _64 suffix to LAPACK with lapack_64.h 2024-02-05 10:28:08 -08:00
Maria Kraynyuk 907725572a Wrap all functions to macro for Index-64 API in LAPACKE 2024-02-05 10:21:06 -08:00
Maria Kraynyuk 741a2c2ee0 Add extended API with _64 suffix to LAPACKE 2024-02-05 10:20:49 -08:00
langou 50d689057a Merge pull request #984 from FrK5E/lapack_testing_py_typo
Typo
2024-01-25 14:35:21 -07:00
FrK5E cc90d869b0 Typo 2024-01-25 22:09:22 +01:00
langou add94979e9 Merge pull request #981 from christoph-conrads/980-CZLARFGP-must-re-scale-when-ALPHA-is-not-real
{C,Z}LARFGP: re-scale input vector more often
2024-01-18 08:33:55 -07:00
Christoph Conrads 827cb8e8eb {C,Z}LARFGP: re-scale input vector more often
Re-scale the input vector even if `X` is negligibly small in norm if the
imaginary part of `ALPHA` is nonzero. For otherwise `XNORM` will not be
computed with a small _relative_ error.

fixes #980
2024-01-17 18:52:16 +01:00
langou 0a3aa4db40 Merge pull request #979 from turboencabulator/doxygen-warnings
Fix Doxygen warnings
2024-01-16 22:40:41 -07:00
Kyle Guinn dead4e4dfd Fix missing DONE parameter name
SRC/slaqp3rk.f:585: warning: unexpected command endverbatim
SRC/dlaqp3rk.f:585: warning: unexpected command endverbatim
SRC/claqp3rk.f:579: warning: unexpected command endverbatim
SRC/zlaqp3rk.f:579: warning: unexpected command endverbatim
2024-01-16 22:46:23 -06:00
Kyle Guinn 6597d4803b Fix mismatched verbatim/endverbatim commands
SRC/zgedmd.f90:213: warning: reached end of comment while inside a \verbatim block; check for missing \endverbatim tag!
SRC/zgedmdq.f90:710: warning: unexpected command endverbatim
2024-01-16 22:46:23 -06:00
Kyle Guinn aa41ed6b5e Fix ZWORK parameter name
SRC/cgedmdq.f90:548: warning: argument 'lzwork' from the argument list of cgedmdq has multiple @param documentation sections
SRC/zgedmdq.f90:546: warning: argument 'lzwork' from the argument list of zgedmdq has multiple @param documentation sections
2024-01-16 22:46:13 -06:00
Kyle Guinn 79a0785334 Normalize line endings
sed -i 's/\s\+$//' SRC/*dmd* TESTING/EIG/*dmd*
Plus manually stripping empty lines at EOF.
2024-01-16 22:43:58 -06:00
langou 5d705a1a20 Merge pull request #978 from turboencabulator/doxygen-sync
Re-sync Doxyfile with CMake
2024-01-16 20:57:46 -07:00
Kyle Guinn 55d73a2ef2 Prevent html options from being applied to manpage generation
When both BUILD_HTML_DOCUMENTATION and BUILD_MAN_DOCUMENTATION are ON,
DOXYGEN_GENERATE_HTML was set to YES (and some other HTML-only variables
were set) whenever Doxyfile.man was generated, and therefore `make man`
would also populate DOCS/explore-html, but with less detail due to the
other differences between Doxyfile.man and Doxyfile.html.
2024-01-15 23:11:04 -06:00
Kyle Guinn 7952995ba0 Adjust Doxygen source and output paths
This removes another difference with DOCS/Doxyfile.

From the CMake 3.9.6 documentation (earliest version describing
doxygen_add_docs, I've updated cmake_minimum_required to match):

"So that relative input paths work as expected, by default the working
directory of the Doxygen command will be the current source directory
(i.e. CMAKE_CURRENT_SOURCE_DIR)."

Likewise for the output directory:

"Set to CMAKE_CURRENT_BINARY_DIR by this module.  Note that if the
project provides its own value for this and it is a relative path, it
will be converted to an absolute path relative to the current binary
directory.  This is necessary because doxygen will normally be run from
a directory within the source tree so that relative source paths work as
expected."
2024-01-15 22:35:16 -06:00
Kyle Guinn cf9b217c50 Add options missing from the existing Doxyfile
Both have been present in DOCS/Doxyfile since that file was added.
2024-01-15 21:55:08 -06:00
Kyle Guinn bd6fece37b Reset several Doxygen options to their default values
The goal is to minimize the output of `doxygen -x DOCS/Doxyfile` so that
it contains only the settings specified in CMakeLists.txt.  In all
cases, the changed values are intended to match what CMake is generating
when using -DBUILD_HTML_DOCUMENTATION=ON, and ideally the changes should
have no effect.

Comments for ABBREVIATE_BRIEF and EXAMPLE_PATTERNS describe the default
behavior when they are blank, but our blank values show up in the output
of `doxygen -x DOCS/Doxyfile` indicating that blank is not the default
value.  Setting values to match the current default behavior should have
no effect, unless Doxygen changes in the future.  On the other hand,
MATHJAX_RELPATH has changed and will change again in newer Doxygen
versions.

CMake automatically inserts its own set of EXCLUDE_PATTERNS that
contains none of the patterns previously listed here.  Neither the
previous values nor the CMake-generated ones should have any effect due
to our choice of INPUT and FILE_PATTERNS.

MATHJAX_RELPATH, LATEX_CMD_NAME, RTF_HYPERLINKS, and MAN_LINKS all
require some other option (USE_MATHJAX, GENERATE_LATEX, GENERATE_RTF,
and GENERATE_MAN, respectively) to be set to YES to take effect, and all
are set to NO, so these changes should have no effect.  Note that the
CMake-generated Doxyfile.man sets MAN_LINKS=YES in addition to
GENERATE_MAN=YES.
2024-01-15 21:31:50 -06:00
Kyle Guinn 62c9cd885a Skip setting Doxygen options to default values
QUIET defaults to NO, WARNINGS defaults to YES.
2024-01-15 15:55:41 -06:00
Kyle Guinn f81db935ca Sort Doxygen lists for comparison purposes 2024-01-15 15:54:41 -06:00
langou 8254fbdd80 Merge pull request #976 from christoph-conrads/975-LAPACK-requires-CMake-3.11-or-newer
CMake: restore compatibility with v3.10 and older
2024-01-13 09:48:01 -07:00
Christoph Conrads ec2805b5e9 CMake: restore compatibility with v3.10 and older
The COMPILE_OPTIONS property exists only from CMake 3.11 onwards.

fixes #975
2024-01-13 17:08:59 +01:00
langou d7ea9c52b9 Merge pull request #970 from turboencabulator/perms 2024-01-06 18:44:07 -07:00
Kyle Guinn 464f532552 Remove executable permissions from source files 2024-01-06 18:20:41 -06:00
langou db501d91ba Merge pull request #959 from dklyuchinskiy/lapack-fix-dmd-issues
fix some DMD issues
2023-12-12 09:00:09 -07:00
Dmitry Klyuchinsky 4787915207 init variable SSUM before call of LASSQ in DMD 2023-12-12 13:42:37 +07:00
Dmitry Klyuchinsky 101800018d add DMD tests into CMakeLists 2023-12-12 12:42:50 +07:00
langou c2255a8d4d Merge pull request #942 from dklyuchinskiy/lapack-257-zero-lwork 2023-12-04 08:15:01 -07:00
Dmitry Klyuchinsky 280e16145d add missed usage of sroundup_lwork in several functions 2023-12-04 18:29:06 +07:00
Dmitry Klyuchinsky cd7523d5b2 handle corner case of lwork in evr/evr_2stage and fix output format in chkxer 2023-12-04 16:35:36 +07:00
Dmitry Klyuchinsky 9dc24803a2 handle and document corner cases of lwork in lapack, align all precisions 2023-12-04 16:35:36 +07:00
Elizaveta Tokmasheva 7d15f830c2 handle and document corner cases of lwork in lapack, double complex precision 2023-12-04 16:35:35 +07:00
Elizaveta Tokmasheva e0d8afbed6 handle and document corner cases of lwork in lapack, single complex precision 2023-12-04 16:35:35 +07:00
Dmitry Klyuchinsky 0c1e0c3e75 handle and document corner cases of lwork in lapack, single precision 2023-12-04 16:35:35 +07:00
Dmitry Klyuchinsky 6032a6bca0 handle and document corner cases of lwork in lapack, double precision 2023-12-04 16:35:35 +07:00
langou a4298d5ff6 Merge pull request #954 from ACSimon33/lapack_testing_python_summary_bug
Fixed search phrase for determining the amount of successful tests
2023-12-01 07:37:55 -07:00
Simon Maertens 5b0687f429 Fixed search phrase for determining the amount of successful tests 2023-12-01 14:05:54 +00:00
langou 3200980553 Merge pull request #953 from ACSimon33/test_memory_leak
Fixed memory leak in testing framework
2023-11-29 08:43:39 -07:00
Simon Maertens 3d2b9cbdcd Fixed memory leak in testing framework (?chkaa.F) 2023-11-29 15:18:49 +00:00
langou af77ebfa6c Merge pull request #950 from ACSimon33/cblas_weak_attribute 2023-11-29 08:08:00 -07:00
langou 9560fe2fe3 Merge pull request #951 from ACSimon33/nagfor_imag_fix 2023-11-29 08:06:10 -07:00
Simon Maertens 2a0aea9c4c Added missing comma in FORMAT expression 2023-11-29 14:34:26 +00:00
Simon Maertens c69a96ea9e Added missing comma in FORMAT expression 2023-11-29 14:33:00 +00:00
Simon Maertens 8c54a57d66 Replaced non-standard IMAG function with its standard counterpart `AIMAG. 2023-11-29 14:31:16 +00:00
Simon Maertens 26db2da3eb Fixed Fortran compiler flags check for nagfor compiler and usage in CBLAS target 2023-11-29 14:30:30 +00:00
Simon Maertens 10432bb5e8 Fixed HAS_ATTRIBUTE_WEAK_SUPPORT flag for CBLAS objects 2023-11-29 12:53:09 +00:00
langou e78a2ad18c Merge pull request #948 from weslleyspereira/fix-945
Enables Fortran before including CheckFortranFunctionExists in CMakeL…
2023-11-27 12:04:16 -07:00
Weslley S Pereira cbb553627e Enables Fortran before including CheckFortranFunctionExists in CMakeLists.txt 2023-11-27 10:29:11 -07:00
4329 changed files with 73396 additions and 44342 deletions
+3
View File
@@ -43,3 +43,6 @@ build*
DOCS/man
DOCS/explore-html
output_err
# Editor config files
.vscode/
+4 -4
View File
@@ -124,9 +124,9 @@ if(BUILD_INDEX64_EXT_API)
#Add _64 suffix to all Fortran functions via macros
foreach(F IN LISTS SOURCES_64_F)
if(CMAKE_Fortran_COMPILER_ID STREQUAL "NAG")
set(COPT_64_F -fpp)
set_source_files_properties(${F} PROPERTIES COMPILE_FLAGS "-fpp")
else()
set(COPT_64_F -cpp)
set_source_files_properties(${F} PROPERTIES COMPILE_FLAGS "-cpp")
endif()
file(STRINGS ${F} ${F}.lst)
list(FILTER ${F}.lst INCLUDE REGEX "subroutine|SUBROUTINE|external|EXTERNAL|function|FUNCTION")
@@ -137,10 +137,10 @@ if(BUILD_INDEX64_EXT_API)
string(REGEX REPLACE "^[a-zA-Z0-9_ *]*(subroutine|SUBROUTINE|external|EXTERNAL|function|FUNCTION)[ ]*[*]?" "" FUNC ${FUNC})
string(REGEX REPLACE "[(][a-zA-Z0-9_, )]*$" "" FUNC ${FUNC})
string(STRIP ${FUNC} FUNC)
list(APPEND COPT_64_F "-D${FUNC}=${FUNC}_64")
list(APPEND COPT_64_F "${FUNC}=${FUNC}_64")
endforeach()
list(REMOVE_DUPLICATES COPT_64_F)
set_source_files_properties(${F} PROPERTIES COMPILE_OPTIONS "${COPT_64_F}")
set_source_files_properties(${F} PROPERTIES COMPILE_DEFINITIONS "${COPT_64_F}")
endforeach()
endif()
+4
View File
@@ -14,6 +14,10 @@ if(CMAKE_Fortran_COMPILER)
FortranCInterface_HEADER(${LAPACK_BINARY_DIR}/include/cblas_mangling.h
MACRO_NAMESPACE "F77_"
SYMBOL_NAMESPACE "F77_")
# Check for any necessary platform specific compiler flags
include(CheckLAPACKCompilerFlags)
CheckLAPACKCompilerFlags()
endif()
if(NOT FortranCInterface_GLOBAL_FOUND OR NOT FortranCInterface_MODULE_FOUND)
message(WARNING "Reverting to pre-defined include/cblas_mangling.h")
+7 -4
View File
@@ -119,6 +119,9 @@ list(REMOVE_DUPLICATES SOURCES)
add_library(${CBLASLIB}_obj OBJECT ${SOURCES})
set_target_properties(${CBLASLIB}_obj PROPERTIES POSITION_INDEPENDENT_CODE ON)
if(HAS_ATTRIBUTE_WEAK_SUPPORT)
target_compile_definitions(${CBLASLIB}_obj PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT)
endif()
if(BUILD_INDEX64_EXT_API)
# 64bit Integer Interface
@@ -143,6 +146,9 @@ if(BUILD_INDEX64_EXT_API)
LINKER_LANGUAGE C)
target_compile_options(${CBLASLIB}_64_cobj PRIVATE -DWeirdNEC -DCBLAS_API64)
target_compile_options(${CBLASLIB}_64_fobj PRIVATE ${FOPT_ILP64})
if(HAS_ATTRIBUTE_WEAK_SUPPORT)
target_compile_definitions(${CBLASLIB}_64_cobj PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT)
endif()
#Add suffix to all Fortran functions via macros
foreach(F IN LISTS SOURCES_64_F)
set(COPT_64_F)
@@ -169,11 +175,8 @@ set_target_properties(
SOVERSION ${LAPACK_MAJOR_VERSION}
POSITION_INDEPENDENT_CODE ON
)
if(HAS_ATTRIBUTE_WEAK_SUPPORT)
target_compile_definitions(${CBLASLIB} PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT)
endif()
target_include_directories(${CBLASLIB} PUBLIC
$<BUILD_INTERFACE:${LAPACK_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_link_libraries(${CBLASLIB} PUBLIC ${BLAS_LIBRARIES})
+1
View File
@@ -177,6 +177,7 @@ elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "NAG" )
endif()
# Suppress compiler banner and summary
include(CheckFortranCompilerFlag)
check_fortran_compiler_flag("-quiet" _quiet)
if( _quiet AND NOT ("${CMAKE_Fortran_FLAGS}" MATCHES "[-/]quiet") )
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -quiet")
+29 -23
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.9)
project(LAPACK)
@@ -107,8 +107,10 @@ else()
set(LAPACKELIB "lapacke")
set(TMGLIB "tmglib")
endif()
# By default build standard API and extended _64 API
# By default build extended _64 API for supported compilers only
set(INDEX64_EXT_API_COMPILERS "Intel|GNU")
option(BUILD_INDEX64_EXT_API "Build Index-64 API as extended API with _64 suffix" ON)
message(STATUS "Build Index-64 API as extended API with _64 suffix: ${BUILD_INDEX64_EXT_API}")
include(GNUInstallDirs)
@@ -223,6 +225,7 @@ option(USE_OPTIMIZED_BLAS "Whether or not to use an optimized BLAS library inste
# Check the usage of the user provided BLAS libraries
if(BLAS_LIBRARIES)
enable_language(Fortran)
include(CheckFortranFunctionExists)
set(CMAKE_REQUIRED_LIBRARIES ${BLAS_LIBRARIES})
CHECK_FORTRAN_FUNCTION_EXISTS("dgemm" BLAS_FOUND)
@@ -614,24 +617,21 @@ if(BUILD_HTML_DOCUMENTATION OR BUILD_MAN_DOCUMENTATION)
set(DOXYGEN_PROJECT_BRIEF "LAPACK: Linear Algebra PACKage")
set(DOXYGEN_PROJECT_NUMBER ${LAPACK_VERSION})
set(DOXYGEN_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DOCS)
set(DOXYGEN_PROJECT_LOGO ${CMAKE_CURRENT_SOURCE_DIR}/DOCS/lapack.png)
set(DOXYGEN_OUTPUT_DIRECTORY DOCS)
set(DOXYGEN_PROJECT_LOGO DOCS/lapack.png)
set(DOXYGEN_OPTIMIZE_FOR_FORTRAN YES)
set(DOXYGEN_SOURCE_BROWSER YES)
set(DOXYGEN_CREATE_SUBDIRS YES)
set(DOXYGEN_SEPARATE_MEMBER_PAGES YES)
set(DOXYGEN_TAB_SIZE 8)
set(DOXYGEN_EXTRACT_ALL YES)
set(DOXYGEN_FILE_PATTERNS *.f *.f90 *.c *.h )
set(DOXYGEN_RECURSIVE YES)
set(DOXYGEN_GENERATE_TREEVIEW YES)
set(DOXYGEN_DOT_IMAGE_FORMAT svg)
set(DOXYGEN_INTERACTIVE_SVG YES)
set(DOXYGEN_QUIET NO)
set(DOXYGEN_WARNINGS YES)
set(DOXYGEN_WARN_NO_PARAMDOC YES)
set(DOXYGEN_WARN_LOGFILE doxygen_error)
set(DOXYGEN_GENERATE_HTML NO)
set(DOXYGEN_GENERATE_MAN NO)
set(DOXYGEN_LAYOUT_FILE "DOCS/DoxygenLayout.xml")
# Exclude functions that are duplicated, creating conflicts.
@@ -646,46 +646,52 @@ if(BUILD_HTML_DOCUMENTATION OR BUILD_MAN_DOCUMENTATION)
if (BUILD_HTML_DOCUMENTATION)
set(DOXYGEN_GENERATE_HTML YES)
set(DOXYGEN_HTML_OUTPUT explore-html)
set(DOXYGEN_GENERATE_MAN NO)
set(DOXYGEN_INLINE_SOURCES YES)
set(DOXYGEN_CALL_GRAPH YES)
set(DOXYGEN_CALLER_GRAPH YES)
set(DOXYGEN_HTML_OUTPUT explore-html)
set(DOXYGEN_HTML_TIMESTAMP YES)
doxygen_add_docs(
html
# Doxygen INPUT =
${PROJECT_SOURCE_DIR}/README.md
${PROJECT_SOURCE_DIR}/BLAS
${PROJECT_SOURCE_DIR}/CBLAS
${PROJECT_SOURCE_DIR}/SRC
${PROJECT_SOURCE_DIR}/INSTALL
${PROJECT_SOURCE_DIR}/TESTING
${PROJECT_SOURCE_DIR}/DOCS/groups-usr.dox
BLAS
CBLAS
SRC
INSTALL
TESTING
DOCS/groups-usr.dox
README.md
COMMENT "Generating html LAPACK documentation (it will take some time... time to grab a coffee)"
)
unset(DOXYGEN_HTML_OUTPUT)
unset(DOXYGEN_HTML_TIMESTAMP)
endif()
if (BUILD_MAN_DOCUMENTATION)
set(DOXYGEN_GENERATE_HTML NO)
set(DOXYGEN_GENERATE_MAN YES)
set(DOXYGEN_MAN_LINKS YES)
set(DOXYGEN_INLINE_SOURCES NO)
set(DOXYGEN_CALL_GRAPH NO)
set(DOXYGEN_CALLER_GRAPH NO)
set(DOXYGEN_MAN_LINKS YES)
doxygen_add_docs(
man
# Doxygen INPUT =
${PROJECT_SOURCE_DIR}/BLAS
${PROJECT_SOURCE_DIR}/CBLAS
${PROJECT_SOURCE_DIR}/SRC
${PROJECT_SOURCE_DIR}/INSTALL
${PROJECT_SOURCE_DIR}/TESTING
${PROJECT_SOURCE_DIR}/DOCS/groups-usr.dox
BLAS
CBLAS
SRC
INSTALL
TESTING
DOCS/groups-usr.dox
COMMENT "Generating man LAPACK documentation"
)
unset(DOXYGEN_MAN_LINKS)
endif()
endif()
+19 -13
View File
@@ -126,7 +126,17 @@ REPEAT_BRIEF = YES
# the entity):The $name class, The $name widget, The $name file, is, provides,
# specifies, contains, represents, a, an and the.
ABBREVIATE_BRIEF =
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
# doxygen will generate a detailed section even if there is only a brief
@@ -885,9 +895,9 @@ INPUT_ENCODING = UTF-8
# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl,
# *.ucf, *.qsf and *.ice.
FILE_PATTERNS = *.c \
*.f \
FILE_PATTERNS = *.f \
*.f90 \
*.c \
*.h
# The RECURSIVE tag can be used to specify whether or not subdirectories should
@@ -927,11 +937,7 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*
EXCLUDE_PATTERNS = *.py \
*.txt \
*.in \
*.inc \
Makefile
EXCLUDE_PATTERNS =
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
@@ -955,7 +961,7 @@ EXAMPLE_PATH =
# *.h) to filter out the source-files in the directories. If left blank all
# files are included.
EXAMPLE_PATTERNS =
EXAMPLE_PATTERNS = *
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
# searched for input files to be used with the \include or \dontinclude commands
@@ -1602,7 +1608,7 @@ MATHJAX_FORMAT = HTML-CSS
# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2.
# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_RELPATH = http://www.mathjax.org/mathjax
MATHJAX_RELPATH = https://cdn.jsdelivr.net/npm/mathjax@2
# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
# extension names that should be enabled during MathJax rendering. For example
@@ -1735,7 +1741,7 @@ LATEX_OUTPUT = latex
# the output language.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_CMD_NAME = latex
LATEX_CMD_NAME =
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
# index for LaTeX.
@@ -1938,7 +1944,7 @@ COMPACT_RTF = NO
# The default value is: NO.
# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_HYPERLINKS = YES
RTF_HYPERLINKS = NO
# Load stylesheet definitions from file. Syntax is similar to doxygen's
# configuration file, i.e. a series of assignments. You only have to provide
@@ -2009,7 +2015,7 @@ MAN_SUBDIR =
# The default value is: NO.
# This tag requires that the tag GENERATE_MAN is set to YES.
MAN_LINKS = YES
MAN_LINKS = NO
#---------------------------------------------------------------------------
# Configuration options related to the XML output
+2 -1
View File
@@ -76,7 +76,8 @@
*
IF( INT( DROUNDUP_LWORK ) .LT. LWORK ) THEN
* Force round up of LWORK
DROUNDUP_LWORK = DROUNDUP_LWORK * ( 1.0D+0 + EPSILON(0.0D+0) )
DROUNDUP_LWORK = DROUNDUP_LWORK *
$ ( 1.0D+0 + EPSILON(0.0D+0) )
ENDIF
*
RETURN
+2 -1
View File
@@ -76,7 +76,8 @@
*
IF( INT( SROUNDUP_LWORK ) .LT. LWORK ) THEN
* Force round up of LWORK
SROUNDUP_LWORK = SROUNDUP_LWORK * ( 1.0E+0 + EPSILON(0.0E+0) )
SROUNDUP_LWORK = SROUNDUP_LWORK *
$ ( 1.0E+0 + EPSILON(0.0E+0) )
ENDIF
*
RETURN
+24 -1
View File
@@ -67,12 +67,35 @@ if(LAPACKE_WITH_TMG)
endif()
list(APPEND SOURCES ${UTILS})
add_library(${LAPACKELIB} ${SOURCES})
add_library(${LAPACKELIB}_obj OBJECT ${SOURCES})
set_target_properties(${LAPACKELIB}_obj PROPERTIES POSITION_INDEPENDENT_CODE ON)
if(BUILD_INDEX64_EXT_API)
# 64bit Integer Extended Interface
set(SOURCES_64_C)
list(APPEND SOURCES_64_C ${SOURCES})
list(REMOVE_ITEM SOURCES_64_C src/lapacke_nancheck.c)
list(REMOVE_ITEM SOURCES_64_C utils/lapacke_make_complex_float.c)
list(REMOVE_ITEM SOURCES_64_C utils/lapacke_make_complex_double.c)
add_library(${LAPACKELIB}_64_obj OBJECT ${SOURCES_64_C})
set_target_properties(${LAPACKELIB}_64_obj PROPERTIES
POSITION_INDEPENDENT_CODE ON)
target_compile_options(${LAPACKELIB}_64_obj PRIVATE
-DLAPACK_ILP64
-DLAPACKE_API64
-DWeirdNEC
-DCBLAS_API64)
endif()
add_library(${LAPACKELIB} $<TARGET_OBJECTS:${LAPACKELIB}_obj>
$<$<BOOL:${BUILD_INDEX64_EXT_API}>: $<TARGET_OBJECTS:${LAPACKELIB}_64_obj>>)
set_target_properties(
${LAPACKELIB} PROPERTIES
LINKER_LANGUAGE C
VERSION ${LAPACK_VERSION}
SOVERSION ${LAPACK_MAJOR_VERSION}
POSITION_INDEPENDENT_CODE ON
)
target_include_directories(${LAPACKELIB} PUBLIC
$<BUILD_INTERFACE:${LAPACK_BINARY_DIR}/include>
+21 -4
View File
@@ -3,12 +3,29 @@ add_executable(xexample_DGESV_colmajor example_DGESV_colmajor.c lapacke_example_
add_executable(xexample_DGELS_rowmajor example_DGELS_rowmajor.c lapacke_example_aux.c lapacke_example_aux.h)
add_executable(xexample_DGELS_colmajor example_DGELS_colmajor.c lapacke_example_aux.c lapacke_example_aux.h)
target_link_libraries(xexample_DGESV_rowmajor ${LAPACKELIB})
target_link_libraries(xexample_DGESV_colmajor ${LAPACKELIB})
target_link_libraries(xexample_DGELS_rowmajor ${LAPACKELIB})
target_link_libraries(xexample_DGELS_colmajor ${LAPACKELIB})
target_link_libraries(xexample_DGESV_rowmajor ${LAPACKELIB} ${BLAS_LIBRARIES})
target_link_libraries(xexample_DGESV_colmajor ${LAPACKELIB} ${BLAS_LIBRARIES})
target_link_libraries(xexample_DGELS_rowmajor ${LAPACKELIB} ${BLAS_LIBRARIES})
target_link_libraries(xexample_DGELS_colmajor ${LAPACKELIB} ${BLAS_LIBRARIES})
add_test(example_DGESV_rowmajor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGESV_rowmajor)
add_test(example_DGESV_colmajor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGESV_colmajor)
add_test(example_DGELS_rowmajor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGELS_rowmajor)
add_test(example_DGELS_colmajor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGELS_colmajor)
if(BUILD_INDEX64_EXT_API)
add_executable(xexample_DGESV_rowmajor_64 example_DGESV_rowmajor_64.c lapacke_example_aux.c lapacke_example_aux.h)
add_executable(xexample_DGESV_colmajor_64 example_DGESV_colmajor_64.c lapacke_example_aux.c lapacke_example_aux.h)
add_executable(xexample_DGELS_rowmajor_64 example_DGELS_rowmajor_64.c lapacke_example_aux.c lapacke_example_aux.h)
add_executable(xexample_DGELS_colmajor_64 example_DGELS_colmajor_64.c lapacke_example_aux.c lapacke_example_aux.h)
target_link_libraries(xexample_DGESV_rowmajor_64 ${LAPACKELIB} ${BLAS_LIBRARIES})
target_link_libraries(xexample_DGESV_colmajor_64 ${LAPACKELIB} ${BLAS_LIBRARIES})
target_link_libraries(xexample_DGELS_rowmajor_64 ${LAPACKELIB} ${BLAS_LIBRARIES})
target_link_libraries(xexample_DGELS_colmajor_64 ${LAPACKELIB} ${BLAS_LIBRARIES})
add_test(example_DGESV_rowmajor_64 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGESV_rowmajor_64)
add_test(example_DGESV_colmajor_64 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGESV_colmajor_64)
add_test(example_DGELS_rowmajor_64 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGELS_rowmajor_64)
add_test(example_DGELS_colmajor_64 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGELS_colmajor_64)
endif()
@@ -0,0 +1,93 @@
/*
LAPACKE Example : Calling DGELS using col-major layout
=====================================================
The program computes the solution to the system of linear
equations with a square matrix A and multiple
right-hand sides B, where A is the coefficient matrix
and b is the right-hand side matrix:
Description
===========
In this example, we wish solve the least squares problem min_x || B - Ax ||
for two right-hand sides using the LAPACK routine DGELS. For input we will
use the 5-by-3 matrix
( 1 1 1 )
( 2 3 4 )
A = ( 3 5 2 )
( 4 2 5 )
( 5 4 3 )
and the 5-by-2 matrix
( -10 -3 )
( 12 14 )
B = ( 14 12 )
( 16 16 )
( 18 16 )
We will first store the input matrix as a static C two-dimensional array,
which is stored in col-major layout, and let LAPACKE handle the work space
array allocation. The LAPACK base name for this function is gels, and we
will use double precision (d), so the LAPACKE function name is LAPACKE_dgels.
lda=5 and ldb=5. The output for each right hand side is stored in b as
consecutive vectors of length 3. The correct answer for this problem is
the 3-by-2 matrix
( 2 1 )
( 1 1 )
( 1 2 )
A complete C program for this example is given below. Note that when the arrays
are passed to the LAPACK routine, they must be dereferenced, since LAPACK is
expecting arrays of type double *, not double **.
LAPACKE Interface
=================
LAPACKE_dgels (col-major, high-level) Example Program Results
-- LAPACKE Example routine --
-- LAPACK is a software package provided by Univ. of Tennessee, --
-- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
*/
/* Calling DGELS using col-major layout */
/* Includes */
#include <stdio.h>
#include <lapacke_64.h>
#include "lapacke_example_aux.h"
/* Main program */
int main (int argc, const char * argv[])
{
/* Locals */
double A[5][3] = {{1,2,3},{4,5,1},{3,5,2},{4,1,4},{2,5,3}};
double b[5][2] = {{-10,12},{14,16},{18,-3},{14,12},{16,16}};
int64_t info,m,n,lda,ldb,nrhs;
/* Initialization */
m = 5;
n = 3;
nrhs = 2;
lda = 5;
ldb = 5;
/* Print Entry Matrix */
print_matrix_colmajor_64( "Entry Matrix A", m, n, *A, lda );
/* Print Right Rand Side */
print_matrix_colmajor_64( "Right Hand Side b", n, nrhs, *b, ldb );
printf( "\n" );
/* Executable statements */
printf( "LAPACKE_dgels_64 (col-major, high-level) Example Program Results\n" );
/* Solve least squares problem*/
info = LAPACKE_dgels_64(LAPACK_COL_MAJOR,'N',m,n,nrhs,*A,lda,*b,ldb);
/* Print Solution */
print_matrix_colmajor_64( "Solution", n, nrhs, *b, ldb );
printf( "\n" );
exit( info );
} /* End of LAPACKE_dgels Example */
@@ -0,0 +1,93 @@
/*
LAPACKE Example : Calling DGELS using row-major layout
=====================================================
The program computes the solution to the system of linear
equations with a square matrix A and multiple
right-hand sides B, where A is the coefficient matrix
and b is the right-hand side matrix:
Description
===========
In this example, we wish solve the least squares problem min_x || B - Ax ||
for two right-hand sides using the LAPACK routine DGELS. For input we will
use the 5-by-3 matrix
( 1 1 1 )
( 2 3 4 )
A = ( 3 5 2 )
( 4 2 5 )
( 5 4 3 )
and the 5-by-2 matrix
( -10 -3 )
( 12 14 )
B = ( 14 12 )
( 16 16 )
( 18 16 )
We will first store the input matrix as a static C two-dimensional array,
which is stored in row-major layout, and let LAPACKE handle the work space
array allocation. The LAPACK base name for this function is gels, and we
will use double precision (d), so the LAPACKE function name is LAPACKE_dgels.
thus lda=3 and ldb=2. The output for each right hand side is stored in b as
consecutive vectors of length 3. The correct answer for this problem is
the 3-by-2 matrix
( 2 1 )
( 1 1 )
( 1 2 )
A complete C program for this example is given below. Note that when the arrays
are passed to the LAPACK routine, they must be dereferenced, since LAPACK is
expecting arrays of type double *, not double **.
LAPACKE Interface
=================
LAPACKE_dgels (row-major, high-level) Example Program Results
-- LAPACKE Example routine --
-- LAPACK is a software package provided by Univ. of Tennessee, --
-- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
*/
/* Calling DGELS using row-major layout */
/* Includes */
#include <stdio.h>
#include <lapacke_64.h>
#include "lapacke_example_aux.h"
/* Main program */
int main (int argc, const char * argv[])
{
/* Locals */
double A[5][3] = {{1,1,1},{2,3,4},{3,5,2},{4,2,5},{5,4,3}};
double b[5][2] = {{-10,-3},{12,14},{14,12},{16,16},{18,16}};
int64_t info,m,n,lda,ldb,nrhs;
/* Initialization */
m = 5;
n = 3;
nrhs = 2;
lda = 3;
ldb = 2;
/* Print Entry Matrix */
print_matrix_rowmajor_64( "Entry Matrix A", m, n, *A, lda );
/* Print Right Rand Side */
print_matrix_rowmajor_64( "Right Hand Side b", n, nrhs, *b, ldb );
printf( "\n" );
/* Executable statements */
printf( "LAPACKE_dgels_64 (row-major, high-level) Example Program Results\n" );
/* Solve least squares problem*/
info = LAPACKE_dgels_64(LAPACK_ROW_MAJOR,'N',m,n,nrhs,*A,lda,*b,ldb);
/* Print Solution */
print_matrix_rowmajor_64( "Solution", n, nrhs, *b, ldb );
printf( "\n" );
exit( 0 );
} /* End of LAPACKE_dgels Example */
+36 -28
View File
@@ -41,41 +41,41 @@ int main(int argc, char **argv) {
/* Locals */
lapack_int n, nrhs, lda, ldb, info;
int i, j;
int i, j;
/* Local arrays */
double *A, *b;
lapack_int *ipiv;
double *A, *b;
lapack_int *ipiv;
/* Default Value */
n = 5; nrhs = 1;
n = 5; nrhs = 1;
/* Arguments */
for( i = 1; i < argc; i++ ) {
if( strcmp( argv[i], "-n" ) == 0 ) {
n = atoi(argv[i+1]);
i++;
}
if( strcmp( argv[i], "-nrhs" ) == 0 ) {
nrhs = atoi(argv[i+1]);
i++;
}
}
for( i = 1; i < argc; i++ ) {
if( strcmp( argv[i], "-n" ) == 0 ) {
n = atoi(argv[i+1]);
i++;
}
if( strcmp( argv[i], "-nrhs" ) == 0 ) {
nrhs = atoi(argv[i+1]);
i++;
}
}
/* Initialization */
lda=n, ldb=n;
A = (double *)malloc(n*n*sizeof(double)) ;
if (A==NULL){ printf("error of memory allocation\n"); exit(0); }
b = (double *)malloc(n*nrhs*sizeof(double)) ;
if (b==NULL){ printf("error of memory allocation\n"); exit(0); }
ipiv = (lapack_int *)malloc(n*sizeof(lapack_int)) ;
if (ipiv==NULL){ printf("error of memory allocation\n"); exit(0); }
A = (double *)malloc(n*n*sizeof(double)) ;
if (A==NULL){ printf("error of memory allocation\n"); exit(0); }
b = (double *)malloc(n*nrhs*sizeof(double)) ;
if (b==NULL){ printf("error of memory allocation\n"); free(A); exit(0); }
ipiv = (lapack_int *)malloc(n*sizeof(lapack_int)) ;
if (ipiv==NULL){ printf("error of memory allocation\n"); free(A); free(b); exit(0); }
for( i = 0; i < n; i++ ) {
for( j = 0; j < n; j++ ) A[i+j*lda] = ((double) rand()) / ((double) RAND_MAX) - 0.5;
}
}
for(i=0;i<n*nrhs;i++)
b[i] = ((double) rand()) / ((double) RAND_MAX) - 0.5;
for(i=0;i<n*nrhs;i++)
b[i] = ((double) rand()) / ((double) RAND_MAX) - 0.5;
/* Print Entry Matrix */
print_matrix_colmajor( "Entry Matrix A", n, n, A, lda );
@@ -91,12 +91,20 @@ int main(int argc, char **argv) {
/* Check for the exact singularity */
if( info > 0 ) {
printf( "The diagonal element of the triangular factor of A,\n" );
printf( "U(%" LAPACK_IFMT ",%" LAPACK_IFMT ") is zero, so that A is singular;\n", info, info );
printf( "the solution could not be computed.\n" );
exit( 1 );
printf( "The diagonal element of the triangular factor of A,\n" );
printf( "U(%" LAPACK_IFMT ",%" LAPACK_IFMT ") is zero, so that A is singular;\n", info, info );
printf( "the solution could not be computed.\n" );
free(A);
free(b);
free(ipiv);
exit( 1 );
}
if (info <0) {
free(A);
free(b);
free(ipiv);
exit( 1 );
}
if (info <0) exit( 1 );
/* Print solution */
print_matrix_colmajor( "Solution", n, nrhs, b, ldb );
/* Print details of LU factorization */
+119
View File
@@ -0,0 +1,119 @@
/*
LAPACKE_dgesv Example
=====================
The program computes the solution to the system of linear
equations with a square matrix A and multiple
right-hand sides B, where A is the coefficient matrix
and b is the right-hand side matrix:
Description
===========
The routine solves for X the system of linear equations A*X = B,
where A is an n-by-n matrix, the columns of matrix B are individual
right-hand sides, and the columns of X are the corresponding
solutions.
The LU decomposition with partial pivoting and row interchanges is
used to factor A as A = P*L*U, where P is a permutation matrix, L
is unit lower triangular, and U is upper triangular. The factored
form of A is then used to solve the system of equations A*X = B.
LAPACKE Interface
=================
LAPACKE_dgesv (col-major, high-level) Example Program Results
-- LAPACKE Example routine --
-- LAPACK is a software package provided by Univ. of Tennessee, --
-- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
*/
/* Includes */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "lapacke_64.h"
#include "lapacke_example_aux.h"
/* Main program */
int main(int argc, char **argv) {
/* Locals */
int64_t n, nrhs, lda, ldb, info;
int i, j;
/* Local arrays */
double *A, *b;
int64_t *ipiv;
/* Default Value */
n = 5; nrhs = 1;
/* Arguments */
for( i = 1; i < argc; i++ ) {
if( strcmp( argv[i], "-n" ) == 0 ) {
n = atoi(argv[i+1]);
i++;
}
if( strcmp( argv[i], "-nrhs" ) == 0 ) {
nrhs = atoi(argv[i+1]);
i++;
}
}
/* Initialization */
lda=n, ldb=n;
A = (double *)malloc(n*n*sizeof(double)) ;
if (A==NULL){ printf("error of memory allocation\n"); exit(0); }
b = (double *)malloc(n*nrhs*sizeof(double)) ;
if (b==NULL){ printf("error of memory allocation\n"); free(A); exit(0); }
ipiv = (int64_t *)malloc(n*sizeof(int64_t)) ;
if (ipiv==NULL){ printf("error of memory allocation\n"); free(A); free(b); exit(0); }
for( i = 0; i < n; i++ ) {
for( j = 0; j < n; j++ ) A[i+j*lda] = ((double) rand()) / ((double) RAND_MAX) - 0.5;
}
for(i=0;i<n*nrhs;i++)
b[i] = ((double) rand()) / ((double) RAND_MAX) - 0.5;
/* Print Entry Matrix */
print_matrix_colmajor_64( "Entry Matrix A", n, n, A, lda );
/* Print Right Rand Side */
print_matrix_colmajor_64( "Right Rand Side b", n, nrhs, b, ldb );
printf( "\n" );
/* Executable statements */
printf( "LAPACKE_dgesv_64 (row-major, high-level) Example Program Results\n" );
/* Solve the equations A*X = B */
info = LAPACKE_dgesv_64( LAPACK_COL_MAJOR, n, nrhs, A, lda, ipiv,
b, ldb );
/* Check for the exact singularity */
if( info > 0 ) {
printf( "The diagonal element of the triangular factor of A,\n" );
printf( "U(%" LAPACK_IFMT ",%" LAPACK_IFMT ") is zero, so that A is singular;\n", info, info );
printf( "the solution could not be computed.\n" );
free(A);
free(b);
free(ipiv);
exit( 1 );
}
if (info <0) {
free(A);
free(b);
free(ipiv);
exit( 1 );
}
/* Print solution */
print_matrix_colmajor_64( "Solution", n, nrhs, b, ldb );
/* Print details of LU factorization */
print_matrix_colmajor_64( "Details of LU factorization", n, n, A, lda );
/* Print pivot indices */
print_vector_64( "Pivot indices", n, ipiv );
free(A);
free(b);
free(ipiv);
exit( 0 );
} /* End of LAPACKE_dgesv Example */
+36 -29
View File
@@ -40,41 +40,41 @@ int main(int argc, char **argv) {
/* Locals */
lapack_int n, nrhs, lda, ldb, info;
int i, j;
int i, j;
/* Local arrays */
double *A, *b;
lapack_int *ipiv;
double *A, *b;
lapack_int *ipiv;
/* Default Value */
n = 5; nrhs = 1;
n = 5; nrhs = 1;
/* Arguments */
for( i = 1; i < argc; i++ ) {
if( strcmp( argv[i], "-n" ) == 0 ) {
n = atoi(argv[i+1]);
i++;
}
if( strcmp( argv[i], "-nrhs" ) == 0 ) {
nrhs = atoi(argv[i+1]);
i++;
}
}
for( i = 1; i < argc; i++ ) {
if( strcmp( argv[i], "-n" ) == 0 ) {
n = atoi(argv[i+1]);
i++;
}
if( strcmp( argv[i], "-nrhs" ) == 0 ) {
nrhs = atoi(argv[i+1]);
i++;
}
}
/* Initialization */
lda=n, ldb=nrhs;
A = (double *)malloc(n*n*sizeof(double)) ;
if (A==NULL){ printf("error of memory allocation\n"); exit(0); }
b = (double *)malloc(n*nrhs*sizeof(double)) ;
if (b==NULL){ printf("error of memory allocation\n"); exit(0); }
ipiv = (lapack_int *)malloc(n*sizeof(lapack_int)) ;
if (ipiv==NULL){ printf("error of memory allocation\n"); exit(0); }
A = (double *)malloc(n*n*sizeof(double)) ;
if (A==NULL){ printf("error of memory allocation\n"); exit(0); }
b = (double *)malloc(n*nrhs*sizeof(double)) ;
if (b==NULL){ printf("error of memory allocation\n"); free(A); exit(0); }
ipiv = (lapack_int *)malloc(n*sizeof(lapack_int)) ;
if (ipiv==NULL){ printf("error of memory allocation\n"); free(A); free(b); exit(0); }
for( i = 0; i < n; i++ ) {
for( j = 0; j < n; j++ ) A[i*lda+j] = ((double) rand()) / ((double) RAND_MAX) - 0.5;
}
}
for(i=0;i<n*nrhs;i++)
b[i] = ((double) rand()) / ((double) RAND_MAX) - 0.5;
for(i=0;i<n*nrhs;i++)
b[i] = ((double) rand()) / ((double) RAND_MAX) - 0.5;
/* Print Entry Matrix */
print_matrix_rowmajor( "Entry Matrix A", n, n, A, lda );
@@ -88,12 +88,20 @@ int main(int argc, char **argv) {
b, ldb );
/* Check for the exact singularity */
if( info > 0 ) {
printf( "The diagonal element of the triangular factor of A,\n" );
printf( "U(%" LAPACK_IFMT ",%" LAPACK_IFMT ") is zero, so that A is singular;\n", info, info );
printf( "the solution could not be computed.\n" );
exit( 1 );
printf( "The diagonal element of the triangular factor of A,\n" );
printf( "U(%" LAPACK_IFMT ",%" LAPACK_IFMT ") is zero, so that A is singular;\n", info, info );
printf( "the solution could not be computed.\n" );
free(A);
free(b);
free(ipiv);
exit( 1 );
}
if (info <0) {
free(A);
free(b);
free(ipiv);
exit( 1 );
}
if (info <0) exit( 1 );
/* Print solution */
print_matrix_rowmajor( "Solution", n, nrhs, b, ldb );
/* Print details of LU factorization */
@@ -105,7 +113,6 @@ int main(int argc, char **argv) {
free(A);
free(b);
free(ipiv);
exit( 0 );
} /* End of LAPACKE_dgesv Example */
+116
View File
@@ -0,0 +1,116 @@
/*
LAPACKE_dgesv Example
=====================
The program computes the solution to the system of linear
equations with a square matrix A and multiple
right-hand sides B, where A is the coefficient matrix
and b is the right-hand side matrix:
Description
===========
The routine solves for X the system of linear equations A*X = B,
where A is an n-by-n matrix, the columns of matrix B are individual
right-hand sides, and the columns of X are the corresponding
solutions.
The LU decomposition with partial pivoting and row interchanges is
used to factor A as A = P*L*U, where P is a permutation matrix, L
is unit lower triangular, and U is upper triangular. The factored
form of A is then used to solve the system of equations A*X = B.
LAPACKE Interface
=================
LAPACKE_dgesv (row-major, high-level) Example Program Results
-- LAPACKE Example routine --
-- LAPACK is a software package provided by Univ. of Tennessee, --
-- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <lapacke_64.h>
#include "lapacke_example_aux.h"
/* Main program */
int main(int argc, char **argv) {
/* Locals */
int64_t n, nrhs, lda, ldb, info;
int i, j;
/* Local arrays */
double *A, *b;
int64_t *ipiv;
/* Default Value */
n = 5; nrhs = 1;
/* Arguments */
for( i = 1; i < argc; i++ ) {
if( strcmp( argv[i], "-n" ) == 0 ) {
n = atoi(argv[i+1]);
i++;
}
if( strcmp( argv[i], "-nrhs" ) == 0 ) {
nrhs = atoi(argv[i+1]);
i++;
}
}
/* Initialization */
lda=n, ldb=nrhs;
A = (double *)malloc(n*n*sizeof(double)) ;
if (A==NULL){ printf("error of memory allocation\n"); exit(0); }
b = (double *)malloc(n*nrhs*sizeof(double)) ;
if (b==NULL){ printf("error of memory allocation\n"); free(A); exit(0); }
ipiv = (int64_t *)malloc(n*sizeof(int64_t)) ;
if (ipiv==NULL){ printf("error of memory allocation\n"); free(A); free(b); exit(0); }
for( i = 0; i < n; i++ ) {
for( j = 0; j < n; j++ ) A[i*lda+j] = ((double) rand()) / ((double) RAND_MAX) - 0.5;
}
for(i=0;i<n*nrhs;i++)
b[i] = ((double) rand()) / ((double) RAND_MAX) - 0.5;
/* Print Entry Matrix */
print_matrix_rowmajor_64( "Entry Matrix A", n, n, A, lda );
/* Print Right Rand Side */
print_matrix_rowmajor_64( "Right Rand Side b", n, nrhs, b, ldb );
printf( "\n" );
/* Executable statements */
printf( "LAPACKE_dgesv_64 (row-major, high-level) Example Program Results\n" );
/* Solve the equations A*X = B */
info = LAPACKE_dgesv_64( LAPACK_ROW_MAJOR, n, nrhs, A, lda, ipiv,
b, ldb );
/* Check for the exact singularity */
if( info > 0 ) {
printf( "The diagonal element of the triangular factor of A,\n" );
printf( "U(%" LAPACK_IFMT ",%" LAPACK_IFMT ") is zero, so that A is singular;\n", info, info );
printf( "the solution could not be computed.\n" );
free(A);
free(b);
free(ipiv);
exit( 1 );
}
if (info <0) {
free(A);
free(b);
free(ipiv);
exit( 1 );
}
/* Print solution */
print_matrix_rowmajor_64( "Solution", n, nrhs, b, ldb );
/* Print details of LU factorization */
print_matrix_rowmajor_64( "Details of LU factorization", n, n, A, lda );
/* Print pivot indices */
print_vector_64( "Pivot indices", n, ipiv );
free(A);
free(b);
free(ipiv);
exit( 0 );
} /* End of LAPACKE_dgesv Example */
+32
View File
@@ -31,3 +31,35 @@ void print_vector( char* desc, lapack_int n, lapack_int* vec ) {
for( j = 0; j < n; j++ ) printf( " %6" LAPACK_IFMT, vec[j] );
printf( "\n" );
}
/* ILP64 routines */
/* Auxiliary routine: printing a matrix */
void print_matrix_rowmajor_64( char* desc, int64_t m, int64_t n, double* mat, int64_t ldm ) {
int64_t i, j;
printf( "\n %s\n", desc );
for( i = 0; i < m; i++ ) {
for( j = 0; j < n; j++ ) printf( " %6.2f", mat[i*ldm+j] );
printf( "\n" );
}
}
/* Auxiliary routine: printing a matrix */
void print_matrix_colmajor_64( char* desc, int64_t m, int64_t n, double* mat, int64_t ldm ) {
int64_t i, j;
printf( "\n %s\n", desc );
for( i = 0; i < m; i++ ) {
for( j = 0; j < n; j++ ) printf( " %6.2f", mat[i+j*ldm] );
printf( "\n" );
}
}
/* Auxiliary routine: printing a vector of integers */
void print_vector_64( char* desc, int64_t n, int64_t* vec ) {
int64_t j;
printf( "\n %s\n", desc );
for( j = 0; j < n; j++ ) printf( " %6" LAPACK_IFMT, vec[j] );
printf( "\n" );
}
+4
View File
@@ -6,4 +6,8 @@ void print_matrix_rowmajor( char* desc, lapack_int m, lapack_int n, double* mat,
void print_matrix_colmajor( char* desc, lapack_int m, lapack_int n, double* mat, lapack_int ldm );
void print_vector( char* desc, lapack_int n, lapack_int* vec );
void print_matrix_rowmajor_64( char* desc, int64_t m, int64_t n, double* mat, int64_t ldm );
void print_matrix_colmajor_64( char* desc, int64_t m, int64_t n, double* mat, int64_t ldm );
void print_vector_64( char* desc, int64_t n, int64_t* vec );
#endif /* _LAPACKE_EXAMPLE_AUX_*/
+1345 -1331
View File
File diff suppressed because it is too large Load Diff
+15
View File
@@ -58,6 +58,21 @@ extern "C" {
lapack_complex_float lapack_make_complex_float( float re, float im );
lapack_complex_double lapack_make_complex_double( double re, double im );
/*
* Integer specific API
*/
#ifdef LAPACKE_API64
#ifndef API_SUFFIX
#define API_SUFFIX(a) a##_64
#endif
#include "lapacke_64.h"
#else
#ifndef API_SUFFIX
#define API_SUFFIX(a) a
#endif
#endif
/* C-LAPACK function prototypes */
lapack_int LAPACKE_sbdsdc( int matrix_layout, char uplo, char compq,
File diff suppressed because it is too large Load Diff
+154 -154
View File
@@ -63,240 +63,240 @@ extern "C" {
IS_D_NONZERO(*(((double*)&x)+1)) )
/* Error handler */
void LAPACKE_xerbla( const char *name, lapack_int info );
void API_SUFFIX(LAPACKE_xerbla)( const char *name, lapack_int info );
/* Compare two chars (case-insensitive) */
lapack_logical LAPACKE_lsame( char ca, char cb )
lapack_logical API_SUFFIX(LAPACKE_lsame)( char ca, char cb )
#if defined __GNUC__
__attribute__((const))
#endif
;
/* Functions to convert column-major to row-major 2d arrays and vice versa. */
void LAPACKE_cgb_trans( int matrix_layout, lapack_int m, lapack_int n,
void API_SUFFIX(LAPACKE_cgb_trans)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int kl, lapack_int ku,
const lapack_complex_float *in, lapack_int ldin,
lapack_complex_float *out, lapack_int ldout );
void LAPACKE_cge_trans( int matrix_layout, lapack_int m, lapack_int n,
void API_SUFFIX(LAPACKE_cge_trans)( int matrix_layout, lapack_int m, lapack_int n,
const lapack_complex_float* in, lapack_int ldin,
lapack_complex_float* out, lapack_int ldout );
void LAPACKE_cgg_trans( int matrix_layout, lapack_int m, lapack_int n,
void API_SUFFIX(LAPACKE_cgg_trans)( int matrix_layout, lapack_int m, lapack_int n,
const lapack_complex_float* in, lapack_int ldin,
lapack_complex_float* out, lapack_int ldout );
void LAPACKE_chb_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_chb_trans)( int matrix_layout, char uplo, lapack_int n,
lapack_int kd,
const lapack_complex_float *in, lapack_int ldin,
lapack_complex_float *out, lapack_int ldout );
void LAPACKE_che_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_che_trans)( int matrix_layout, char uplo, lapack_int n,
const lapack_complex_float *in, lapack_int ldin,
lapack_complex_float *out, lapack_int ldout );
void LAPACKE_chp_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_chp_trans)( int matrix_layout, char uplo, lapack_int n,
const lapack_complex_float *in,
lapack_complex_float *out );
void LAPACKE_chs_trans( int matrix_layout, lapack_int n,
void API_SUFFIX(LAPACKE_chs_trans)( int matrix_layout, lapack_int n,
const lapack_complex_float *in, lapack_int ldin,
lapack_complex_float *out, lapack_int ldout );
void LAPACKE_cpb_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_cpb_trans)( int matrix_layout, char uplo, lapack_int n,
lapack_int kd,
const lapack_complex_float *in, lapack_int ldin,
lapack_complex_float *out, lapack_int ldout );
void LAPACKE_cpf_trans( int matrix_layout, char transr, char uplo,
void API_SUFFIX(LAPACKE_cpf_trans)( int matrix_layout, char transr, char uplo,
lapack_int n, const lapack_complex_float *in,
lapack_complex_float *out );
void LAPACKE_cpo_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_cpo_trans)( int matrix_layout, char uplo, lapack_int n,
const lapack_complex_float *in, lapack_int ldin,
lapack_complex_float *out, lapack_int ldout );
void LAPACKE_cpp_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_cpp_trans)( int matrix_layout, char uplo, lapack_int n,
const lapack_complex_float *in,
lapack_complex_float *out );
void LAPACKE_csp_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_csp_trans)( int matrix_layout, char uplo, lapack_int n,
const lapack_complex_float *in,
lapack_complex_float *out );
void LAPACKE_csy_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_csy_trans)( int matrix_layout, char uplo, lapack_int n,
const lapack_complex_float *in, lapack_int ldin,
lapack_complex_float *out, lapack_int ldout );
void LAPACKE_ctb_trans( int matrix_layout, char uplo, char diag,
void API_SUFFIX(LAPACKE_ctb_trans)( int matrix_layout, char uplo, char diag,
lapack_int n, lapack_int kd,
const lapack_complex_float *in, lapack_int ldin,
lapack_complex_float *out, lapack_int ldout );
void LAPACKE_ctf_trans( int matrix_layout, char transr, char uplo, char diag,
void API_SUFFIX(LAPACKE_ctf_trans)( int matrix_layout, char transr, char uplo, char diag,
lapack_int n, const lapack_complex_float *in,
lapack_complex_float *out );
void LAPACKE_ctp_trans( int matrix_layout, char uplo, char diag,
void API_SUFFIX(LAPACKE_ctp_trans)( int matrix_layout, char uplo, char diag,
lapack_int n, const lapack_complex_float *in,
lapack_complex_float *out );
void LAPACKE_ctr_trans( int matrix_layout, char uplo, char diag, lapack_int n,
void API_SUFFIX(LAPACKE_ctr_trans)( int matrix_layout, char uplo, char diag, lapack_int n,
const lapack_complex_float *in, lapack_int ldin,
lapack_complex_float *out, lapack_int ldout );
void LAPACKE_ctz_trans( int matrix_layout, char direct, char uplo,
void API_SUFFIX(LAPACKE_ctz_trans)( int matrix_layout, char direct, char uplo,
char diag, lapack_int m, lapack_int n,
const lapack_complex_float *in, lapack_int ldin,
lapack_complex_float *out, lapack_int ldout );
void LAPACKE_dgb_trans( int matrix_layout, lapack_int m, lapack_int n,
void API_SUFFIX(LAPACKE_dgb_trans)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int kl, lapack_int ku,
const double *in, lapack_int ldin,
double *out, lapack_int ldout );
void LAPACKE_dge_trans( int matrix_layout, lapack_int m, lapack_int n,
void API_SUFFIX(LAPACKE_dge_trans)( int matrix_layout, lapack_int m, lapack_int n,
const double* in, lapack_int ldin,
double* out, lapack_int ldout );
void LAPACKE_dgg_trans( int matrix_layout, lapack_int m, lapack_int n,
void API_SUFFIX(LAPACKE_dgg_trans)( int matrix_layout, lapack_int m, lapack_int n,
const double* in, lapack_int ldin,
double* out, lapack_int ldout );
void LAPACKE_dhs_trans( int matrix_layout, lapack_int n,
void API_SUFFIX(LAPACKE_dhs_trans)( int matrix_layout, lapack_int n,
const double *in, lapack_int ldin,
double *out, lapack_int ldout );
void LAPACKE_dpb_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_dpb_trans)( int matrix_layout, char uplo, lapack_int n,
lapack_int kd,
const double *in, lapack_int ldin,
double *out, lapack_int ldout );
void LAPACKE_dpf_trans( int matrix_layout, char transr, char uplo,
void API_SUFFIX(LAPACKE_dpf_trans)( int matrix_layout, char transr, char uplo,
lapack_int n, const double *in,
double *out );
void LAPACKE_dpo_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_dpo_trans)( int matrix_layout, char uplo, lapack_int n,
const double *in, lapack_int ldin,
double *out, lapack_int ldout );
void LAPACKE_dpp_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_dpp_trans)( int matrix_layout, char uplo, lapack_int n,
const double *in,
double *out );
void LAPACKE_dsb_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_dsb_trans)( int matrix_layout, char uplo, lapack_int n,
lapack_int kd,
const double *in, lapack_int ldin,
double *out, lapack_int ldout );
void LAPACKE_dsp_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_dsp_trans)( int matrix_layout, char uplo, lapack_int n,
const double *in,
double *out );
void LAPACKE_dsy_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_dsy_trans)( int matrix_layout, char uplo, lapack_int n,
const double *in, lapack_int ldin,
double *out, lapack_int ldout );
void LAPACKE_dtb_trans( int matrix_layout, char uplo, char diag,
void API_SUFFIX(LAPACKE_dtb_trans)( int matrix_layout, char uplo, char diag,
lapack_int n, lapack_int kd,
const double *in, lapack_int ldin,
double *out, lapack_int ldout );
void LAPACKE_dtf_trans( int matrix_layout, char transr, char uplo, char diag,
void API_SUFFIX(LAPACKE_dtf_trans)( int matrix_layout, char transr, char uplo, char diag,
lapack_int n, const double *in,
double *out );
void LAPACKE_dtp_trans( int matrix_layout, char uplo, char diag,
void API_SUFFIX(LAPACKE_dtp_trans)( int matrix_layout, char uplo, char diag,
lapack_int n, const double *in,
double *out );
void LAPACKE_dtr_trans( int matrix_layout, char uplo, char diag, lapack_int n,
void API_SUFFIX(LAPACKE_dtr_trans)( int matrix_layout, char uplo, char diag, lapack_int n,
const double *in, lapack_int ldin,
double *out, lapack_int ldout );
void LAPACKE_dtz_trans( int matrix_layout, char direct, char uplo,
void API_SUFFIX(LAPACKE_dtz_trans)( int matrix_layout, char direct, char uplo,
char diag, lapack_int m, lapack_int n,
const double *in, lapack_int ldin,
double *out, lapack_int ldout );
void LAPACKE_sgb_trans( int matrix_layout, lapack_int m, lapack_int n,
void API_SUFFIX(LAPACKE_sgb_trans)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int kl, lapack_int ku,
const float *in, lapack_int ldin,
float *out, lapack_int ldout );
void LAPACKE_sge_trans( int matrix_layout, lapack_int m, lapack_int n,
void API_SUFFIX(LAPACKE_sge_trans)( int matrix_layout, lapack_int m, lapack_int n,
const float* in, lapack_int ldin,
float* out, lapack_int ldout );
void LAPACKE_sgg_trans( int matrix_layout, lapack_int m, lapack_int n,
void API_SUFFIX(LAPACKE_sgg_trans)( int matrix_layout, lapack_int m, lapack_int n,
const float* in, lapack_int ldin,
float* out, lapack_int ldout );
void LAPACKE_shs_trans( int matrix_layout, lapack_int n,
void API_SUFFIX(LAPACKE_shs_trans)( int matrix_layout, lapack_int n,
const float *in, lapack_int ldin,
float *out, lapack_int ldout );
void LAPACKE_spb_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_spb_trans)( int matrix_layout, char uplo, lapack_int n,
lapack_int kd,
const float *in, lapack_int ldin,
float *out, lapack_int ldout );
void LAPACKE_spf_trans( int matrix_layout, char transr, char uplo,
void API_SUFFIX(LAPACKE_spf_trans)( int matrix_layout, char transr, char uplo,
lapack_int n, const float *in,
float *out );
void LAPACKE_spo_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_spo_trans)( int matrix_layout, char uplo, lapack_int n,
const float *in, lapack_int ldin,
float *out, lapack_int ldout );
void LAPACKE_spp_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_spp_trans)( int matrix_layout, char uplo, lapack_int n,
const float *in,
float *out );
void LAPACKE_ssb_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_ssb_trans)( int matrix_layout, char uplo, lapack_int n,
lapack_int kd,
const float *in, lapack_int ldin,
float *out, lapack_int ldout );
void LAPACKE_ssp_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_ssp_trans)( int matrix_layout, char uplo, lapack_int n,
const float *in,
float *out );
void LAPACKE_ssy_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_ssy_trans)( int matrix_layout, char uplo, lapack_int n,
const float *in, lapack_int ldin,
float *out, lapack_int ldout );
void LAPACKE_stb_trans( int matrix_layout, char uplo, char diag,
void API_SUFFIX(LAPACKE_stb_trans)( int matrix_layout, char uplo, char diag,
lapack_int n, lapack_int kd,
const float *in, lapack_int ldin,
float *out, lapack_int ldout );
void LAPACKE_stf_trans( int matrix_layout, char transr, char uplo, char diag,
void API_SUFFIX(LAPACKE_stf_trans)( int matrix_layout, char transr, char uplo, char diag,
lapack_int n, const float *in,
float *out );
void LAPACKE_stp_trans( int matrix_layout, char uplo, char diag,
void API_SUFFIX(LAPACKE_stp_trans)( int matrix_layout, char uplo, char diag,
lapack_int n, const float *in,
float *out );
void LAPACKE_str_trans( int matrix_layout, char uplo, char diag, lapack_int n,
void API_SUFFIX(LAPACKE_str_trans)( int matrix_layout, char uplo, char diag, lapack_int n,
const float *in, lapack_int ldin,
float *out, lapack_int ldout );
void LAPACKE_stz_trans( int matrix_layout, char direct, char uplo,
void API_SUFFIX(LAPACKE_stz_trans)( int matrix_layout, char direct, char uplo,
char diag, lapack_int m, lapack_int n,
const float *in, lapack_int ldin,
float *out, lapack_int ldout );
void LAPACKE_zgb_trans( int matrix_layout, lapack_int m, lapack_int n,
void API_SUFFIX(LAPACKE_zgb_trans)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int kl, lapack_int ku,
const lapack_complex_double *in, lapack_int ldin,
lapack_complex_double *out, lapack_int ldout );
void LAPACKE_zge_trans( int matrix_layout, lapack_int m, lapack_int n,
void API_SUFFIX(LAPACKE_zge_trans)( int matrix_layout, lapack_int m, lapack_int n,
const lapack_complex_double* in, lapack_int ldin,
lapack_complex_double* out, lapack_int ldout );
void LAPACKE_zgg_trans( int matrix_layout, lapack_int m, lapack_int n,
void API_SUFFIX(LAPACKE_zgg_trans)( int matrix_layout, lapack_int m, lapack_int n,
const lapack_complex_double* in, lapack_int ldin,
lapack_complex_double* out, lapack_int ldout );
void LAPACKE_zhb_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_zhb_trans)( int matrix_layout, char uplo, lapack_int n,
lapack_int kd,
const lapack_complex_double *in, lapack_int ldin,
lapack_complex_double *out, lapack_int ldout );
void LAPACKE_zhe_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_zhe_trans)( int matrix_layout, char uplo, lapack_int n,
const lapack_complex_double *in, lapack_int ldin,
lapack_complex_double *out, lapack_int ldout );
void LAPACKE_zhp_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_zhp_trans)( int matrix_layout, char uplo, lapack_int n,
const lapack_complex_double *in,
lapack_complex_double *out );
void LAPACKE_zhs_trans( int matrix_layout, lapack_int n,
void API_SUFFIX(LAPACKE_zhs_trans)( int matrix_layout, lapack_int n,
const lapack_complex_double *in, lapack_int ldin,
lapack_complex_double *out, lapack_int ldout );
void LAPACKE_zpb_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_zpb_trans)( int matrix_layout, char uplo, lapack_int n,
lapack_int kd,
const lapack_complex_double *in, lapack_int ldin,
lapack_complex_double *out, lapack_int ldout );
void LAPACKE_zpf_trans( int matrix_layout, char transr, char uplo,
void API_SUFFIX(LAPACKE_zpf_trans)( int matrix_layout, char transr, char uplo,
lapack_int n, const lapack_complex_double *in,
lapack_complex_double *out );
void LAPACKE_zpo_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_zpo_trans)( int matrix_layout, char uplo, lapack_int n,
const lapack_complex_double *in, lapack_int ldin,
lapack_complex_double *out, lapack_int ldout );
void LAPACKE_zpp_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_zpp_trans)( int matrix_layout, char uplo, lapack_int n,
const lapack_complex_double *in,
lapack_complex_double *out );
void LAPACKE_zsp_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_zsp_trans)( int matrix_layout, char uplo, lapack_int n,
const lapack_complex_double *in,
lapack_complex_double *out );
void LAPACKE_zsy_trans( int matrix_layout, char uplo, lapack_int n,
void API_SUFFIX(LAPACKE_zsy_trans)( int matrix_layout, char uplo, lapack_int n,
const lapack_complex_double *in, lapack_int ldin,
lapack_complex_double *out, lapack_int ldout );
void LAPACKE_ztb_trans( int matrix_layout, char uplo, char diag,
void API_SUFFIX(LAPACKE_ztb_trans)( int matrix_layout, char uplo, char diag,
lapack_int n, lapack_int kd,
const lapack_complex_double *in, lapack_int ldin,
lapack_complex_double *out, lapack_int ldout );
void LAPACKE_ztf_trans( int matrix_layout, char transr, char uplo, char diag,
void API_SUFFIX(LAPACKE_ztf_trans)( int matrix_layout, char transr, char uplo, char diag,
lapack_int n, const lapack_complex_double *in,
lapack_complex_double *out );
void LAPACKE_ztp_trans( int matrix_layout, char uplo, char diag,
void API_SUFFIX(LAPACKE_ztp_trans)( int matrix_layout, char uplo, char diag,
lapack_int n, const lapack_complex_double *in,
lapack_complex_double *out );
void LAPACKE_ztr_trans( int matrix_layout, char uplo, char diag, lapack_int n,
void API_SUFFIX(LAPACKE_ztr_trans)( int matrix_layout, char uplo, char diag, lapack_int n,
const lapack_complex_double *in, lapack_int ldin,
lapack_complex_double *out, lapack_int ldout );
void LAPACKE_ztz_trans( int matrix_layout, char direct, char uplo,
void API_SUFFIX(LAPACKE_ztz_trans)( int matrix_layout, char direct, char uplo,
char diag, lapack_int m, lapack_int n,
const lapack_complex_double *in, lapack_int ldin,
lapack_complex_double *out, lapack_int ldout );
@@ -310,297 +310,297 @@ void LAPACKE_ztz_trans( int matrix_layout, char direct, char uplo,
LAPACK_DISNAN(*(((double*)&x)+1)) )
/* NaN checkers for vectors */
lapack_logical LAPACKE_c_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_c_nancheck)( lapack_int n,
const lapack_complex_float *x,
lapack_int incx );
lapack_logical LAPACKE_d_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_d_nancheck)( lapack_int n,
const double *x,
lapack_int incx );
lapack_logical LAPACKE_s_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_s_nancheck)( lapack_int n,
const float *x,
lapack_int incx );
lapack_logical LAPACKE_z_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_z_nancheck)( lapack_int n,
const lapack_complex_double *x,
lapack_int incx );
/* NaN checkers for matrices */
lapack_logical LAPACKE_cgb_nancheck( int matrix_layout, lapack_int m,
lapack_logical API_SUFFIX(LAPACKE_cgb_nancheck)( int matrix_layout, lapack_int m,
lapack_int n, lapack_int kl,
lapack_int ku,
const lapack_complex_float *ab,
lapack_int ldab );
lapack_logical LAPACKE_cge_nancheck( int matrix_layout, lapack_int m,
lapack_logical API_SUFFIX(LAPACKE_cge_nancheck)( int matrix_layout, lapack_int m,
lapack_int n,
const lapack_complex_float *a,
lapack_int lda );
lapack_logical LAPACKE_cgg_nancheck( int matrix_layout, lapack_int m,
lapack_logical API_SUFFIX(LAPACKE_cgg_nancheck)( int matrix_layout, lapack_int m,
lapack_int n,
const lapack_complex_float *a,
lapack_int lda );
lapack_logical LAPACKE_cgt_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_cgt_nancheck)( lapack_int n,
const lapack_complex_float *dl,
const lapack_complex_float *d,
const lapack_complex_float *du );
lapack_logical LAPACKE_chb_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_chb_nancheck)( int matrix_layout, char uplo,
lapack_int n, lapack_int kd,
const lapack_complex_float* ab,
lapack_int ldab );
lapack_logical LAPACKE_che_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_che_nancheck)( int matrix_layout, char uplo,
lapack_int n,
const lapack_complex_float *a,
lapack_int lda );
lapack_logical LAPACKE_chp_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_chp_nancheck)( lapack_int n,
const lapack_complex_float *ap );
lapack_logical LAPACKE_chs_nancheck( int matrix_layout, lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_chs_nancheck)( int matrix_layout, lapack_int n,
const lapack_complex_float *a,
lapack_int lda );
lapack_logical LAPACKE_cpb_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_cpb_nancheck)( int matrix_layout, char uplo,
lapack_int n, lapack_int kd,
const lapack_complex_float* ab,
lapack_int ldab );
lapack_logical LAPACKE_cpf_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_cpf_nancheck)( lapack_int n,
const lapack_complex_float *a );
lapack_logical LAPACKE_cpo_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_cpo_nancheck)( int matrix_layout, char uplo,
lapack_int n,
const lapack_complex_float *a,
lapack_int lda );
lapack_logical LAPACKE_cpp_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_cpp_nancheck)( lapack_int n,
const lapack_complex_float *ap );
lapack_logical LAPACKE_cpt_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_cpt_nancheck)( lapack_int n,
const float *d,
const lapack_complex_float *e );
lapack_logical LAPACKE_csp_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_csp_nancheck)( lapack_int n,
const lapack_complex_float *ap );
lapack_logical LAPACKE_cst_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_cst_nancheck)( lapack_int n,
const lapack_complex_float *d,
const lapack_complex_float *e );
lapack_logical LAPACKE_csy_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_csy_nancheck)( int matrix_layout, char uplo,
lapack_int n,
const lapack_complex_float *a,
lapack_int lda );
lapack_logical LAPACKE_ctb_nancheck( int matrix_layout, char uplo, char diag,
lapack_logical API_SUFFIX(LAPACKE_ctb_nancheck)( int matrix_layout, char uplo, char diag,
lapack_int n, lapack_int kd,
const lapack_complex_float* ab,
lapack_int ldab );
lapack_logical LAPACKE_ctf_nancheck( int matrix_layout, char transr,
lapack_logical API_SUFFIX(LAPACKE_ctf_nancheck)( int matrix_layout, char transr,
char uplo, char diag,
lapack_int n,
const lapack_complex_float *a );
lapack_logical LAPACKE_ctp_nancheck( int matrix_layout, char uplo, char diag,
lapack_logical API_SUFFIX(LAPACKE_ctp_nancheck)( int matrix_layout, char uplo, char diag,
lapack_int n,
const lapack_complex_float *ap );
lapack_logical LAPACKE_ctr_nancheck( int matrix_layout, char uplo, char diag,
lapack_logical API_SUFFIX(LAPACKE_ctr_nancheck)( int matrix_layout, char uplo, char diag,
lapack_int n,
const lapack_complex_float *a,
lapack_int lda );
lapack_logical LAPACKE_ctz_nancheck( int matrix_layout, char direct, char uplo,
lapack_logical API_SUFFIX(LAPACKE_ctz_nancheck)( int matrix_layout, char direct, char uplo,
char diag, lapack_int m, lapack_int n,
const lapack_complex_float *a,
lapack_int lda );
lapack_logical LAPACKE_dgb_nancheck( int matrix_layout, lapack_int m,
lapack_logical API_SUFFIX(LAPACKE_dgb_nancheck)( int matrix_layout, lapack_int m,
lapack_int n, lapack_int kl,
lapack_int ku,
const double *ab,
lapack_int ldab );
lapack_logical LAPACKE_dge_nancheck( int matrix_layout, lapack_int m,
lapack_logical API_SUFFIX(LAPACKE_dge_nancheck)( int matrix_layout, lapack_int m,
lapack_int n,
const double *a,
lapack_int lda );
lapack_logical LAPACKE_dgg_nancheck( int matrix_layout, lapack_int m,
lapack_logical API_SUFFIX(LAPACKE_dgg_nancheck)( int matrix_layout, lapack_int m,
lapack_int n,
const double *a,
lapack_int lda );
lapack_logical LAPACKE_dgt_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_dgt_nancheck)( lapack_int n,
const double *dl,
const double *d,
const double *du );
lapack_logical LAPACKE_dhs_nancheck( int matrix_layout, lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_dhs_nancheck)( int matrix_layout, lapack_int n,
const double *a,
lapack_int lda );
lapack_logical LAPACKE_dpb_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_dpb_nancheck)( int matrix_layout, char uplo,
lapack_int n, lapack_int kd,
const double* ab,
lapack_int ldab );
lapack_logical LAPACKE_dpf_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_dpf_nancheck)( lapack_int n,
const double *a );
lapack_logical LAPACKE_dpo_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_dpo_nancheck)( int matrix_layout, char uplo,
lapack_int n,
const double *a,
lapack_int lda );
lapack_logical LAPACKE_dpp_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_dpp_nancheck)( lapack_int n,
const double *ap );
lapack_logical LAPACKE_dpt_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_dpt_nancheck)( lapack_int n,
const double *d,
const double *e );
lapack_logical LAPACKE_dsb_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_dsb_nancheck)( int matrix_layout, char uplo,
lapack_int n, lapack_int kd,
const double* ab,
lapack_int ldab );
lapack_logical LAPACKE_dsp_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_dsp_nancheck)( lapack_int n,
const double *ap );
lapack_logical LAPACKE_dst_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_dst_nancheck)( lapack_int n,
const double *d,
const double *e );
lapack_logical LAPACKE_dsy_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_dsy_nancheck)( int matrix_layout, char uplo,
lapack_int n,
const double *a,
lapack_int lda );
lapack_logical LAPACKE_dtb_nancheck( int matrix_layout, char uplo, char diag,
lapack_logical API_SUFFIX(LAPACKE_dtb_nancheck)( int matrix_layout, char uplo, char diag,
lapack_int n, lapack_int kd,
const double* ab,
lapack_int ldab );
lapack_logical LAPACKE_dtf_nancheck( int matrix_layout, char transr,
lapack_logical API_SUFFIX(LAPACKE_dtf_nancheck)( int matrix_layout, char transr,
char uplo, char diag,
lapack_int n,
const double *a );
lapack_logical LAPACKE_dtp_nancheck( int matrix_layout, char uplo, char diag,
lapack_logical API_SUFFIX(LAPACKE_dtp_nancheck)( int matrix_layout, char uplo, char diag,
lapack_int n,
const double *ap );
lapack_logical LAPACKE_dtr_nancheck( int matrix_layout, char uplo, char diag,
lapack_logical API_SUFFIX(LAPACKE_dtr_nancheck)( int matrix_layout, char uplo, char diag,
lapack_int n,
const double *a,
lapack_int lda );
lapack_logical LAPACKE_dtz_nancheck( int matrix_layout, char direct, char uplo,
lapack_logical API_SUFFIX(LAPACKE_dtz_nancheck)( int matrix_layout, char direct, char uplo,
char diag, lapack_int m, lapack_int n,
const double *a, lapack_int lda );
lapack_logical LAPACKE_sgb_nancheck( int matrix_layout, lapack_int m,
lapack_logical API_SUFFIX(LAPACKE_sgb_nancheck)( int matrix_layout, lapack_int m,
lapack_int n, lapack_int kl,
lapack_int ku,
const float *ab,
lapack_int ldab );
lapack_logical LAPACKE_sge_nancheck( int matrix_layout, lapack_int m,
lapack_logical API_SUFFIX(LAPACKE_sge_nancheck)( int matrix_layout, lapack_int m,
lapack_int n,
const float *a,
lapack_int lda );
lapack_logical LAPACKE_sgg_nancheck( int matrix_layout, lapack_int m,
lapack_logical API_SUFFIX(LAPACKE_sgg_nancheck)( int matrix_layout, lapack_int m,
lapack_int n,
const float *a,
lapack_int lda );
lapack_logical LAPACKE_sgt_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_sgt_nancheck)( lapack_int n,
const float *dl,
const float *d,
const float *du );
lapack_logical LAPACKE_shs_nancheck( int matrix_layout, lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_shs_nancheck)( int matrix_layout, lapack_int n,
const float *a,
lapack_int lda );
lapack_logical LAPACKE_spb_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_spb_nancheck)( int matrix_layout, char uplo,
lapack_int n, lapack_int kd,
const float* ab,
lapack_int ldab );
lapack_logical LAPACKE_spf_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_spf_nancheck)( lapack_int n,
const float *a );
lapack_logical LAPACKE_spo_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_spo_nancheck)( int matrix_layout, char uplo,
lapack_int n,
const float *a,
lapack_int lda );
lapack_logical LAPACKE_spp_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_spp_nancheck)( lapack_int n,
const float *ap );
lapack_logical LAPACKE_spt_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_spt_nancheck)( lapack_int n,
const float *d,
const float *e );
lapack_logical LAPACKE_ssb_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_ssb_nancheck)( int matrix_layout, char uplo,
lapack_int n, lapack_int kd,
const float* ab,
lapack_int ldab );
lapack_logical LAPACKE_ssp_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_ssp_nancheck)( lapack_int n,
const float *ap );
lapack_logical LAPACKE_sst_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_sst_nancheck)( lapack_int n,
const float *d,
const float *e );
lapack_logical LAPACKE_ssy_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_ssy_nancheck)( int matrix_layout, char uplo,
lapack_int n,
const float *a,
lapack_int lda );
lapack_logical LAPACKE_stb_nancheck( int matrix_layout, char uplo, char diag,
lapack_logical API_SUFFIX(LAPACKE_stb_nancheck)( int matrix_layout, char uplo, char diag,
lapack_int n, lapack_int kd,
const float* ab,
lapack_int ldab );
lapack_logical LAPACKE_stf_nancheck( int matrix_layout, char transr,
lapack_logical API_SUFFIX(LAPACKE_stf_nancheck)( int matrix_layout, char transr,
char uplo, char diag,
lapack_int n,
const float *a );
lapack_logical LAPACKE_stp_nancheck( int matrix_layout, char uplo, char diag,
lapack_logical API_SUFFIX(LAPACKE_stp_nancheck)( int matrix_layout, char uplo, char diag,
lapack_int n,
const float *ap );
lapack_logical LAPACKE_str_nancheck( int matrix_layout, char uplo, char diag,
lapack_logical API_SUFFIX(LAPACKE_str_nancheck)( int matrix_layout, char uplo, char diag,
lapack_int n,
const float *a,
lapack_int lda );
lapack_logical LAPACKE_stz_nancheck( int matrix_layout, char direct, char uplo,
lapack_logical API_SUFFIX(LAPACKE_stz_nancheck)( int matrix_layout, char direct, char uplo,
char diag, lapack_int m, lapack_int n,
const float *a, lapack_int lda );
lapack_logical LAPACKE_zgb_nancheck( int matrix_layout, lapack_int m,
lapack_logical API_SUFFIX(LAPACKE_zgb_nancheck)( int matrix_layout, lapack_int m,
lapack_int n, lapack_int kl,
lapack_int ku,
const lapack_complex_double *ab,
lapack_int ldab );
lapack_logical LAPACKE_zge_nancheck( int matrix_layout, lapack_int m,
lapack_logical API_SUFFIX(LAPACKE_zge_nancheck)( int matrix_layout, lapack_int m,
lapack_int n,
const lapack_complex_double *a,
lapack_int lda );
lapack_logical LAPACKE_zgg_nancheck( int matrix_layout, lapack_int m,
lapack_logical API_SUFFIX(LAPACKE_zgg_nancheck)( int matrix_layout, lapack_int m,
lapack_int n,
const lapack_complex_double *a,
lapack_int lda );
lapack_logical LAPACKE_zgt_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_zgt_nancheck)( lapack_int n,
const lapack_complex_double *dl,
const lapack_complex_double *d,
const lapack_complex_double *du );
lapack_logical LAPACKE_zhb_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_zhb_nancheck)( int matrix_layout, char uplo,
lapack_int n, lapack_int kd,
const lapack_complex_double* ab,
lapack_int ldab );
lapack_logical LAPACKE_zhe_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_zhe_nancheck)( int matrix_layout, char uplo,
lapack_int n,
const lapack_complex_double *a,
lapack_int lda );
lapack_logical LAPACKE_zhp_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_zhp_nancheck)( lapack_int n,
const lapack_complex_double *ap );
lapack_logical LAPACKE_zhs_nancheck( int matrix_layout, lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_zhs_nancheck)( int matrix_layout, lapack_int n,
const lapack_complex_double *a,
lapack_int lda );
lapack_logical LAPACKE_zpb_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_zpb_nancheck)( int matrix_layout, char uplo,
lapack_int n, lapack_int kd,
const lapack_complex_double* ab,
lapack_int ldab );
lapack_logical LAPACKE_zpf_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_zpf_nancheck)( lapack_int n,
const lapack_complex_double *a );
lapack_logical LAPACKE_zpo_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_zpo_nancheck)( int matrix_layout, char uplo,
lapack_int n,
const lapack_complex_double *a,
lapack_int lda );
lapack_logical LAPACKE_zpp_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_zpp_nancheck)( lapack_int n,
const lapack_complex_double *ap );
lapack_logical LAPACKE_zpt_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_zpt_nancheck)( lapack_int n,
const double *d,
const lapack_complex_double *e );
lapack_logical LAPACKE_zsp_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_zsp_nancheck)( lapack_int n,
const lapack_complex_double *ap );
lapack_logical LAPACKE_zst_nancheck( lapack_int n,
lapack_logical API_SUFFIX(LAPACKE_zst_nancheck)( lapack_int n,
const lapack_complex_double *d,
const lapack_complex_double *e );
lapack_logical LAPACKE_zsy_nancheck( int matrix_layout, char uplo,
lapack_logical API_SUFFIX(LAPACKE_zsy_nancheck)( int matrix_layout, char uplo,
lapack_int n,
const lapack_complex_double *a,
lapack_int lda );
lapack_logical LAPACKE_ztb_nancheck( int matrix_layout, char uplo, char diag,
lapack_logical API_SUFFIX(LAPACKE_ztb_nancheck)( int matrix_layout, char uplo, char diag,
lapack_int n, lapack_int kd,
const lapack_complex_double* ab,
lapack_int ldab );
lapack_logical LAPACKE_ztf_nancheck( int matrix_layout, char transr,
lapack_logical API_SUFFIX(LAPACKE_ztf_nancheck)( int matrix_layout, char transr,
char uplo, char diag,
lapack_int n,
const lapack_complex_double *a );
lapack_logical LAPACKE_ztp_nancheck( int matrix_layout, char uplo, char diag,
lapack_logical API_SUFFIX(LAPACKE_ztp_nancheck)( int matrix_layout, char uplo, char diag,
lapack_int n,
const lapack_complex_double *ap );
lapack_logical LAPACKE_ztr_nancheck( int matrix_layout, char uplo, char diag,
lapack_logical API_SUFFIX(LAPACKE_ztr_nancheck)( int matrix_layout, char uplo, char diag,
lapack_int n,
const lapack_complex_double *a,
lapack_int lda );
lapack_logical LAPACKE_ztz_nancheck( int matrix_layout, char direct, char uplo,
lapack_logical API_SUFFIX(LAPACKE_ztz_nancheck)( int matrix_layout, char direct, char uplo,
char diag, lapack_int m, lapack_int n,
const lapack_complex_double *a,
lapack_int lda );
+16 -16
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cbbcsd( int matrix_layout, char jobu1, char jobu2,
lapack_int API_SUFFIX(LAPACKE_cbbcsd)( int matrix_layout, char jobu1, char jobu2,
char jobv1t, char jobv2t, char trans, lapack_int m,
lapack_int p, lapack_int q, float* theta, float* phi,
lapack_complex_float* u1, lapack_int ldu1,
@@ -48,10 +48,10 @@ lapack_int LAPACKE_cbbcsd( int matrix_layout, char jobu1, char jobu2,
float rwork_query;
int lapack_layout;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cbbcsd", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbbcsd", -1 );
return -1;
}
if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
if( API_SUFFIX(LAPACKE_lsame)( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
lapack_layout = LAPACK_COL_MAJOR;
} else {
lapack_layout = LAPACK_ROW_MAJOR;
@@ -59,36 +59,36 @@ lapack_int LAPACKE_cbbcsd( int matrix_layout, char jobu1, char jobu2,
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_s_nancheck( q-1, phi, 1 ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( q-1, phi, 1 ) ) {
return -11;
}
if( LAPACKE_s_nancheck( q, theta, 1 ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( q, theta, 1 ) ) {
return -10;
}
if( LAPACKE_lsame( jobu1, 'y' ) ) {
if( LAPACKE_cge_nancheck( lapack_layout, p, p, u1, ldu1 ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobu1, 'y' ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( lapack_layout, p, p, u1, ldu1 ) ) {
return -12;
}
}
if( LAPACKE_lsame( jobu2, 'y' ) ) {
if( LAPACKE_cge_nancheck( lapack_layout, m-p, m-p, u2, ldu2 ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobu2, 'y' ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( lapack_layout, m-p, m-p, u2, ldu2 ) ) {
return -14;
}
}
if( LAPACKE_lsame( jobv1t, 'y' ) ) {
if( LAPACKE_cge_nancheck( lapack_layout, q, q, v1t, ldv1t ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobv1t, 'y' ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( lapack_layout, q, q, v1t, ldv1t ) ) {
return -16;
}
}
if( LAPACKE_lsame( jobv2t, 'y' ) ) {
if( LAPACKE_cge_nancheck( lapack_layout, m-q, m-q, v2t, ldv2t ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobv2t, 'y' ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( lapack_layout, m-q, m-q, v2t, ldv2t ) ) {
return -18;
}
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cbbcsd_work( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
info = API_SUFFIX(LAPACKE_cbbcsd_work)( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
trans, m, p, q, theta, phi, u1, ldu1, u2, ldu2,
v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d, b12e,
b21d, b21e, b22d, b22e, &rwork_query, lrwork );
@@ -103,7 +103,7 @@ lapack_int LAPACKE_cbbcsd( int matrix_layout, char jobu1, char jobu2,
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cbbcsd_work( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
info = API_SUFFIX(LAPACKE_cbbcsd_work)( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
trans, m, p, q, theta, phi, u1, ldu1, u2, ldu2,
v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d, b12e,
b21d, b21e, b22d, b22e, rwork, lrwork );
@@ -111,7 +111,7 @@ lapack_int LAPACKE_cbbcsd( int matrix_layout, char jobu1, char jobu2,
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cbbcsd", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbbcsd", info );
}
return info;
}
+3 -3
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cbbcsd_work( int matrix_layout, char jobu1, char jobu2,
lapack_int API_SUFFIX(LAPACKE_cbbcsd_work)( int matrix_layout, char jobu1, char jobu2,
char jobv1t, char jobv2t, char trans,
lapack_int m, lapack_int p, lapack_int q,
float* theta, float* phi,
@@ -63,7 +63,7 @@ lapack_int LAPACKE_cbbcsd_work( int matrix_layout, char jobu1, char jobu2,
if( matrix_layout == LAPACK_COL_MAJOR ||
matrix_layout == LAPACK_ROW_MAJOR ) {
char ltrans;
if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
if( !API_SUFFIX(LAPACKE_lsame)( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
ltrans = 'n';
} else {
ltrans = 't';
@@ -78,7 +78,7 @@ lapack_int LAPACKE_cbbcsd_work( int matrix_layout, char jobu1, char jobu2,
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbbcsd_work", info );
}
return info;
}
+9 -9
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cbdsqr( int matrix_layout, char uplo, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cbdsqr)( int matrix_layout, char uplo, lapack_int n,
lapack_int ncvt, lapack_int nru, lapack_int ncc,
float* d, float* e, lapack_complex_float* vt,
lapack_int ldvt, lapack_complex_float* u,
@@ -42,30 +42,30 @@ lapack_int LAPACKE_cbdsqr( int matrix_layout, char uplo, lapack_int n,
lapack_int info = 0;
float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cbdsqr", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbdsqr", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( ncc != 0 ) {
if( LAPACKE_cge_nancheck( matrix_layout, n, ncc, c, ldc ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, ncc, c, ldc ) ) {
return -13;
}
}
if( LAPACKE_s_nancheck( n, d, 1 ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( n, d, 1 ) ) {
return -7;
}
if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( n-1, e, 1 ) ) {
return -8;
}
if( nru != 0 ) {
if( LAPACKE_cge_nancheck( matrix_layout, nru, n, u, ldu ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, nru, n, u, ldu ) ) {
return -11;
}
}
if( ncvt != 0 ) {
if( LAPACKE_cge_nancheck( matrix_layout, n, ncvt, vt, ldvt ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, ncvt, vt, ldvt ) ) {
return -9;
}
}
@@ -78,13 +78,13 @@ lapack_int LAPACKE_cbdsqr( int matrix_layout, char uplo, lapack_int n,
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cbdsqr_work( matrix_layout, uplo, n, ncvt, nru, ncc, d, e, vt,
info = API_SUFFIX(LAPACKE_cbdsqr_work)( matrix_layout, uplo, n, ncvt, nru, ncc, d, e, vt,
ldvt, u, ldu, c, ldc, work );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cbdsqr", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbdsqr", info );
}
return info;
}
+12 -12
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cbdsqr_work( int matrix_layout, char uplo, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cbdsqr_work)( int matrix_layout, char uplo, lapack_int n,
lapack_int ncvt, lapack_int nru, lapack_int ncc,
float* d, float* e, lapack_complex_float* vt,
lapack_int ldvt, lapack_complex_float* u,
@@ -57,17 +57,17 @@ lapack_int LAPACKE_cbdsqr_work( int matrix_layout, char uplo, lapack_int n,
/* Check leading dimension(s) */
if( ldc < ncc ) {
info = -14;
LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbdsqr_work", info );
return info;
}
if( ldu < n ) {
info = -12;
LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbdsqr_work", info );
return info;
}
if( ldvt < ncvt ) {
info = -10;
LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbdsqr_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -100,13 +100,13 @@ lapack_int LAPACKE_cbdsqr_work( int matrix_layout, char uplo, lapack_int n,
}
/* Transpose input matrices */
if( ncvt != 0 ) {
LAPACKE_cge_trans( matrix_layout, n, ncvt, vt, ldvt, vt_t, ldvt_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, ncvt, vt, ldvt, vt_t, ldvt_t );
}
if( nru != 0 ) {
LAPACKE_cge_trans( matrix_layout, nru, n, u, ldu, u_t, ldu_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, nru, n, u, ldu, u_t, ldu_t );
}
if( ncc != 0 ) {
LAPACKE_cge_trans( matrix_layout, n, ncc, c, ldc, c_t, ldc_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, ncc, c, ldc, c_t, ldc_t );
}
/* Call LAPACK function and adjust info */
LAPACK_cbdsqr( &uplo, &n, &ncvt, &nru, &ncc, d, e, vt_t, &ldvt_t, u_t,
@@ -116,14 +116,14 @@ lapack_int LAPACKE_cbdsqr_work( int matrix_layout, char uplo, lapack_int n,
}
/* Transpose output matrices */
if( ncvt != 0 ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, ncvt, vt_t, ldvt_t, vt,
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, ncvt, vt_t, ldvt_t, vt,
ldvt );
}
if( nru != 0 ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, nru, n, u_t, ldu_t, u, ldu );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, nru, n, u_t, ldu_t, u, ldu );
}
if( ncc != 0 ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, ncc, c_t, ldc_t, c, ldc );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, ncc, c_t, ldc_t, c, ldc );
}
/* Release memory and exit */
if( ncc != 0 ) {
@@ -139,11 +139,11 @@ exit_level_1:
}
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbdsqr_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbdsqr_work", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbbrd( int matrix_layout, char vect, lapack_int m,
lapack_int API_SUFFIX(LAPACKE_cgbbrd)( int matrix_layout, char vect, lapack_int m,
lapack_int n, lapack_int ncc, lapack_int kl,
lapack_int ku, lapack_complex_float* ab,
lapack_int ldab, float* d, float* e,
@@ -44,17 +44,17 @@ lapack_int LAPACKE_cgbbrd( int matrix_layout, char vect, lapack_int m,
float* rwork = NULL;
lapack_complex_float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgbbrd", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbbrd", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
return -8;
}
if( ncc != 0 ) {
if( LAPACKE_cge_nancheck( matrix_layout, m, ncc, c, ldc ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, ncc, c, ldc ) ) {
return -16;
}
}
@@ -73,7 +73,7 @@ lapack_int LAPACKE_cgbbrd( int matrix_layout, char vect, lapack_int m,
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgbbrd_work( matrix_layout, vect, m, n, ncc, kl, ku, ab, ldab,
info = API_SUFFIX(LAPACKE_cgbbrd_work)( matrix_layout, vect, m, n, ncc, kl, ku, ab, ldab,
d, e, q, ldq, pt, ldpt, c, ldc, work, rwork );
/* Release memory and exit */
LAPACKE_free( work );
@@ -81,7 +81,7 @@ exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbbrd", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbbrd", info );
}
return info;
}
+19 -19
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbbrd_work( int matrix_layout, char vect, lapack_int m,
lapack_int API_SUFFIX(LAPACKE_cgbbrd_work)( int matrix_layout, char vect, lapack_int m,
lapack_int n, lapack_int ncc, lapack_int kl,
lapack_int ku, lapack_complex_float* ab,
lapack_int ldab, float* d, float* e,
@@ -61,22 +61,22 @@ lapack_int LAPACKE_cgbbrd_work( int matrix_layout, char vect, lapack_int m,
/* Check leading dimension(s) */
if( ldab < n ) {
info = -9;
LAPACKE_xerbla( "LAPACKE_cgbbrd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbbrd_work", info );
return info;
}
if( ldc < ncc ) {
info = -17;
LAPACKE_xerbla( "LAPACKE_cgbbrd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbbrd_work", info );
return info;
}
if( ldpt < n ) {
info = -15;
LAPACKE_xerbla( "LAPACKE_cgbbrd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbbrd_work", info );
return info;
}
if( ldq < m ) {
info = -13;
LAPACKE_xerbla( "LAPACKE_cgbbrd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbbrd_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -86,7 +86,7 @@ lapack_int LAPACKE_cgbbrd_work( int matrix_layout, char vect, lapack_int m,
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( vect, 'b' ) || API_SUFFIX(LAPACKE_lsame)( vect, 'q' ) ) {
q_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) *
ldq_t * MAX(1,m) );
@@ -95,7 +95,7 @@ lapack_int LAPACKE_cgbbrd_work( int matrix_layout, char vect, lapack_int m,
goto exit_level_1;
}
}
if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( vect, 'b' ) || API_SUFFIX(LAPACKE_lsame)( vect, 'p' ) ) {
pt_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) *
ldpt_t * MAX(1,n) );
@@ -114,9 +114,9 @@ lapack_int LAPACKE_cgbbrd_work( int matrix_layout, char vect, lapack_int m,
}
}
/* Transpose input matrices */
LAPACKE_cgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
if( ncc != 0 ) {
LAPACKE_cge_trans( matrix_layout, m, ncc, c, ldc, c_t, ldc_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, ncc, c, ldc, c_t, ldc_t );
}
/* Call LAPACK function and adjust info */
LAPACK_cgbbrd( &vect, &m, &n, &ncc, &kl, &ku, ab_t, &ldab_t, d, e, q_t,
@@ -125,38 +125,38 @@ lapack_int LAPACKE_cgbbrd_work( int matrix_layout, char vect, lapack_int m,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cgb_trans( LAPACK_COL_MAJOR, m, n, kl, ku, ab_t, ldab_t, ab,
API_SUFFIX(LAPACKE_cgb_trans)( LAPACK_COL_MAJOR, m, n, kl, ku, ab_t, ldab_t, ab,
ldab );
if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, m, q_t, ldq_t, q, ldq );
if( API_SUFFIX(LAPACKE_lsame)( vect, 'b' ) || API_SUFFIX(LAPACKE_lsame)( vect, 'q' ) ) {
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, m, q_t, ldq_t, q, ldq );
}
if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, pt_t, ldpt_t, pt, ldpt );
if( API_SUFFIX(LAPACKE_lsame)( vect, 'b' ) || API_SUFFIX(LAPACKE_lsame)( vect, 'p' ) ) {
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, n, pt_t, ldpt_t, pt, ldpt );
}
if( ncc != 0 ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, ncc, c_t, ldc_t, c, ldc );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, ncc, c_t, ldc_t, c, ldc );
}
/* Release memory and exit */
if( ncc != 0 ) {
LAPACKE_free( c_t );
}
exit_level_3:
if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'p' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( vect, 'b' ) || API_SUFFIX(LAPACKE_lsame)( vect, 'p' ) ) {
LAPACKE_free( pt_t );
}
exit_level_2:
if( LAPACKE_lsame( vect, 'b' ) || LAPACKE_lsame( vect, 'q' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( vect, 'b' ) || API_SUFFIX(LAPACKE_lsame)( vect, 'q' ) ) {
LAPACKE_free( q_t );
}
exit_level_1:
LAPACKE_free( ab_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbbrd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbbrd_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgbbrd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbbrd_work", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbcon( int matrix_layout, char norm, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgbcon)( int matrix_layout, char norm, lapack_int n,
lapack_int kl, lapack_int ku,
const lapack_complex_float* ab, lapack_int ldab,
const lapack_int* ipiv, float anorm, float* rcond )
@@ -41,16 +41,16 @@ lapack_int LAPACKE_cgbcon( int matrix_layout, char norm, lapack_int n,
float* rwork = NULL;
lapack_complex_float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgbcon", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbcon", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
return -6;
}
if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( 1, &anorm, 1 ) ) {
return -9;
}
}
@@ -68,7 +68,7 @@ lapack_int LAPACKE_cgbcon( int matrix_layout, char norm, lapack_int n,
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgbcon_work( matrix_layout, norm, n, kl, ku, ab, ldab, ipiv,
info = API_SUFFIX(LAPACKE_cgbcon_work)( matrix_layout, norm, n, kl, ku, ab, ldab, ipiv,
anorm, rcond, work, rwork );
/* Release memory and exit */
LAPACKE_free( work );
@@ -76,7 +76,7 @@ exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbcon", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbcon", info );
}
return info;
}
+5 -5
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbcon_work( int matrix_layout, char norm, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgbcon_work)( int matrix_layout, char norm, lapack_int n,
lapack_int kl, lapack_int ku,
const lapack_complex_float* ab, lapack_int ldab,
const lapack_int* ipiv, float anorm,
@@ -53,7 +53,7 @@ lapack_int LAPACKE_cgbcon_work( int matrix_layout, char norm, lapack_int n,
/* Check leading dimension(s) */
if( ldab < n ) {
info = -7;
LAPACKE_xerbla( "LAPACKE_cgbcon_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbcon_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -64,7 +64,7 @@ lapack_int LAPACKE_cgbcon_work( int matrix_layout, char norm, lapack_int n,
goto exit_level_0;
}
/* Transpose input matrices */
LAPACKE_cgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
ldab_t );
/* Call LAPACK function and adjust info */
LAPACK_cgbcon( &norm, &n, &kl, &ku, ab_t, &ldab_t, ipiv, &anorm, rcond,
@@ -76,11 +76,11 @@ lapack_int LAPACKE_cgbcon_work( int matrix_layout, char norm, lapack_int n,
LAPACKE_free( ab_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbcon_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbcon_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgbcon_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbcon_work", info );
}
return info;
}
+4 -4
View File
@@ -32,24 +32,24 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbequ( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgbequ)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int kl, lapack_int ku,
const lapack_complex_float* ab, lapack_int ldab,
float* r, float* c, float* rowcnd, float* colcnd,
float* amax )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgbequ", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbequ", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
return -6;
}
}
#endif
return LAPACKE_cgbequ_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
return API_SUFFIX(LAPACKE_cgbequ_work)( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
rowcnd, colcnd, amax );
}
+5 -5
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbequ_work( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgbequ_work)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int kl, lapack_int ku,
const lapack_complex_float* ab, lapack_int ldab,
float* r, float* c, float* rowcnd,
@@ -52,7 +52,7 @@ lapack_int LAPACKE_cgbequ_work( int matrix_layout, lapack_int m, lapack_int n,
/* Check leading dimension(s) */
if( ldab < n ) {
info = -7;
LAPACKE_xerbla( "LAPACKE_cgbequ_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbequ_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -63,7 +63,7 @@ lapack_int LAPACKE_cgbequ_work( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Transpose input matrices */
LAPACKE_cgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
/* Call LAPACK function and adjust info */
LAPACK_cgbequ( &m, &n, &kl, &ku, ab_t, &ldab_t, r, c, rowcnd, colcnd,
amax, &info );
@@ -74,11 +74,11 @@ lapack_int LAPACKE_cgbequ_work( int matrix_layout, lapack_int m, lapack_int n,
LAPACKE_free( ab_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbequ_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbequ_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgbequ_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbequ_work", info );
}
return info;
}
+4 -4
View File
@@ -32,24 +32,24 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbequb( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgbequb)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int kl, lapack_int ku,
const lapack_complex_float* ab, lapack_int ldab,
float* r, float* c, float* rowcnd, float* colcnd,
float* amax )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgbequb", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbequb", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
return -6;
}
}
#endif
return LAPACKE_cgbequb_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
return API_SUFFIX(LAPACKE_cgbequb_work)( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
rowcnd, colcnd, amax );
}
+5 -5
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbequb_work( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgbequb_work)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int kl, lapack_int ku,
const lapack_complex_float* ab,
lapack_int ldab, float* r, float* c,
@@ -52,7 +52,7 @@ lapack_int LAPACKE_cgbequb_work( int matrix_layout, lapack_int m, lapack_int n,
/* Check leading dimension(s) */
if( ldab < n ) {
info = -7;
LAPACKE_xerbla( "LAPACKE_cgbequb_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbequb_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -63,7 +63,7 @@ lapack_int LAPACKE_cgbequb_work( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Transpose input matrices */
LAPACKE_cgb_trans( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, m, n, kl, ku, ab, ldab, ab_t, ldab_t );
/* Call LAPACK function and adjust info */
LAPACK_cgbequb( &m, &n, &kl, &ku, ab_t, &ldab_t, r, c, rowcnd, colcnd,
amax, &info );
@@ -74,11 +74,11 @@ lapack_int LAPACKE_cgbequb_work( int matrix_layout, lapack_int m, lapack_int n,
LAPACKE_free( ab_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbequb_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbequb_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgbequb_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbequb_work", info );
}
return info;
}
+8 -8
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbrfs( int matrix_layout, char trans, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgbrfs)( int matrix_layout, char trans, lapack_int n,
lapack_int kl, lapack_int ku, lapack_int nrhs,
const lapack_complex_float* ab, lapack_int ldab,
const lapack_complex_float* afb, lapack_int ldafb,
@@ -45,22 +45,22 @@ lapack_int LAPACKE_cgbrfs( int matrix_layout, char trans, lapack_int n,
float* rwork = NULL;
lapack_complex_float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgbrfs", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfs", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
return -7;
}
if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
return -9;
}
if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, nrhs, b, ldb ) ) {
return -12;
}
if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, nrhs, x, ldx ) ) {
return -14;
}
}
@@ -78,7 +78,7 @@ lapack_int LAPACKE_cgbrfs( int matrix_layout, char trans, lapack_int n,
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgbrfs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
info = API_SUFFIX(LAPACKE_cgbrfs_work)( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr,
work, rwork );
/* Release memory and exit */
@@ -87,7 +87,7 @@ exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbrfs", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfs", info );
}
return info;
}
+12 -12
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbrfs_work( int matrix_layout, char trans, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgbrfs_work)( int matrix_layout, char trans, lapack_int n,
lapack_int kl, lapack_int ku, lapack_int nrhs,
const lapack_complex_float* ab, lapack_int ldab,
const lapack_complex_float* afb,
@@ -62,22 +62,22 @@ lapack_int LAPACKE_cgbrfs_work( int matrix_layout, char trans, lapack_int n,
/* Check leading dimension(s) */
if( ldab < n ) {
info = -8;
LAPACKE_xerbla( "LAPACKE_cgbrfs_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfs_work", info );
return info;
}
if( ldafb < n ) {
info = -10;
LAPACKE_xerbla( "LAPACKE_cgbrfs_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfs_work", info );
return info;
}
if( ldb < nrhs ) {
info = -13;
LAPACKE_xerbla( "LAPACKE_cgbrfs_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfs_work", info );
return info;
}
if( ldx < nrhs ) {
info = -15;
LAPACKE_xerbla( "LAPACKE_cgbrfs_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfs_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -108,11 +108,11 @@ lapack_int LAPACKE_cgbrfs_work( int matrix_layout, char trans, lapack_int n,
goto exit_level_3;
}
/* Transpose input matrices */
LAPACKE_cgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
LAPACKE_cgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
ldafb_t );
LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
/* Call LAPACK function and adjust info */
LAPACK_cgbrfs( &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, afb_t,
&ldafb_t, ipiv, b_t, &ldb_t, x_t, &ldx_t, ferr, berr,
@@ -121,7 +121,7 @@ lapack_int LAPACKE_cgbrfs_work( int matrix_layout, char trans, lapack_int n,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
/* Release memory and exit */
LAPACKE_free( x_t );
exit_level_3:
@@ -132,11 +132,11 @@ exit_level_1:
LAPACKE_free( ab_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbrfs_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfs_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgbrfs_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfs_work", info );
}
return info;
}
+13 -13
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbrfsx( int matrix_layout, char trans, char equed,
lapack_int API_SUFFIX(LAPACKE_cgbrfsx)( int matrix_layout, char trans, char equed,
lapack_int n, lapack_int kl, lapack_int ku,
lapack_int nrhs, const lapack_complex_float* ab,
lapack_int ldab, const lapack_complex_float* afb,
@@ -48,37 +48,37 @@ lapack_int LAPACKE_cgbrfsx( int matrix_layout, char trans, char equed,
float* rwork = NULL;
lapack_complex_float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgbrfsx", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfsx", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
return -8;
}
if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
return -10;
}
if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, nrhs, b, ldb ) ) {
return -15;
}
if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
if( LAPACKE_s_nancheck( n, c, 1 ) ) {
if( API_SUFFIX(LAPACKE_lsame)( equed, 'b' ) || API_SUFFIX(LAPACKE_lsame)( equed, 'c' ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( n, c, 1 ) ) {
return -14;
}
}
if( nparams>0 ) {
if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( nparams, params, 1 ) ) {
return -25;
}
}
if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
if( LAPACKE_s_nancheck( n, r, 1 ) ) {
if( API_SUFFIX(LAPACKE_lsame)( equed, 'b' ) || API_SUFFIX(LAPACKE_lsame)( equed, 'r' ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( n, r, 1 ) ) {
return -13;
}
}
if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, nrhs, x, ldx ) ) {
return -17;
}
}
@@ -96,7 +96,7 @@ lapack_int LAPACKE_cgbrfsx( int matrix_layout, char trans, char equed,
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgbrfsx_work( matrix_layout, trans, equed, n, kl, ku, nrhs,
info = API_SUFFIX(LAPACKE_cgbrfsx_work)( matrix_layout, trans, equed, n, kl, ku, nrhs,
ab, ldab, afb, ldafb, ipiv, r, c, b, ldb, x,
ldx, rcond, berr, n_err_bnds, err_bnds_norm,
err_bnds_comp, nparams, params, work, rwork );
@@ -106,7 +106,7 @@ exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbrfsx", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfsx", info );
}
return info;
}
+14 -14
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbrfsx_work( int matrix_layout, char trans, char equed,
lapack_int API_SUFFIX(LAPACKE_cgbrfsx_work)( int matrix_layout, char trans, char equed,
lapack_int n, lapack_int kl, lapack_int ku,
lapack_int nrhs,
const lapack_complex_float* ab,
@@ -72,22 +72,22 @@ lapack_int LAPACKE_cgbrfsx_work( int matrix_layout, char trans, char equed,
/* Check leading dimension(s) */
if( ldab < n ) {
info = -9;
LAPACKE_xerbla( "LAPACKE_cgbrfsx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfsx_work", info );
return info;
}
if( ldafb < n ) {
info = -11;
LAPACKE_xerbla( "LAPACKE_cgbrfsx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfsx_work", info );
return info;
}
if( ldb < nrhs ) {
info = -16;
LAPACKE_xerbla( "LAPACKE_cgbrfsx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfsx_work", info );
return info;
}
if( ldx < nrhs ) {
info = -18;
LAPACKE_xerbla( "LAPACKE_cgbrfsx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfsx_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -130,11 +130,11 @@ lapack_int LAPACKE_cgbrfsx_work( int matrix_layout, char trans, char equed,
goto exit_level_5;
}
/* Transpose input matrices */
LAPACKE_cgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
LAPACKE_cgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
ldafb_t );
LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
LAPACKE_cge_trans( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, nrhs, x, ldx, x_t, ldx_t );
/* Call LAPACK function and adjust info */
LAPACK_cgbrfsx( &trans, &equed, &n, &kl, &ku, &nrhs, ab_t, &ldab_t,
afb_t, &ldafb_t, ipiv, r, c, b_t, &ldb_t, x_t, &ldx_t,
@@ -144,10 +144,10 @@ lapack_int LAPACKE_cgbrfsx_work( int matrix_layout, char trans, char equed,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
API_SUFFIX(LAPACKE_sge_trans)( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
nrhs, err_bnds_norm, nrhs );
LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
API_SUFFIX(LAPACKE_sge_trans)( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
nrhs, err_bnds_comp, nrhs );
/* Release memory and exit */
LAPACKE_free( err_bnds_comp_t );
@@ -163,11 +163,11 @@ exit_level_1:
LAPACKE_free( ab_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbrfsx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfsx_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgbrfsx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbrfsx_work", info );
}
return info;
}
+5 -5
View File
@@ -32,27 +32,27 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbsv( int matrix_layout, lapack_int n, lapack_int kl,
lapack_int API_SUFFIX(LAPACKE_cgbsv)( int matrix_layout, lapack_int n, lapack_int kl,
lapack_int ku, lapack_int nrhs,
lapack_complex_float* ab, lapack_int ldab,
lapack_int* ipiv, lapack_complex_float* b,
lapack_int ldb )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgbsv", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsv", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
return -6;
}
if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, nrhs, b, ldb ) ) {
return -9;
}
}
#endif
return LAPACKE_cgbsv_work( matrix_layout, n, kl, ku, nrhs, ab, ldab, ipiv, b,
return API_SUFFIX(LAPACKE_cgbsv_work)( matrix_layout, n, kl, ku, nrhs, ab, ldab, ipiv, b,
ldb );
}
+9 -9
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbsv_work( int matrix_layout, lapack_int n, lapack_int kl,
lapack_int API_SUFFIX(LAPACKE_cgbsv_work)( int matrix_layout, lapack_int n, lapack_int kl,
lapack_int ku, lapack_int nrhs,
lapack_complex_float* ab, lapack_int ldab,
lapack_int* ipiv, lapack_complex_float* b,
@@ -53,12 +53,12 @@ lapack_int LAPACKE_cgbsv_work( int matrix_layout, lapack_int n, lapack_int kl,
/* Check leading dimension(s) */
if( ldab < n ) {
info = -7;
LAPACKE_xerbla( "LAPACKE_cgbsv_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsv_work", info );
return info;
}
if( ldb < nrhs ) {
info = -10;
LAPACKE_xerbla( "LAPACKE_cgbsv_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsv_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -76,9 +76,9 @@ lapack_int LAPACKE_cgbsv_work( int matrix_layout, lapack_int n, lapack_int kl,
goto exit_level_1;
}
/* Transpose input matrices */
LAPACKE_cgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
ldab_t );
LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
/* Call LAPACK function and adjust info */
LAPACK_cgbsv( &n, &kl, &ku, &nrhs, ab_t, &ldab_t, ipiv, b_t, &ldb_t,
&info );
@@ -86,20 +86,20 @@ lapack_int LAPACKE_cgbsv_work( int matrix_layout, lapack_int n, lapack_int kl,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, ab_t, ldab_t, ab,
API_SUFFIX(LAPACKE_cgb_trans)( LAPACK_COL_MAJOR, n, n, kl, kl+ku, ab_t, ldab_t, ab,
ldab );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
/* Release memory and exit */
LAPACKE_free( b_t );
exit_level_1:
LAPACKE_free( ab_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbsv_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsv_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgbsv_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsv_work", info );
}
return info;
}
+14 -14
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbsvx( int matrix_layout, char fact, char trans,
lapack_int API_SUFFIX(LAPACKE_cgbsvx)( int matrix_layout, char fact, char trans,
lapack_int n, lapack_int kl, lapack_int ku,
lapack_int nrhs, lapack_complex_float* ab,
lapack_int ldab, lapack_complex_float* afb,
@@ -46,33 +46,33 @@ lapack_int LAPACKE_cgbsvx( int matrix_layout, char fact, char trans,
float* rwork = NULL;
lapack_complex_float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgbsvx", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvx", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
return -8;
}
if( LAPACKE_lsame( fact, 'f' ) ) {
if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
if( API_SUFFIX(LAPACKE_lsame)( fact, 'f' ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, n, n, kl, kl+ku, afb,
ldafb ) ) {
return -10;
}
}
if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, nrhs, b, ldb ) ) {
return -16;
}
if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
LAPACKE_lsame( *equed, 'c' ) ) ) {
if( LAPACKE_s_nancheck( n, c, 1 ) ) {
if( API_SUFFIX(LAPACKE_lsame)( fact, 'f' ) && ( API_SUFFIX(LAPACKE_lsame)( *equed, 'b' ) ||
API_SUFFIX(LAPACKE_lsame)( *equed, 'c' ) ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( n, c, 1 ) ) {
return -15;
}
}
if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
LAPACKE_lsame( *equed, 'r' ) ) ) {
if( LAPACKE_s_nancheck( n, r, 1 ) ) {
if( API_SUFFIX(LAPACKE_lsame)( fact, 'f' ) && ( API_SUFFIX(LAPACKE_lsame)( *equed, 'b' ) ||
API_SUFFIX(LAPACKE_lsame)( *equed, 'r' ) ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( n, r, 1 ) ) {
return -14;
}
}
@@ -91,7 +91,7 @@ lapack_int LAPACKE_cgbsvx( int matrix_layout, char fact, char trans,
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgbsvx_work( matrix_layout, fact, trans, n, kl, ku, nrhs, ab,
info = API_SUFFIX(LAPACKE_cgbsvx_work)( matrix_layout, fact, trans, n, kl, ku, nrhs, ab,
ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x,
ldx, rcond, ferr, berr, work, rwork );
/* Backup significant data from working array(s) */
@@ -102,7 +102,7 @@ exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbsvx", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvx", info );
}
return info;
}
+20 -20
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbsvx_work( int matrix_layout, char fact, char trans,
lapack_int API_SUFFIX(LAPACKE_cgbsvx_work)( int matrix_layout, char fact, char trans,
lapack_int n, lapack_int kl, lapack_int ku,
lapack_int nrhs, lapack_complex_float* ab,
lapack_int ldab, lapack_complex_float* afb,
@@ -64,22 +64,22 @@ lapack_int LAPACKE_cgbsvx_work( int matrix_layout, char fact, char trans,
/* Check leading dimension(s) */
if( ldab < n ) {
info = -9;
LAPACKE_xerbla( "LAPACKE_cgbsvx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvx_work", info );
return info;
}
if( ldafb < n ) {
info = -11;
LAPACKE_xerbla( "LAPACKE_cgbsvx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvx_work", info );
return info;
}
if( ldb < nrhs ) {
info = -17;
LAPACKE_xerbla( "LAPACKE_cgbsvx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvx_work", info );
return info;
}
if( ldx < nrhs ) {
info = -19;
LAPACKE_xerbla( "LAPACKE_cgbsvx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvx_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -110,12 +110,12 @@ lapack_int LAPACKE_cgbsvx_work( int matrix_layout, char fact, char trans,
goto exit_level_3;
}
/* Transpose input matrices */
LAPACKE_cgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
if( LAPACKE_lsame( fact, 'f' ) ) {
LAPACKE_cgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
if( API_SUFFIX(LAPACKE_lsame)( fact, 'f' ) ) {
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
ldafb_t );
}
LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
/* Call LAPACK function and adjust info */
LAPACK_cgbsvx( &fact, &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, afb_t,
&ldafb_t, ipiv, equed, r, c, b_t, &ldb_t, x_t, &ldx_t,
@@ -124,20 +124,20 @@ lapack_int LAPACKE_cgbsvx_work( int matrix_layout, char fact, char trans,
info = info - 1;
}
/* Transpose output matrices */
if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
LAPACKE_cgb_trans( LAPACK_COL_MAJOR, n, n, kl, ku, ab_t, ldab_t, ab,
if( API_SUFFIX(LAPACKE_lsame)( fact, 'e' ) && ( API_SUFFIX(LAPACKE_lsame)( *equed, 'b' ) ||
API_SUFFIX(LAPACKE_lsame)( *equed, 'c' ) || API_SUFFIX(LAPACKE_lsame)( *equed, 'r' ) ) ) {
API_SUFFIX(LAPACKE_cgb_trans)( LAPACK_COL_MAJOR, n, n, kl, ku, ab_t, ldab_t, ab,
ldab );
}
if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
LAPACKE_cgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, afb_t,
if( API_SUFFIX(LAPACKE_lsame)( fact, 'e' ) || API_SUFFIX(LAPACKE_lsame)( fact, 'n' ) ) {
API_SUFFIX(LAPACKE_cgb_trans)( LAPACK_COL_MAJOR, n, n, kl, kl+ku, afb_t,
ldafb_t, afb, ldafb );
}
if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
if( API_SUFFIX(LAPACKE_lsame)( fact, 'f' ) && ( API_SUFFIX(LAPACKE_lsame)( *equed, 'b' ) ||
API_SUFFIX(LAPACKE_lsame)( *equed, 'c' ) || API_SUFFIX(LAPACKE_lsame)( *equed, 'r' ) ) ) {
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
}
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
/* Release memory and exit */
LAPACKE_free( x_t );
exit_level_3:
@@ -148,11 +148,11 @@ exit_level_1:
LAPACKE_free( ab_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbsvx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvx_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgbsvx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvx_work", info );
}
return info;
}
+15 -15
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbsvxx( int matrix_layout, char fact, char trans,
lapack_int API_SUFFIX(LAPACKE_cgbsvxx)( int matrix_layout, char fact, char trans,
lapack_int n, lapack_int kl, lapack_int ku,
lapack_int nrhs, lapack_complex_float* ab,
lapack_int ldab, lapack_complex_float* afb,
@@ -48,38 +48,38 @@ lapack_int LAPACKE_cgbsvxx( int matrix_layout, char fact, char trans,
float* rwork = NULL;
lapack_complex_float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgbsvxx", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvxx", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
return -8;
}
if( LAPACKE_lsame( fact, 'f' ) ) {
if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
if( API_SUFFIX(LAPACKE_lsame)( fact, 'f' ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, n, n, kl, kl+ku, afb,
ldafb ) ) {
return -10;
}
}
if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, nrhs, b, ldb ) ) {
return -16;
}
if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
LAPACKE_lsame( *equed, 'c' ) ) ) {
if( LAPACKE_s_nancheck( n, c, 1 ) ) {
if( API_SUFFIX(LAPACKE_lsame)( fact, 'f' ) && ( API_SUFFIX(LAPACKE_lsame)( *equed, 'b' ) ||
API_SUFFIX(LAPACKE_lsame)( *equed, 'c' ) ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( n, c, 1 ) ) {
return -15;
}
}
if( nparams>0 ) {
if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( nparams, params, 1 ) ) {
return -27;
}
}
if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
LAPACKE_lsame( *equed, 'r' ) ) ) {
if( LAPACKE_s_nancheck( n, r, 1 ) ) {
if( API_SUFFIX(LAPACKE_lsame)( fact, 'f' ) && ( API_SUFFIX(LAPACKE_lsame)( *equed, 'b' ) ||
API_SUFFIX(LAPACKE_lsame)( *equed, 'r' ) ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( n, r, 1 ) ) {
return -14;
}
}
@@ -98,7 +98,7 @@ lapack_int LAPACKE_cgbsvxx( int matrix_layout, char fact, char trans,
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgbsvxx_work( matrix_layout, fact, trans, n, kl, ku, nrhs, ab,
info = API_SUFFIX(LAPACKE_cgbsvxx_work)( matrix_layout, fact, trans, n, kl, ku, nrhs, ab,
ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x,
ldx, rcond, rpvgrw, berr, n_err_bnds,
err_bnds_norm, err_bnds_comp, nparams, params,
@@ -109,7 +109,7 @@ exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbsvxx", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvxx", info );
}
return info;
}
+22 -22
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbsvxx_work( int matrix_layout, char fact, char trans,
lapack_int API_SUFFIX(LAPACKE_cgbsvxx_work)( int matrix_layout, char fact, char trans,
lapack_int n, lapack_int kl, lapack_int ku,
lapack_int nrhs, lapack_complex_float* ab,
lapack_int ldab, lapack_complex_float* afb,
@@ -70,22 +70,22 @@ lapack_int LAPACKE_cgbsvxx_work( int matrix_layout, char fact, char trans,
/* Check leading dimension(s) */
if( ldab < n ) {
info = -9;
LAPACKE_xerbla( "LAPACKE_cgbsvxx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvxx_work", info );
return info;
}
if( ldafb < n ) {
info = -11;
LAPACKE_xerbla( "LAPACKE_cgbsvxx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvxx_work", info );
return info;
}
if( ldb < nrhs ) {
info = -17;
LAPACKE_xerbla( "LAPACKE_cgbsvxx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvxx_work", info );
return info;
}
if( ldx < nrhs ) {
info = -19;
LAPACKE_xerbla( "LAPACKE_cgbsvxx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvxx_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -128,12 +128,12 @@ lapack_int LAPACKE_cgbsvxx_work( int matrix_layout, char fact, char trans,
goto exit_level_5;
}
/* Transpose input matrices */
LAPACKE_cgb_trans( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
if( LAPACKE_lsame( fact, 'f' ) ) {
LAPACKE_cgb_trans( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, n, n, kl, ku, ab, ldab, ab_t, ldab_t );
if( API_SUFFIX(LAPACKE_lsame)( fact, 'f' ) ) {
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, n, n, kl, kl+ku, afb, ldafb, afb_t,
ldafb_t );
}
LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
/* Call LAPACK function and adjust info */
LAPACK_cgbsvxx( &fact, &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t,
afb_t, &ldafb_t, ipiv, equed, r, c, b_t, &ldb_t, x_t,
@@ -144,23 +144,23 @@ lapack_int LAPACKE_cgbsvxx_work( int matrix_layout, char fact, char trans,
info = info - 1;
}
/* Transpose output matrices */
if( LAPACKE_lsame( fact, 'e' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
LAPACKE_cgb_trans( LAPACK_COL_MAJOR, n, n, kl, ku, ab_t, ldab_t, ab,
if( API_SUFFIX(LAPACKE_lsame)( fact, 'e' ) && ( API_SUFFIX(LAPACKE_lsame)( *equed, 'b' ) ||
API_SUFFIX(LAPACKE_lsame)( *equed, 'c' ) || API_SUFFIX(LAPACKE_lsame)( *equed, 'r' ) ) ) {
API_SUFFIX(LAPACKE_cgb_trans)( LAPACK_COL_MAJOR, n, n, kl, ku, ab_t, ldab_t, ab,
ldab );
}
if( LAPACKE_lsame( fact, 'e' ) || LAPACKE_lsame( fact, 'n' ) ) {
LAPACKE_cgb_trans( LAPACK_COL_MAJOR, n, n, kl, kl+ku, afb_t,
if( API_SUFFIX(LAPACKE_lsame)( fact, 'e' ) || API_SUFFIX(LAPACKE_lsame)( fact, 'n' ) ) {
API_SUFFIX(LAPACKE_cgb_trans)( LAPACK_COL_MAJOR, n, n, kl, kl+ku, afb_t,
ldafb_t, afb, ldafb );
}
if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
LAPACKE_lsame( *equed, 'c' ) || LAPACKE_lsame( *equed, 'r' ) ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
if( API_SUFFIX(LAPACKE_lsame)( fact, 'f' ) && ( API_SUFFIX(LAPACKE_lsame)( *equed, 'b' ) ||
API_SUFFIX(LAPACKE_lsame)( *equed, 'c' ) || API_SUFFIX(LAPACKE_lsame)( *equed, 'r' ) ) ) {
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
}
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, nrhs, x_t, ldx_t, x, ldx );
API_SUFFIX(LAPACKE_sge_trans)( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_norm_t,
nrhs, err_bnds_norm, n_err_bnds );
LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
API_SUFFIX(LAPACKE_sge_trans)( LAPACK_COL_MAJOR, nrhs, n_err_bnds, err_bnds_comp_t,
nrhs, err_bnds_comp, n_err_bnds );
/* Release memory and exit */
LAPACKE_free( err_bnds_comp_t );
@@ -176,11 +176,11 @@ exit_level_1:
LAPACKE_free( ab_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbsvxx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvxx_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgbsvxx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbsvxx_work", info );
}
return info;
}
+4 -4
View File
@@ -32,22 +32,22 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbtrf( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgbtrf)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int kl, lapack_int ku,
lapack_complex_float* ab, lapack_int ldab,
lapack_int* ipiv )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgbtrf", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbtrf", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, kl+ku, ab, ldab ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, m, n, kl, kl+ku, ab, ldab ) ) {
return -6;
}
}
#endif
return LAPACKE_cgbtrf_work( matrix_layout, m, n, kl, ku, ab, ldab, ipiv );
return API_SUFFIX(LAPACKE_cgbtrf_work)( matrix_layout, m, n, kl, ku, ab, ldab, ipiv );
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbtrf_work( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgbtrf_work)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int kl, lapack_int ku,
lapack_complex_float* ab, lapack_int ldab,
lapack_int* ipiv )
@@ -50,7 +50,7 @@ lapack_int LAPACKE_cgbtrf_work( int matrix_layout, lapack_int m, lapack_int n,
/* Check leading dimension(s) */
if( ldab < n ) {
info = -7;
LAPACKE_xerbla( "LAPACKE_cgbtrf_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbtrf_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -61,7 +61,7 @@ lapack_int LAPACKE_cgbtrf_work( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Transpose input matrices */
LAPACKE_cgb_trans( matrix_layout, m, n, kl, kl+ku, ab, ldab, ab_t,
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, m, n, kl, kl+ku, ab, ldab, ab_t,
ldab_t );
/* Call LAPACK function and adjust info */
LAPACK_cgbtrf( &m, &n, &kl, &ku, ab_t, &ldab_t, ipiv, &info );
@@ -69,17 +69,17 @@ lapack_int LAPACKE_cgbtrf_work( int matrix_layout, lapack_int m, lapack_int n,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cgb_trans( LAPACK_COL_MAJOR, m, n, kl, kl+ku, ab_t, ldab_t, ab,
API_SUFFIX(LAPACKE_cgb_trans)( LAPACK_COL_MAJOR, m, n, kl, kl+ku, ab_t, ldab_t, ab,
ldab );
/* Release memory and exit */
LAPACKE_free( ab_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbtrf_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbtrf_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgbtrf_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbtrf_work", info );
}
return info;
}
+5 -5
View File
@@ -32,27 +32,27 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbtrs( int matrix_layout, char trans, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgbtrs)( int matrix_layout, char trans, lapack_int n,
lapack_int kl, lapack_int ku, lapack_int nrhs,
const lapack_complex_float* ab, lapack_int ldab,
const lapack_int* ipiv, lapack_complex_float* b,
lapack_int ldb )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgbtrs", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbtrs", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
return -7;
}
if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, nrhs, b, ldb ) ) {
return -10;
}
}
#endif
return LAPACKE_cgbtrs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
return API_SUFFIX(LAPACKE_cgbtrs_work)( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
ipiv, b, ldb );
}
+8 -8
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgbtrs_work( int matrix_layout, char trans, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgbtrs_work)( int matrix_layout, char trans, lapack_int n,
lapack_int kl, lapack_int ku, lapack_int nrhs,
const lapack_complex_float* ab, lapack_int ldab,
const lapack_int* ipiv, lapack_complex_float* b,
@@ -54,12 +54,12 @@ lapack_int LAPACKE_cgbtrs_work( int matrix_layout, char trans, lapack_int n,
/* Check leading dimension(s) */
if( ldab < n ) {
info = -8;
LAPACKE_xerbla( "LAPACKE_cgbtrs_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbtrs_work", info );
return info;
}
if( ldb < nrhs ) {
info = -11;
LAPACKE_xerbla( "LAPACKE_cgbtrs_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbtrs_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -77,9 +77,9 @@ lapack_int LAPACKE_cgbtrs_work( int matrix_layout, char trans, lapack_int n,
goto exit_level_1;
}
/* Transpose input matrices */
LAPACKE_cgb_trans( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
API_SUFFIX(LAPACKE_cgb_trans)( matrix_layout, n, n, kl, kl+ku, ab, ldab, ab_t,
ldab_t );
LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
/* Call LAPACK function and adjust info */
LAPACK_cgbtrs( &trans, &n, &kl, &ku, &nrhs, ab_t, &ldab_t, ipiv, b_t,
&ldb_t, &info );
@@ -87,18 +87,18 @@ lapack_int LAPACKE_cgbtrs_work( int matrix_layout, char trans, lapack_int n,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
/* Release memory and exit */
LAPACKE_free( b_t );
exit_level_1:
LAPACKE_free( ab_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgbtrs_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbtrs_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgbtrs_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbtrs_work", info );
}
return info;
}
+5 -5
View File
@@ -32,26 +32,26 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgebak( int matrix_layout, char job, char side, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgebak)( int matrix_layout, char job, char side, lapack_int n,
lapack_int ilo, lapack_int ihi, const float* scale,
lapack_int m, lapack_complex_float* v,
lapack_int ldv )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgebak", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgebak", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_s_nancheck( n, scale, 1 ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( n, scale, 1 ) ) {
return -7;
}
if( LAPACKE_cge_nancheck( matrix_layout, n, m, v, ldv ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, m, v, ldv ) ) {
return -9;
}
}
#endif
return LAPACKE_cgebak_work( matrix_layout, job, side, n, ilo, ihi, scale, m,
return API_SUFFIX(LAPACKE_cgebak_work)( matrix_layout, job, side, n, ilo, ihi, scale, m,
v, ldv );
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgebak_work( int matrix_layout, char job, char side,
lapack_int API_SUFFIX(LAPACKE_cgebak_work)( int matrix_layout, char job, char side,
lapack_int n, lapack_int ilo, lapack_int ihi,
const float* scale, lapack_int m,
lapack_complex_float* v, lapack_int ldv )
@@ -50,7 +50,7 @@ lapack_int LAPACKE_cgebak_work( int matrix_layout, char job, char side,
/* Check leading dimension(s) */
if( ldv < m ) {
info = -10;
LAPACKE_xerbla( "LAPACKE_cgebak_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgebak_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -61,7 +61,7 @@ lapack_int LAPACKE_cgebak_work( int matrix_layout, char job, char side,
goto exit_level_0;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, n, m, v, ldv, v_t, ldv_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, m, v, ldv, v_t, ldv_t );
/* Call LAPACK function and adjust info */
LAPACK_cgebak( &job, &side, &n, &ilo, &ihi, scale, &m, v_t, &ldv_t,
&info );
@@ -69,16 +69,16 @@ lapack_int LAPACKE_cgebak_work( int matrix_layout, char job, char side,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, m, v_t, ldv_t, v, ldv );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, m, v_t, ldv_t, v, ldv );
/* Release memory and exit */
LAPACKE_free( v_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgebak_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgebak_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgebak_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgebak_work", info );
}
return info;
}
+6 -6
View File
@@ -32,24 +32,24 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgebal( int matrix_layout, char job, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgebal)( int matrix_layout, char job, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_int* ilo, lapack_int* ihi, float* scale )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgebal", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgebal", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
LAPACKE_lsame( job, 's' ) ) {
if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_lsame)( job, 'b' ) || API_SUFFIX(LAPACKE_lsame)( job, 'p' ) ||
API_SUFFIX(LAPACKE_lsame)( job, 's' ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, n, a, lda ) ) {
return -4;
}
}
}
#endif
return LAPACKE_cgebal_work( matrix_layout, job, n, a, lda, ilo, ihi, scale );
return API_SUFFIX(LAPACKE_cgebal_work)( matrix_layout, job, n, a, lda, ilo, ihi, scale );
}
+14 -14
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgebal_work( int matrix_layout, char job, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgebal_work)( int matrix_layout, char job, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_int* ilo, lapack_int* ihi, float* scale )
{
@@ -49,12 +49,12 @@ lapack_int LAPACKE_cgebal_work( int matrix_layout, char job, lapack_int n,
/* Check leading dimension(s) */
if( lda < n ) {
info = -5;
LAPACKE_xerbla( "LAPACKE_cgebal_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgebal_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
LAPACKE_lsame( job, 's' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( job, 'b' ) || API_SUFFIX(LAPACKE_lsame)( job, 'p' ) ||
API_SUFFIX(LAPACKE_lsame)( job, 's' ) ) {
a_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) *
lda_t * MAX(1,n) );
@@ -64,9 +64,9 @@ lapack_int LAPACKE_cgebal_work( int matrix_layout, char job, lapack_int n,
}
}
/* Transpose input matrices */
if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
LAPACKE_lsame( job, 's' ) ) {
LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
if( API_SUFFIX(LAPACKE_lsame)( job, 'b' ) || API_SUFFIX(LAPACKE_lsame)( job, 'p' ) ||
API_SUFFIX(LAPACKE_lsame)( job, 's' ) ) {
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, n, a, lda, a_t, lda_t );
}
/* Call LAPACK function and adjust info */
LAPACK_cgebal( &job, &n, a_t, &lda_t, ilo, ihi, scale, &info );
@@ -74,22 +74,22 @@ lapack_int LAPACKE_cgebal_work( int matrix_layout, char job, lapack_int n,
info = info - 1;
}
/* Transpose output matrices */
if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
LAPACKE_lsame( job, 's' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
if( API_SUFFIX(LAPACKE_lsame)( job, 'b' ) || API_SUFFIX(LAPACKE_lsame)( job, 'p' ) ||
API_SUFFIX(LAPACKE_lsame)( job, 's' ) ) {
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
}
/* Release memory and exit */
if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
LAPACKE_lsame( job, 's' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( job, 'b' ) || API_SUFFIX(LAPACKE_lsame)( job, 'p' ) ||
API_SUFFIX(LAPACKE_lsame)( job, 's' ) ) {
LAPACKE_free( a_t );
}
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgebal_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgebal_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgebal_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgebal_work", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgebrd( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgebrd)( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* a, lapack_int lda, float* d,
float* e, lapack_complex_float* tauq,
lapack_complex_float* taup )
@@ -42,19 +42,19 @@ lapack_int LAPACKE_cgebrd( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgebrd", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgebrd", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, a, lda ) ) {
return -4;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cgebrd_work( matrix_layout, m, n, a, lda, d, e, tauq, taup,
info = API_SUFFIX(LAPACKE_cgebrd_work)( matrix_layout, m, n, a, lda, d, e, tauq, taup,
&work_query, lwork );
if( info != 0 ) {
goto exit_level_0;
@@ -68,13 +68,13 @@ lapack_int LAPACKE_cgebrd( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cgebrd_work( matrix_layout, m, n, a, lda, d, e, tauq, taup,
info = API_SUFFIX(LAPACKE_cgebrd_work)( matrix_layout, m, n, a, lda, d, e, tauq, taup,
work, lwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgebrd", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgebrd", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgebrd_work( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgebrd_work)( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* a, lapack_int lda,
float* d, float* e, lapack_complex_float* tauq,
lapack_complex_float* taup,
@@ -51,7 +51,7 @@ lapack_int LAPACKE_cgebrd_work( int matrix_layout, lapack_int m, lapack_int n,
/* Check leading dimension(s) */
if( lda < n ) {
info = -5;
LAPACKE_xerbla( "LAPACKE_cgebrd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgebrd_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -68,7 +68,7 @@ lapack_int LAPACKE_cgebrd_work( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_cgebrd( &m, &n, a_t, &lda_t, d, e, tauq, taup, work, &lwork,
&info );
@@ -76,16 +76,16 @@ lapack_int LAPACKE_cgebrd_work( int matrix_layout, lapack_int m, lapack_int n,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
/* Release memory and exit */
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgebrd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgebrd_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgebrd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgebrd_work", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgecon( int matrix_layout, char norm, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgecon)( int matrix_layout, char norm, lapack_int n,
const lapack_complex_float* a, lapack_int lda,
float anorm, float* rcond )
{
@@ -40,16 +40,16 @@ lapack_int LAPACKE_cgecon( int matrix_layout, char norm, lapack_int n,
float* rwork = NULL;
lapack_complex_float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgecon", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgecon", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, n, a, lda ) ) {
return -4;
}
if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( 1, &anorm, 1 ) ) {
return -6;
}
}
@@ -67,7 +67,7 @@ lapack_int LAPACKE_cgecon( int matrix_layout, char norm, lapack_int n,
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgecon_work( matrix_layout, norm, n, a, lda, anorm, rcond,
info = API_SUFFIX(LAPACKE_cgecon_work)( matrix_layout, norm, n, a, lda, anorm, rcond,
work, rwork );
/* Release memory and exit */
LAPACKE_free( work );
@@ -75,7 +75,7 @@ exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgecon", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgecon", info );
}
return info;
}
+5 -5
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgecon_work( int matrix_layout, char norm, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgecon_work)( int matrix_layout, char norm, lapack_int n,
const lapack_complex_float* a, lapack_int lda,
float anorm, float* rcond,
lapack_complex_float* work, float* rwork )
@@ -50,7 +50,7 @@ lapack_int LAPACKE_cgecon_work( int matrix_layout, char norm, lapack_int n,
/* Check leading dimension(s) */
if( lda < n ) {
info = -5;
LAPACKE_xerbla( "LAPACKE_cgecon_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgecon_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -61,7 +61,7 @@ lapack_int LAPACKE_cgecon_work( int matrix_layout, char norm, lapack_int n,
goto exit_level_0;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_cgecon( &norm, &n, a_t, &lda_t, &anorm, rcond, work, rwork,
&info );
@@ -72,11 +72,11 @@ lapack_int LAPACKE_cgecon_work( int matrix_layout, char norm, lapack_int n,
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgecon_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgecon_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgecon_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgecon_work", info );
}
return info;
}
+15 -15
View File
@@ -32,16 +32,16 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgedmd( int matrix_layout, char jobs, char jobz, char jobr,
lapack_int API_SUFFIX(LAPACKE_cgedmd)( int matrix_layout, char jobs, char jobz, char jobr,
char jobf, lapack_int whtsvd, lapack_int m,
lapack_int n, lapack_complex_float* x,
lapack_int ldx, lapack_complex_float* y,
lapack_int ldy, lapack_int nrnk, float* tol,
lapack_int k, lapack_complex_float* eigs,
lapack_complex_float* z, lapack_int ldz,
float* res, lapack_complex_float* b,
lapack_int ldb, lapack_complex_float* w,
lapack_int ldw, lapack_complex_float* s, lapack_int lds)
lapack_complex_float* z, lapack_int ldz,
float* res, lapack_complex_float* b,
lapack_int ldb, lapack_complex_float* w,
lapack_int ldw, lapack_complex_float* s, lapack_int lds)
{
lapack_int info = 0;
lapack_int lwork = -1;
@@ -54,34 +54,34 @@ lapack_int LAPACKE_cgedmd( int matrix_layout, char jobs, char jobz, char jobr,
float work_query;
lapack_int iwork_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgedmd", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmd", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, x, ldx ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, x, ldx ) ) {
return -8;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, y, ldy ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, y, ldy ) ) {
return -10;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, z, ldz ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, z, ldz ) ) {
return -15;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, b, ldb ) ) {
return -18;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, w, ldw ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, w, ldw ) ) {
return -20;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, s, lds ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, s, lds ) ) {
return -22;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cgedmd_work( matrix_layout, jobs, jobz, jobr, jobf, whtsvd,
info = API_SUFFIX(LAPACKE_cgedmd_work)( matrix_layout, jobs, jobz, jobr, jobf, whtsvd,
m, n, x, ldx, y, ldy, nrnk, tol, k, eigs, z, ldz,
res, b, ldb, w, ldw, s, lds, &zwork_query,
lzwork, &work_query, lwork, &iwork_query, liwork );
@@ -109,7 +109,7 @@ lapack_int LAPACKE_cgedmd( int matrix_layout, char jobs, char jobz, char jobr,
goto exit_level_2;
}
/* Call middle-level interface */
info = LAPACKE_cgedmd_work( matrix_layout, jobs, jobz, jobr, jobf, whtsvd,
info = API_SUFFIX(LAPACKE_cgedmd_work)( matrix_layout, jobs, jobz, jobr, jobf, whtsvd,
m, n, x, ldx, y, ldy, nrnk, tol, k, eigs, z, ldz,
res, b, ldb, w, ldw, s, lds, zwork, lzwork,
work, lwork, iwork, liwork );
@@ -121,7 +121,7 @@ exit_level_1:
LAPACKE_free( zwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgedmd", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmd", info );
}
return info;
}
+21 -21
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgedmd_work( int matrix_layout, char jobs, char jobz,
lapack_int API_SUFFIX(LAPACKE_cgedmd_work)( int matrix_layout, char jobs, char jobz,
char jobr, char jobf, lapack_int whtsvd, lapack_int m,
lapack_int n, lapack_complex_float* x, lapack_int ldx,
lapack_complex_float* y, lapack_int ldy, lapack_int nrnk,
@@ -71,32 +71,32 @@ lapack_int LAPACKE_cgedmd_work( int matrix_layout, char jobs, char jobz,
/* Check leading dimension(s) */
if( ldx < n ) {
info = -9;
LAPACKE_xerbla( "LAPACKE_cgedmd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmd_work", info );
return info;
}
if( ldy < n ) {
info = -11;
LAPACKE_xerbla( "LAPACKE_cgedmd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmd_work", info );
return info;
}
if( ldz < n ) {
info = -16;
LAPACKE_xerbla( "LAPACKE_cgedmd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmd_work", info );
return info;
}
if( ldb < n ) {
info = -19;
LAPACKE_xerbla( "LAPACKE_cgedmd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmd_work", info );
return info;
}
if( ldw < n ) {
info = -21;
LAPACKE_xerbla( "LAPACKE_cgedmd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmd_work", info );
return info;
}
if( lds < n ) {
info = -23;
LAPACKE_xerbla( "LAPACKE_cgedmd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmd_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -139,12 +139,12 @@ lapack_int LAPACKE_cgedmd_work( int matrix_layout, char jobs, char jobz,
goto exit_level_5;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, x, ldx, x_t, ldx_t );
LAPACKE_cge_trans( matrix_layout, m, n, y, ldy, y_t, ldy_t );
LAPACKE_cge_trans( matrix_layout, m, n, z, ldz, z_t, ldz_t );
LAPACKE_cge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
LAPACKE_cge_trans( matrix_layout, m, n, w, ldw, w_t, ldw_t );
LAPACKE_cge_trans( matrix_layout, m, n, s, lds, s_t, lds_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, x, ldx, x_t, ldx_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, y, ldy, y_t, ldy_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, z, ldz, z_t, ldz_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, b, ldb, b_t, ldb_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, w, ldw, w_t, ldw_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, s, lds, s_t, lds_t );
/* Call LAPACK function and adjust info */
LAPACK_cgedmd( &jobs, &jobz, &jobr, &jobf, &whtsvd, &m, &n, x_t,
&ldx_t, y_t, &ldy_t, &nrnk, tol, &k, eigs, z_t, &ldz_t,
@@ -154,12 +154,12 @@ lapack_int LAPACKE_cgedmd_work( int matrix_layout, char jobs, char jobz,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, x_t, ldx_t, x, ldx );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, y_t, ldy_t, y, ldy );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, z_t, ldz_t, z, ldz );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, w_t, ldw_t, w, ldw );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, s_t, lds_t, s, lds );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, x_t, ldx_t, x, ldx );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, y_t, ldy_t, y, ldy );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, z_t, ldz_t, z, ldz );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, w_t, ldw_t, w, ldw );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, s_t, lds_t, s, lds );
/* Release memory and exit */
LAPACKE_free( s_t );
exit_level_5:
@@ -174,11 +174,11 @@ exit_level_1:
LAPACKE_free( x_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgedmd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmd_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgedmd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmd_work", info );
}
return info;
}
+12 -12
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgedmdq( int matrix_layout, char jobs, char jobz, char jobr,
lapack_int API_SUFFIX(LAPACKE_cgedmdq)( int matrix_layout, char jobs, char jobz, char jobr,
char jobq, char jobt, char jobf, lapack_int whtsvd,
lapack_int m, lapack_int n, lapack_complex_float* f,
lapack_int ldf, lapack_complex_float* x,
@@ -55,37 +55,37 @@ lapack_int LAPACKE_cgedmdq( int matrix_layout, char jobs, char jobz, char jobr,
float work_query;
lapack_int iwork_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgedmdq", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmdq", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, f, ldf ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, f, ldf ) ) {
return -11;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, x, ldx ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, x, ldx ) ) {
return -13;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, y, ldy ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, y, ldy ) ) {
return -15;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, z, ldz ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, z, ldz ) ) {
return -22;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, b, ldb ) ) {
return -25;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, v, ldv ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, v, ldv ) ) {
return -27;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, s, lds ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, s, lds ) ) {
return -29;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cgedmdq_work( matrix_layout, jobs, jobz, jobr, jobq, jobt,
info = API_SUFFIX(LAPACKE_cgedmdq_work)( matrix_layout, jobs, jobz, jobr, jobq, jobt,
jobf, whtsvd, m, n, f, ldf, x, ldx, y, ldy,
nrnk, tol, k, eigs, z, ldz, res,
b, ldb, v, ldv, s, lds, &zwork_query, lzwork,
@@ -114,7 +114,7 @@ lapack_int LAPACKE_cgedmdq( int matrix_layout, char jobs, char jobz, char jobr,
goto exit_level_2;
}
/* Call middle-level interface */
info = LAPACKE_cgedmdq_work( matrix_layout, jobs, jobz, jobr, jobq, jobt,
info = API_SUFFIX(LAPACKE_cgedmdq_work)( matrix_layout, jobs, jobz, jobr, jobq, jobt,
jobf, whtsvd, m, n, f, ldf, x, ldx, y, ldy,
nrnk, tol, k, eigs, z, ldz, res,
b, ldb, v, ldv, s, lds, zwork, lzwork,
@@ -127,7 +127,7 @@ exit_level_1:
LAPACKE_free( zwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgedmdq", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmdq", info );
}
return info;
}
+24 -24
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgedmdq_work( int matrix_layout, char jobs, char jobz,
lapack_int API_SUFFIX(LAPACKE_cgedmdq_work)( int matrix_layout, char jobs, char jobz,
char jobr, char jobq, char jobt, char jobf,
lapack_int whtsvd, lapack_int m, lapack_int n,
lapack_complex_float* f, lapack_int ldf,
@@ -78,37 +78,37 @@ lapack_int LAPACKE_cgedmdq_work( int matrix_layout, char jobs, char jobz,
/* Check leading dimension(s) */
if( ldf < n ) {
info = -12;
LAPACKE_xerbla( "LAPACKE_cgedmdq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmdq_work", info );
return info;
}
if( ldx < n ) {
info = -14;
LAPACKE_xerbla( "LAPACKE_cgedmdq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmdq_work", info );
return info;
}
if( ldy < n ) {
info = -16;
LAPACKE_xerbla( "LAPACKE_cgedmdq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmdq_work", info );
return info;
}
if( ldz < n ) {
info = -23;
LAPACKE_xerbla( "LAPACKE_cgedmdq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmdq_work", info );
return info;
}
if( ldb < n ) {
info = -26;
LAPACKE_xerbla( "LAPACKE_cgedmdq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmdq_work", info );
return info;
}
if( ldv < n ) {
info = -28;
LAPACKE_xerbla( "LAPACKE_cgedmdq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmdq_work", info );
return info;
}
if( lds < n ) {
info = -30;
LAPACKE_xerbla( "LAPACKE_cgedmdq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmdq_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -156,13 +156,13 @@ lapack_int LAPACKE_cgedmdq_work( int matrix_layout, char jobs, char jobz,
goto exit_level_6;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, f, ldf, f_t, ldf_t );
LAPACKE_cge_trans( matrix_layout, m, n, x, ldx, x_t, ldx_t );
LAPACKE_cge_trans( matrix_layout, m, n, y, ldy, y_t, ldy_t );
LAPACKE_cge_trans( matrix_layout, m, n, z, ldz, z_t, ldz_t );
LAPACKE_cge_trans( matrix_layout, m, n, b, ldb, b_t, ldb_t );
LAPACKE_cge_trans( matrix_layout, m, n, v, ldv, v_t, ldv_t );
LAPACKE_cge_trans( matrix_layout, m, n, s, lds, s_t, lds_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, f, ldf, f_t, ldf_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, x, ldx, x_t, ldx_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, y, ldy, y_t, ldy_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, z, ldz, z_t, ldz_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, b, ldb, b_t, ldb_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, v, ldv, v_t, ldv_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, s, lds, s_t, lds_t );
/* Call LAPACK function and adjust info */
LAPACK_cgedmdq( &jobs, &jobz, &jobr, &jobq, &jobt, &jobf, &whtsvd, &m,
&n, f, &ldf, x, &ldx, y, &ldy, &nrnk, tol, &k, eigs,
@@ -172,13 +172,13 @@ lapack_int LAPACKE_cgedmdq_work( int matrix_layout, char jobs, char jobz,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, f_t, ldf_t, f, ldf );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, x_t, ldx_t, x, ldx );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, y_t, ldy_t, y, ldy );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, z_t, ldz_t, z, ldz );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, v_t, ldv_t, v, ldv );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, s_t, lds_t, s, lds );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, f_t, ldf_t, f, ldf );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, x_t, ldx_t, x, ldx );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, y_t, ldy_t, y, ldy );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, z_t, ldz_t, z, ldz );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, b_t, ldb_t, b, ldb );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, v_t, ldv_t, v, ldv );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, s_t, lds_t, s, lds );
/* Release memory and exit */
LAPACKE_free( s_t );
exit_level_6:
@@ -195,11 +195,11 @@ exit_level_1:
LAPACKE_free( f_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgedmdq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmdq_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgedmdq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgedmdq_work", info );
}
return info;
}
+4 -4
View File
@@ -32,23 +32,23 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgeequ( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgeequ)( int matrix_layout, lapack_int m, lapack_int n,
const lapack_complex_float* a, lapack_int lda,
float* r, float* c, float* rowcnd, float* colcnd,
float* amax )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgeequ", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeequ", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, a, lda ) ) {
return -4;
}
}
#endif
return LAPACKE_cgeequ_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
return API_SUFFIX(LAPACKE_cgeequ_work)( matrix_layout, m, n, a, lda, r, c, rowcnd,
colcnd, amax );
}
+5 -5
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgeequ_work( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgeequ_work)( int matrix_layout, lapack_int m, lapack_int n,
const lapack_complex_float* a, lapack_int lda,
float* r, float* c, float* rowcnd,
float* colcnd, float* amax )
@@ -50,7 +50,7 @@ lapack_int LAPACKE_cgeequ_work( int matrix_layout, lapack_int m, lapack_int n,
/* Check leading dimension(s) */
if( lda < n ) {
info = -5;
LAPACKE_xerbla( "LAPACKE_cgeequ_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeequ_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -61,7 +61,7 @@ lapack_int LAPACKE_cgeequ_work( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_cgeequ( &m, &n, a_t, &lda_t, r, c, rowcnd, colcnd, amax, &info );
if( info < 0 ) {
@@ -71,11 +71,11 @@ lapack_int LAPACKE_cgeequ_work( int matrix_layout, lapack_int m, lapack_int n,
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgeequ_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeequ_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgeequ_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeequ_work", info );
}
return info;
}
+4 -4
View File
@@ -32,23 +32,23 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgeequb( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgeequb)( int matrix_layout, lapack_int m, lapack_int n,
const lapack_complex_float* a, lapack_int lda,
float* r, float* c, float* rowcnd, float* colcnd,
float* amax )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgeequb", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeequb", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, a, lda ) ) {
return -4;
}
}
#endif
return LAPACKE_cgeequb_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
return API_SUFFIX(LAPACKE_cgeequb_work)( matrix_layout, m, n, a, lda, r, c, rowcnd,
colcnd, amax );
}
+5 -5
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgeequb_work( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgeequb_work)( int matrix_layout, lapack_int m, lapack_int n,
const lapack_complex_float* a, lapack_int lda,
float* r, float* c, float* rowcnd,
float* colcnd, float* amax )
@@ -50,7 +50,7 @@ lapack_int LAPACKE_cgeequb_work( int matrix_layout, lapack_int m, lapack_int n,
/* Check leading dimension(s) */
if( lda < n ) {
info = -5;
LAPACKE_xerbla( "LAPACKE_cgeequb_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeequb_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -61,7 +61,7 @@ lapack_int LAPACKE_cgeequb_work( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_cgeequb( &m, &n, a_t, &lda_t, r, c, rowcnd, colcnd, amax,
&info );
@@ -72,11 +72,11 @@ lapack_int LAPACKE_cgeequb_work( int matrix_layout, lapack_int m, lapack_int n,
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgeequb_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeequb_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgeequb_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeequb_work", info );
}
return info;
}
+8 -8
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgees( int matrix_layout, char jobvs, char sort,
lapack_int API_SUFFIX(LAPACKE_cgees)( int matrix_layout, char jobvs, char sort,
LAPACK_C_SELECT1 select, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_int* sdim, lapack_complex_float* w,
@@ -45,19 +45,19 @@ lapack_int LAPACKE_cgees( int matrix_layout, char jobvs, char sort,
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgees", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgees", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, n, a, lda ) ) {
return -6;
}
}
#endif
/* Allocate memory for working array(s) */
if( LAPACKE_lsame( sort, 's' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( sort, 's' ) ) {
bwork = (lapack_logical*)
LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
if( bwork == NULL ) {
@@ -71,7 +71,7 @@ lapack_int LAPACKE_cgees( int matrix_layout, char jobvs, char sort,
goto exit_level_1;
}
/* Query optimal working array(s) size */
info = LAPACKE_cgees_work( matrix_layout, jobvs, sort, select, n, a, lda,
info = API_SUFFIX(LAPACKE_cgees_work)( matrix_layout, jobvs, sort, select, n, a, lda,
sdim, w, vs, ldvs, &work_query, lwork, rwork,
bwork );
if( info != 0 ) {
@@ -86,19 +86,19 @@ lapack_int LAPACKE_cgees( int matrix_layout, char jobvs, char sort,
goto exit_level_2;
}
/* Call middle-level interface */
info = LAPACKE_cgees_work( matrix_layout, jobvs, sort, select, n, a, lda,
info = API_SUFFIX(LAPACKE_cgees_work)( matrix_layout, jobvs, sort, select, n, a, lda,
sdim, w, vs, ldvs, work, lwork, rwork, bwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_2:
LAPACKE_free( rwork );
exit_level_1:
if( LAPACKE_lsame( sort, 's' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( sort, 's' ) ) {
LAPACKE_free( bwork );
}
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgees", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgees", info );
}
return info;
}
+11 -11
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgees_work( int matrix_layout, char jobvs, char sort,
lapack_int API_SUFFIX(LAPACKE_cgees_work)( int matrix_layout, char jobvs, char sort,
LAPACK_C_SELECT1 select, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_int* sdim, lapack_complex_float* w,
@@ -56,12 +56,12 @@ lapack_int LAPACKE_cgees_work( int matrix_layout, char jobvs, char sort,
/* Check leading dimension(s) */
if( lda < n ) {
info = -7;
LAPACKE_xerbla( "LAPACKE_cgees_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgees_work", info );
return info;
}
if( ldvs < n ) {
info = -11;
LAPACKE_xerbla( "LAPACKE_cgees_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgees_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -77,7 +77,7 @@ lapack_int LAPACKE_cgees_work( int matrix_layout, char jobvs, char sort,
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
if( LAPACKE_lsame( jobvs, 'v' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobvs, 'v' ) ) {
vs_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) *
ldvs_t * MAX(1,n) );
@@ -87,7 +87,7 @@ lapack_int LAPACKE_cgees_work( int matrix_layout, char jobvs, char sort,
}
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_cgees( &jobvs, &sort, select, &n, a_t, &lda_t, sdim, w, vs_t,
&ldvs_t, work, &lwork, rwork, bwork, &info );
@@ -95,23 +95,23 @@ lapack_int LAPACKE_cgees_work( int matrix_layout, char jobvs, char sort,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
if( LAPACKE_lsame( jobvs, 'v' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vs_t, ldvs_t, vs, ldvs );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
if( API_SUFFIX(LAPACKE_lsame)( jobvs, 'v' ) ) {
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, n, vs_t, ldvs_t, vs, ldvs );
}
/* Release memory and exit */
if( LAPACKE_lsame( jobvs, 'v' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobvs, 'v' ) ) {
LAPACKE_free( vs_t );
}
exit_level_1:
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgees_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgees_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgees_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgees_work", info );
}
return info;
}
+8 -8
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgeesx( int matrix_layout, char jobvs, char sort,
lapack_int API_SUFFIX(LAPACKE_cgeesx)( int matrix_layout, char jobvs, char sort,
LAPACK_C_SELECT1 select, char sense, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_int* sdim, lapack_complex_float* w,
@@ -46,19 +46,19 @@ lapack_int LAPACKE_cgeesx( int matrix_layout, char jobvs, char sort,
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgeesx", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeesx", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, n, a, lda ) ) {
return -7;
}
}
#endif
/* Allocate memory for working array(s) */
if( LAPACKE_lsame( sort, 's' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( sort, 's' ) ) {
bwork = (lapack_logical*)
LAPACKE_malloc( sizeof(lapack_logical) * MAX(1,n) );
if( bwork == NULL ) {
@@ -72,7 +72,7 @@ lapack_int LAPACKE_cgeesx( int matrix_layout, char jobvs, char sort,
goto exit_level_1;
}
/* Query optimal working array(s) size */
info = LAPACKE_cgeesx_work( matrix_layout, jobvs, sort, select, sense, n, a,
info = API_SUFFIX(LAPACKE_cgeesx_work)( matrix_layout, jobvs, sort, select, sense, n, a,
lda, sdim, w, vs, ldvs, rconde, rcondv,
&work_query, lwork, rwork, bwork );
if( info != 0 ) {
@@ -87,7 +87,7 @@ lapack_int LAPACKE_cgeesx( int matrix_layout, char jobvs, char sort,
goto exit_level_2;
}
/* Call middle-level interface */
info = LAPACKE_cgeesx_work( matrix_layout, jobvs, sort, select, sense, n, a,
info = API_SUFFIX(LAPACKE_cgeesx_work)( matrix_layout, jobvs, sort, select, sense, n, a,
lda, sdim, w, vs, ldvs, rconde, rcondv, work,
lwork, rwork, bwork );
/* Release memory and exit */
@@ -95,12 +95,12 @@ lapack_int LAPACKE_cgeesx( int matrix_layout, char jobvs, char sort,
exit_level_2:
LAPACKE_free( rwork );
exit_level_1:
if( LAPACKE_lsame( sort, 's' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( sort, 's' ) ) {
LAPACKE_free( bwork );
}
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgeesx", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeesx", info );
}
return info;
}
+11 -11
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgeesx_work( int matrix_layout, char jobvs, char sort,
lapack_int API_SUFFIX(LAPACKE_cgeesx_work)( int matrix_layout, char jobvs, char sort,
LAPACK_C_SELECT1 select, char sense,
lapack_int n, lapack_complex_float* a,
lapack_int lda, lapack_int* sdim,
@@ -59,12 +59,12 @@ lapack_int LAPACKE_cgeesx_work( int matrix_layout, char jobvs, char sort,
/* Check leading dimension(s) */
if( lda < n ) {
info = -8;
LAPACKE_xerbla( "LAPACKE_cgeesx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeesx_work", info );
return info;
}
if( ldvs < n ) {
info = -12;
LAPACKE_xerbla( "LAPACKE_cgeesx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeesx_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -81,7 +81,7 @@ lapack_int LAPACKE_cgeesx_work( int matrix_layout, char jobvs, char sort,
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
if( LAPACKE_lsame( jobvs, 'v' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobvs, 'v' ) ) {
vs_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) *
ldvs_t * MAX(1,n) );
@@ -91,7 +91,7 @@ lapack_int LAPACKE_cgeesx_work( int matrix_layout, char jobvs, char sort,
}
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_cgeesx( &jobvs, &sort, select, &sense, &n, a_t, &lda_t, sdim, w,
vs_t, &ldvs_t, rconde, rcondv, work, &lwork, rwork,
@@ -100,23 +100,23 @@ lapack_int LAPACKE_cgeesx_work( int matrix_layout, char jobvs, char sort,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
if( LAPACKE_lsame( jobvs, 'v' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vs_t, ldvs_t, vs, ldvs );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
if( API_SUFFIX(LAPACKE_lsame)( jobvs, 'v' ) ) {
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, n, vs_t, ldvs_t, vs, ldvs );
}
/* Release memory and exit */
if( LAPACKE_lsame( jobvs, 'v' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobvs, 'v' ) ) {
LAPACKE_free( vs_t );
}
exit_level_1:
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgeesx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeesx_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgeesx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeesx_work", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgeev( int matrix_layout, char jobvl, char jobvr,
lapack_int API_SUFFIX(LAPACKE_cgeev)( int matrix_layout, char jobvl, char jobvr,
lapack_int n, lapack_complex_float* a, lapack_int lda,
lapack_complex_float* w, lapack_complex_float* vl,
lapack_int ldvl, lapack_complex_float* vr,
@@ -44,13 +44,13 @@ lapack_int LAPACKE_cgeev( int matrix_layout, char jobvl, char jobvr,
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgeev", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeev", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, n, a, lda ) ) {
return -5;
}
}
@@ -62,7 +62,7 @@ lapack_int LAPACKE_cgeev( int matrix_layout, char jobvl, char jobvr,
goto exit_level_0;
}
/* Query optimal working array(s) size */
info = LAPACKE_cgeev_work( matrix_layout, jobvl, jobvr, n, a, lda, w, vl,
info = API_SUFFIX(LAPACKE_cgeev_work)( matrix_layout, jobvl, jobvr, n, a, lda, w, vl,
ldvl, vr, ldvr, &work_query, lwork, rwork );
if( info != 0 ) {
goto exit_level_1;
@@ -76,7 +76,7 @@ lapack_int LAPACKE_cgeev( int matrix_layout, char jobvl, char jobvr,
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgeev_work( matrix_layout, jobvl, jobvr, n, a, lda, w, vl,
info = API_SUFFIX(LAPACKE_cgeev_work)( matrix_layout, jobvl, jobvr, n, a, lda, w, vl,
ldvl, vr, ldvr, work, lwork, rwork );
/* Release memory and exit */
LAPACKE_free( work );
@@ -84,7 +84,7 @@ exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgeev", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeev", info );
}
return info;
}
+18 -18
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgeev_work( int matrix_layout, char jobvl, char jobvr,
lapack_int API_SUFFIX(LAPACKE_cgeev_work)( int matrix_layout, char jobvl, char jobvr,
lapack_int n, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* w,
lapack_complex_float* vl, lapack_int ldvl,
@@ -58,17 +58,17 @@ lapack_int LAPACKE_cgeev_work( int matrix_layout, char jobvl, char jobvr,
/* Check leading dimension(s) */
if( lda < n ) {
info = -6;
LAPACKE_xerbla( "LAPACKE_cgeev_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeev_work", info );
return info;
}
if( ldvl < 1 || ( LAPACKE_lsame( jobvl, 'v' ) && ldvl < n ) ) {
if( ldvl < 1 || ( API_SUFFIX(LAPACKE_lsame)( jobvl, 'v' ) && ldvl < n ) ) {
info = -9;
LAPACKE_xerbla( "LAPACKE_cgeev_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeev_work", info );
return info;
}
if( ldvr < 1 || ( LAPACKE_lsame( jobvr, 'v' ) && ldvr < n ) ) {
if( ldvr < 1 || ( API_SUFFIX(LAPACKE_lsame)( jobvr, 'v' ) && ldvr < n ) ) {
info = -11;
LAPACKE_xerbla( "LAPACKE_cgeev_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeev_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -84,7 +84,7 @@ lapack_int LAPACKE_cgeev_work( int matrix_layout, char jobvl, char jobvr,
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
if( LAPACKE_lsame( jobvl, 'v' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobvl, 'v' ) ) {
vl_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) *
ldvl_t * MAX(1,n) );
@@ -93,7 +93,7 @@ lapack_int LAPACKE_cgeev_work( int matrix_layout, char jobvl, char jobvr,
goto exit_level_1;
}
}
if( LAPACKE_lsame( jobvr, 'v' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobvr, 'v' ) ) {
vr_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) *
ldvr_t * MAX(1,n) );
@@ -103,7 +103,7 @@ lapack_int LAPACKE_cgeev_work( int matrix_layout, char jobvl, char jobvr,
}
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_cgeev( &jobvl, &jobvr, &n, a_t, &lda_t, w, vl_t, &ldvl_t, vr_t,
&ldvr_t, work, &lwork, rwork, &info );
@@ -111,30 +111,30 @@ lapack_int LAPACKE_cgeev_work( int matrix_layout, char jobvl, char jobvr,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
if( LAPACKE_lsame( jobvl, 'v' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
if( API_SUFFIX(LAPACKE_lsame)( jobvl, 'v' ) ) {
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
}
if( LAPACKE_lsame( jobvr, 'v' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
if( API_SUFFIX(LAPACKE_lsame)( jobvr, 'v' ) ) {
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
}
/* Release memory and exit */
if( LAPACKE_lsame( jobvr, 'v' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobvr, 'v' ) ) {
LAPACKE_free( vr_t );
}
exit_level_2:
if( LAPACKE_lsame( jobvl, 'v' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobvl, 'v' ) ) {
LAPACKE_free( vl_t );
}
exit_level_1:
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgeev_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeev_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgeev_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeev_work", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgeevx( int matrix_layout, char balanc, char jobvl,
lapack_int API_SUFFIX(LAPACKE_cgeevx)( int matrix_layout, char balanc, char jobvl,
char jobvr, char sense, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* w, lapack_complex_float* vl,
@@ -47,13 +47,13 @@ lapack_int LAPACKE_cgeevx( int matrix_layout, char balanc, char jobvl,
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgeevx", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeevx", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, n, a, lda ) ) {
return -7;
}
}
@@ -65,7 +65,7 @@ lapack_int LAPACKE_cgeevx( int matrix_layout, char balanc, char jobvl,
goto exit_level_0;
}
/* Query optimal working array(s) size */
info = LAPACKE_cgeevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
info = API_SUFFIX(LAPACKE_cgeevx_work)( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
lda, w, vl, ldvl, vr, ldvr, ilo, ihi, scale,
abnrm, rconde, rcondv, &work_query, lwork,
rwork );
@@ -81,7 +81,7 @@ lapack_int LAPACKE_cgeevx( int matrix_layout, char balanc, char jobvl,
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgeevx_work( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
info = API_SUFFIX(LAPACKE_cgeevx_work)( matrix_layout, balanc, jobvl, jobvr, sense, n, a,
lda, w, vl, ldvl, vr, ldvr, ilo, ihi, scale,
abnrm, rconde, rcondv, work, lwork, rwork );
/* Release memory and exit */
@@ -90,7 +90,7 @@ exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgeevx", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeevx", info );
}
return info;
}
+18 -18
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgeevx_work( int matrix_layout, char balanc, char jobvl,
lapack_int API_SUFFIX(LAPACKE_cgeevx_work)( int matrix_layout, char balanc, char jobvl,
char jobvr, char sense, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* w,
@@ -62,17 +62,17 @@ lapack_int LAPACKE_cgeevx_work( int matrix_layout, char balanc, char jobvl,
/* Check leading dimension(s) */
if( lda < n ) {
info = -8;
LAPACKE_xerbla( "LAPACKE_cgeevx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeevx_work", info );
return info;
}
if( ldvl < 1 || ( LAPACKE_lsame( jobvl, 'v' ) && ldvl < n ) ) {
if( ldvl < 1 || ( API_SUFFIX(LAPACKE_lsame)( jobvl, 'v' ) && ldvl < n ) ) {
info = -11;
LAPACKE_xerbla( "LAPACKE_cgeevx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeevx_work", info );
return info;
}
if( ldvr < 1 || ( LAPACKE_lsame( jobvr, 'v' ) && ldvr < n ) ) {
if( ldvr < 1 || ( API_SUFFIX(LAPACKE_lsame)( jobvr, 'v' ) && ldvr < n ) ) {
info = -13;
LAPACKE_xerbla( "LAPACKE_cgeevx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeevx_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -89,7 +89,7 @@ lapack_int LAPACKE_cgeevx_work( int matrix_layout, char balanc, char jobvl,
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
if( LAPACKE_lsame( jobvl, 'v' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobvl, 'v' ) ) {
vl_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) *
ldvl_t * MAX(1,n) );
@@ -98,7 +98,7 @@ lapack_int LAPACKE_cgeevx_work( int matrix_layout, char balanc, char jobvl,
goto exit_level_1;
}
}
if( LAPACKE_lsame( jobvr, 'v' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobvr, 'v' ) ) {
vr_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) *
ldvr_t * MAX(1,n) );
@@ -108,7 +108,7 @@ lapack_int LAPACKE_cgeevx_work( int matrix_layout, char balanc, char jobvl,
}
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_cgeevx( &balanc, &jobvl, &jobvr, &sense, &n, a_t, &lda_t, w,
vl_t, &ldvl_t, vr_t, &ldvr_t, ilo, ihi, scale, abnrm,
@@ -117,30 +117,30 @@ lapack_int LAPACKE_cgeevx_work( int matrix_layout, char balanc, char jobvl,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
if( LAPACKE_lsame( jobvl, 'v' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
if( API_SUFFIX(LAPACKE_lsame)( jobvl, 'v' ) ) {
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, n, vl_t, ldvl_t, vl, ldvl );
}
if( LAPACKE_lsame( jobvr, 'v' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
if( API_SUFFIX(LAPACKE_lsame)( jobvr, 'v' ) ) {
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, n, vr_t, ldvr_t, vr, ldvr );
}
/* Release memory and exit */
if( LAPACKE_lsame( jobvr, 'v' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobvr, 'v' ) ) {
LAPACKE_free( vr_t );
}
exit_level_2:
if( LAPACKE_lsame( jobvl, 'v' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobvl, 'v' ) ) {
LAPACKE_free( vl_t );
}
exit_level_1:
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgeevx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeevx_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgeevx_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeevx_work", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgehrd( int matrix_layout, lapack_int n, lapack_int ilo,
lapack_int API_SUFFIX(LAPACKE_cgehrd)( int matrix_layout, lapack_int n, lapack_int ilo,
lapack_int ihi, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* tau )
{
@@ -41,19 +41,19 @@ lapack_int LAPACKE_cgehrd( int matrix_layout, lapack_int n, lapack_int ilo,
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgehrd", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgehrd", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, n, a, lda ) ) {
return -5;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cgehrd_work( matrix_layout, n, ilo, ihi, a, lda, tau,
info = API_SUFFIX(LAPACKE_cgehrd_work)( matrix_layout, n, ilo, ihi, a, lda, tau,
&work_query, lwork );
if( info != 0 ) {
goto exit_level_0;
@@ -67,13 +67,13 @@ lapack_int LAPACKE_cgehrd( int matrix_layout, lapack_int n, lapack_int ilo,
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cgehrd_work( matrix_layout, n, ilo, ihi, a, lda, tau, work,
info = API_SUFFIX(LAPACKE_cgehrd_work)( matrix_layout, n, ilo, ihi, a, lda, tau, work,
lwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgehrd", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgehrd", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgehrd_work( int matrix_layout, lapack_int n, lapack_int ilo,
lapack_int API_SUFFIX(LAPACKE_cgehrd_work)( int matrix_layout, lapack_int n, lapack_int ilo,
lapack_int ihi, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* tau,
lapack_complex_float* work, lapack_int lwork )
@@ -50,7 +50,7 @@ lapack_int LAPACKE_cgehrd_work( int matrix_layout, lapack_int n, lapack_int ilo,
/* Check leading dimension(s) */
if( lda < n ) {
info = -6;
LAPACKE_xerbla( "LAPACKE_cgehrd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgehrd_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -67,23 +67,23 @@ lapack_int LAPACKE_cgehrd_work( int matrix_layout, lapack_int n, lapack_int ilo,
goto exit_level_0;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_cgehrd( &n, &ilo, &ihi, a_t, &lda_t, tau, work, &lwork, &info );
if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
/* Release memory and exit */
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgehrd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgehrd_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgehrd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgehrd_work", info );
}
return info;
}
+54 -54
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgejsv( int matrix_layout, char joba, char jobu, char jobv,
lapack_int API_SUFFIX(LAPACKE_cgejsv)( int matrix_layout, char joba, char jobu, char jobv,
char jobr, char jobt, char jobp, lapack_int m,
lapack_int n, lapack_complex_float* a, lapack_int lda, float* sva,
lapack_complex_float* u, lapack_int ldu, lapack_complex_float* v, lapack_int ldv,
@@ -41,96 +41,96 @@ lapack_int LAPACKE_cgejsv( int matrix_layout, char joba, char jobu, char jobv,
lapack_int info = 0;
lapack_int lwork = (
// 1.1
( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) &&
( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? 2*n+1 :
( API_SUFFIX(LAPACKE_lsame)( jobu, 'n' ) && API_SUFFIX(LAPACKE_lsame)( jobv, 'n' ) &&
( API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) )) ? 2*n+1 :
//1.2
( ( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) &&
!( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? n*n+3*n :
( ( API_SUFFIX(LAPACKE_lsame)( jobu, 'n' ) && API_SUFFIX(LAPACKE_lsame)( jobv, 'n' ) &&
!( API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) )) ? n*n+3*n :
//2.1
( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) &&
!( LAPACKE_lsame( jobu, 'u') || LAPACKE_lsame( jobu, 'f' ) )&&
( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 3*n :
( ( ( API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'j' ) ) &&
!( API_SUFFIX(LAPACKE_lsame)( jobu, 'u') || API_SUFFIX(LAPACKE_lsame)( jobu, 'f' ) )&&
( API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) ))? 3*n :
//2.2
( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) &&
!( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) &&
!( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 3*n :
( ( ( API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'j' ) ) &&
!( API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 'f' ) ) &&
!( API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) ))? 3*n :
//3.1
( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' )) &&
!( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' )) &&
( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 3*n :
( ( ( API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 'f' )) &&
!( API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'j' )) &&
( API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) ))? 3*n :
//3.2
( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' )) &&
!(LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' )) &&
!(LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 3*n :
( ( ( API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 'f' )) &&
!(API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'j' )) &&
!(API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) ))? 3*n :
//4.1
( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) &&
( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) &&
( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 5*n+2*n*n :
( ( ( API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 'f' ) ) &&
( API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'j' ) ) &&
( API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) ))? 5*n+2*n*n :
//4.2
( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) &&
( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) &&
( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 4*n*n:
( ( ( API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 'f' ) ) &&
( API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'j' ) ) &&
( API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) ))? 4*n*n:
1) ) ) ) ) ) ) );
lapack_int lrwork = (
// 1.1
( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) &&
( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? MAX(7,n+2*m) :
( API_SUFFIX(LAPACKE_lsame)( jobu, 'n' ) && API_SUFFIX(LAPACKE_lsame)( jobv, 'n' ) &&
( API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) )) ? MAX(7,n+2*m) :
//1.2
( ( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) &&
!( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? MAX(7,2*n) :
( ( API_SUFFIX(LAPACKE_lsame)( jobu, 'n' ) && API_SUFFIX(LAPACKE_lsame)( jobv, 'n' ) &&
!( API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) )) ? MAX(7,2*n) :
//2.1
( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) &&
!( LAPACKE_lsame( jobu, 'u') || LAPACKE_lsame( jobu, 'f' ) ) &&
( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX( 7, n+ 2*m ) :
( ( ( API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'j' ) ) &&
!( API_SUFFIX(LAPACKE_lsame)( jobu, 'u') || API_SUFFIX(LAPACKE_lsame)( jobu, 'f' ) ) &&
( API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) ))? MAX( 7, n+ 2*m ) :
//2.2
( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) &&
!( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) &&
!( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) :
( ( ( API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'j' ) ) &&
!( API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 'f' ) ) &&
!( API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) ))? MAX(7,2*n) :
//3.1
( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' )) &&
!( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' )) &&
( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX( 7, n+ 2*m ) :
( ( ( API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 'f' )) &&
!( API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'j' )) &&
( API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) ))? MAX( 7, n+ 2*m ) :
//3.2
( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' )) &&
!(LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' )) &&
!(LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) :
( ( ( API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 'f' )) &&
!(API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'j' )) &&
!(API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) ))? MAX(7,2*n) :
//4.1
( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) &&
( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) &&
( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX( 7, n+ 2*m ) :
( ( ( API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 'f' ) ) &&
( API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'j' ) ) &&
( API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) ))? MAX( 7, n+ 2*m ) :
//4.2
( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) &&
( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) &&
( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) :
( ( ( API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 'f' ) ) &&
( API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'j' ) ) &&
( API_SUFFIX(LAPACKE_lsame)( jobt, 't' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'f' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' ) ))? MAX(7,2*n) :
7) ) ) ) ) ) ) );
lapack_int* iwork = NULL;
float* rwork = NULL;
lapack_complex_float* cwork = NULL;
lapack_int i;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgejsv", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgejsv", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, a, lda ) ) {
return -10;
}
}
@@ -143,13 +143,13 @@ lapack_int LAPACKE_cgejsv( int matrix_layout, char joba, char jobu, char jobv,
}
lwork = MAX( lwork, 1 );
{ /* FIXUP LWORK */
int want_u = LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' );
int want_v = LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' );
int want_sce = LAPACKE_lsame( joba, 'e' ) || LAPACKE_lsame( joba, 'g' );
int want_u = API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 'f' );
int want_v = API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'j' );
int want_sce = API_SUFFIX(LAPACKE_lsame)( joba, 'e' ) || API_SUFFIX(LAPACKE_lsame)( joba, 'g' );
if( !want_u && !want_v && !want_sce ) lwork = MAX( lwork, 2*n+1 ); // 1.1
if( !want_u && !want_v && want_sce ) lwork = MAX( lwork, n*n+3*n ); // 1.2
if( want_u && LAPACKE_lsame( jobv, 'v' ) ) lwork = MAX( lwork, 5*n+2*n*n ); // 4.1
if( want_u && LAPACKE_lsame( jobv, 'j' ) ) lwork = MAX( lwork, 4*n+n*n ); // 4.2
if( want_u && API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) ) lwork = MAX( lwork, 5*n+2*n*n ); // 4.1
if( want_u && API_SUFFIX(LAPACKE_lsame)( jobv, 'j' ) ) lwork = MAX( lwork, 4*n+n*n ); // 4.2
}
cwork = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( cwork == NULL ) {
@@ -163,7 +163,7 @@ lapack_int LAPACKE_cgejsv( int matrix_layout, char joba, char jobu, char jobv,
goto exit_level_2;
}
/* Call middle-level interface */
info = LAPACKE_cgejsv_work( matrix_layout, joba, jobu, jobv, jobr, jobt,
info = API_SUFFIX(LAPACKE_cgejsv_work)( matrix_layout, joba, jobu, jobv, jobr, jobt,
jobp, m, n, a, lda, sva, u, ldu, v, ldv, cwork,
lwork, rwork, lrwork, iwork );
/* Backup significant data from working array(s) */
@@ -181,7 +181,7 @@ exit_level_1:
LAPACKE_free( iwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgejsv", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgejsv", info );
}
return info;
}
+25 -25
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu,
lapack_int API_SUFFIX(LAPACKE_cgejsv_work)( int matrix_layout, char joba, char jobu,
char jobv, char jobr, char jobt, char jobp,
lapack_int m, lapack_int n, lapack_complex_float* a,
lapack_int lda, float* sva, lapack_complex_float* u,
@@ -51,10 +51,10 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu,
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
lapack_int nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
lapack_int ncols_u = LAPACKE_lsame( jobu, 'n' ) ? 1 :
LAPACKE_lsame( jobu, 'f' ) ? m : n;
lapack_int nu = API_SUFFIX(LAPACKE_lsame)( jobu, 'n' ) ? 1 : m;
lapack_int nv = API_SUFFIX(LAPACKE_lsame)( jobv, 'n' ) ? 1 : n;
lapack_int ncols_u = API_SUFFIX(LAPACKE_lsame)( jobu, 'n' ) ? 1 :
API_SUFFIX(LAPACKE_lsame)( jobu, 'f' ) ? m : n;
lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nu);
lapack_int ldv_t = MAX(1,nv);
@@ -64,17 +64,17 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu,
/* Check leading dimension(s) */
if( lda < n ) {
info = -11;
LAPACKE_xerbla( "LAPACKE_cgejsv_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgejsv_work", info );
return info;
}
if( ldu < ncols_u ) {
info = -14;
LAPACKE_xerbla( "LAPACKE_cgejsv_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgejsv_work", info );
return info;
}
if( ldv < n ) {
info = -16;
LAPACKE_xerbla( "LAPACKE_cgejsv_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgejsv_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -84,8 +84,8 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu,
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobu, 'f' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) ||
API_SUFFIX(LAPACKE_lsame)( jobu, 'w' ) ) {
u_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * ldu_t * MAX(1,ncols_u) );
if( u_t == NULL ) {
@@ -93,8 +93,8 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu,
goto exit_level_1;
}
}
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobv, 'j' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) ||
API_SUFFIX(LAPACKE_lsame)( jobv, 'w' ) ) {
v_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * ldv_t * MAX(1,n) );
if( v_t == NULL ) {
@@ -103,7 +103,7 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu,
}
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_cgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a_t,
&lda_t, sva, u_t, &ldu_t, v_t, &ldv_t, cwork, &lwork,
@@ -112,33 +112,33 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu,
info = info - 1;
}
/* Transpose output matrices */
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, nu, ncols_u, u_t, ldu_t, u, ldu );
if( API_SUFFIX(LAPACKE_lsame)( jobu, 'f' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) ||
API_SUFFIX(LAPACKE_lsame)( jobu, 'w' ) ) {
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, nu, ncols_u, u_t, ldu_t, u, ldu );
}
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, nv, n, v_t, ldv_t, v, ldv );
if( API_SUFFIX(LAPACKE_lsame)( jobv, 'j' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) ||
API_SUFFIX(LAPACKE_lsame)( jobv, 'w' ) ) {
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, nv, n, v_t, ldv_t, v, ldv );
}
/* Release memory and exit */
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobv, 'j' ) || API_SUFFIX(LAPACKE_lsame)( jobv, 'v' ) ||
API_SUFFIX(LAPACKE_lsame)( jobv, 'w' ) ) {
LAPACKE_free( v_t );
}
exit_level_2:
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobu, 'f' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) ||
API_SUFFIX(LAPACKE_lsame)( jobu, 'w' ) ) {
LAPACKE_free( u_t );
}
exit_level_1:
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgejsv_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgejsv_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgejsv_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgejsv_work", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgelq( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgelq)( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* t, lapack_int tsize )
{
@@ -41,19 +41,19 @@ lapack_int LAPACKE_cgelq( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgelq", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelq", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, a, lda ) ) {
return -4;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cgelq_work( matrix_layout, m, n, a, lda, t, tsize, &work_query,
info = API_SUFFIX(LAPACKE_cgelq_work)( matrix_layout, m, n, a, lda, t, tsize, &work_query,
lwork );
if( info != 0 ) {
goto exit_level_0;
@@ -69,12 +69,12 @@ lapack_int LAPACKE_cgelq( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cgelq_work( matrix_layout, m, n, a, lda, t, tsize, work, lwork );
info = API_SUFFIX(LAPACKE_cgelq_work)( matrix_layout, m, n, a, lda, t, tsize, work, lwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgelq", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelq", info );
}
return info;
}
+5 -5
View File
@@ -32,20 +32,20 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgelq2( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgelq2)( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* tau )
{
lapack_int info = 0;
lapack_complex_float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgelq2", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelq2", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, a, lda ) ) {
return -4;
}
}
@@ -58,12 +58,12 @@ lapack_int LAPACKE_cgelq2( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cgelq2_work( matrix_layout, m, n, a, lda, tau, work );
info = API_SUFFIX(LAPACKE_cgelq2_work)( matrix_layout, m, n, a, lda, tau, work );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgelq2", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelq2", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgelq2_work( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgelq2_work)( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* tau,
lapack_complex_float* work )
@@ -50,7 +50,7 @@ lapack_int LAPACKE_cgelq2_work( int matrix_layout, lapack_int m, lapack_int n,
/* Check leading dimension(s) */
if( lda < n ) {
info = -5;
LAPACKE_xerbla( "LAPACKE_cgelq2_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelq2_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -61,23 +61,23 @@ lapack_int LAPACKE_cgelq2_work( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_cgelq2( &m, &n, a_t, &lda_t, tau, work, &info );
if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
/* Release memory and exit */
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgelq2_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelq2_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgelq2_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelq2_work", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgelq_work( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgelq_work)( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* t, lapack_int tsize,
lapack_complex_float* work, lapack_int lwork )
@@ -50,7 +50,7 @@ lapack_int LAPACKE_cgelq_work( int matrix_layout, lapack_int m, lapack_int n,
/* Check leading dimension(s) */
if( lda < n ) {
info = -5;
LAPACKE_xerbla( "LAPACKE_cgelq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelq_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -65,23 +65,23 @@ lapack_int LAPACKE_cgelq_work( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_cgelq( &m, &n, a_t, &lda_t, t, &tsize, work, &lwork, &info );
if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
/* Release memory and exit */
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgelq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelq_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgelq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelq_work", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgelqf( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgelqf)( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* tau )
{
@@ -41,19 +41,19 @@ lapack_int LAPACKE_cgelqf( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgelqf", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelqf", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, a, lda ) ) {
return -4;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cgelqf_work( matrix_layout, m, n, a, lda, tau, &work_query,
info = API_SUFFIX(LAPACKE_cgelqf_work)( matrix_layout, m, n, a, lda, tau, &work_query,
lwork );
if( info != 0 ) {
goto exit_level_0;
@@ -67,12 +67,12 @@ lapack_int LAPACKE_cgelqf( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cgelqf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
info = API_SUFFIX(LAPACKE_cgelqf_work)( matrix_layout, m, n, a, lda, tau, work, lwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgelqf", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelqf", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgelqf_work( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgelqf_work)( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* tau,
lapack_complex_float* work, lapack_int lwork )
@@ -50,7 +50,7 @@ lapack_int LAPACKE_cgelqf_work( int matrix_layout, lapack_int m, lapack_int n,
/* Check leading dimension(s) */
if( lda < n ) {
info = -5;
LAPACKE_xerbla( "LAPACKE_cgelqf_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelqf_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -66,23 +66,23 @@ lapack_int LAPACKE_cgelqf_work( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_cgelqf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
/* Release memory and exit */
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgelqf_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelqf_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgelqf_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelqf_work", info );
}
return info;
}
+7 -7
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgels( int matrix_layout, char trans, lapack_int m,
lapack_int API_SUFFIX(LAPACKE_cgels)( int matrix_layout, char trans, lapack_int m,
lapack_int n, lapack_int nrhs,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* b, lapack_int ldb )
@@ -42,22 +42,22 @@ lapack_int LAPACKE_cgels( int matrix_layout, char trans, lapack_int m,
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgels", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgels", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, a, lda ) ) {
return -6;
}
if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
return -8;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cgels_work( matrix_layout, trans, m, n, nrhs, a, lda, b, ldb,
info = API_SUFFIX(LAPACKE_cgels_work)( matrix_layout, trans, m, n, nrhs, a, lda, b, ldb,
&work_query, lwork );
if( info != 0 ) {
goto exit_level_0;
@@ -71,13 +71,13 @@ lapack_int LAPACKE_cgels( int matrix_layout, char trans, lapack_int m,
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cgels_work( matrix_layout, trans, m, n, nrhs, a, lda, b, ldb,
info = API_SUFFIX(LAPACKE_cgels_work)( matrix_layout, trans, m, n, nrhs, a, lda, b, ldb,
work, lwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgels", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgels", info );
}
return info;
}
+9 -9
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgels_work( int matrix_layout, char trans, lapack_int m,
lapack_int API_SUFFIX(LAPACKE_cgels_work)( int matrix_layout, char trans, lapack_int m,
lapack_int n, lapack_int nrhs,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* b, lapack_int ldb,
@@ -54,12 +54,12 @@ lapack_int LAPACKE_cgels_work( int matrix_layout, char trans, lapack_int m,
/* Check leading dimension(s) */
if( lda < n ) {
info = -7;
LAPACKE_xerbla( "LAPACKE_cgels_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgels_work", info );
return info;
}
if( ldb < nrhs ) {
info = -9;
LAPACKE_xerbla( "LAPACKE_cgels_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgels_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -83,8 +83,8 @@ lapack_int LAPACKE_cgels_work( int matrix_layout, char trans, lapack_int m,
goto exit_level_1;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
LAPACKE_cge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
/* Call LAPACK function and adjust info */
LAPACK_cgels( &trans, &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, work,
&lwork, &info );
@@ -92,8 +92,8 @@ lapack_int LAPACKE_cgels_work( int matrix_layout, char trans, lapack_int m,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
ldb );
/* Release memory and exit */
LAPACKE_free( b_t );
@@ -101,11 +101,11 @@ exit_level_1:
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgels_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgels_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgels_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgels_work", info );
}
return info;
}
+8 -8
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgelsd( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgelsd)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int nrhs, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* b,
lapack_int ldb, float* s, float rcond,
@@ -50,25 +50,25 @@ lapack_int LAPACKE_cgelsd( int matrix_layout, lapack_int m, lapack_int n,
float rwork_query;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgelsd", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelsd", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, a, lda ) ) {
return -5;
}
if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
return -7;
}
if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( 1, &rcond, 1 ) ) {
return -10;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cgelsd_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
info = API_SUFFIX(LAPACKE_cgelsd_work)( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
rcond, rank, &work_query, lwork, &rwork_query,
&iwork_query );
if( info != 0 ) {
@@ -95,7 +95,7 @@ lapack_int LAPACKE_cgelsd( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_2;
}
/* Call middle-level interface */
info = LAPACKE_cgelsd_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
info = API_SUFFIX(LAPACKE_cgelsd_work)( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
rcond, rank, work, lwork, rwork, iwork );
/* Release memory and exit */
LAPACKE_free( work );
@@ -105,7 +105,7 @@ exit_level_1:
LAPACKE_free( iwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgelsd", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelsd", info );
}
return info;
}
+9 -9
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgelsd_work( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgelsd_work)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int nrhs, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* b,
lapack_int ldb, float* s, float rcond,
@@ -56,12 +56,12 @@ lapack_int LAPACKE_cgelsd_work( int matrix_layout, lapack_int m, lapack_int n,
/* Check leading dimension(s) */
if( lda < n ) {
info = -6;
LAPACKE_xerbla( "LAPACKE_cgelsd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelsd_work", info );
return info;
}
if( ldb < nrhs ) {
info = -8;
LAPACKE_xerbla( "LAPACKE_cgelsd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelsd_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -85,8 +85,8 @@ lapack_int LAPACKE_cgelsd_work( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_1;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
LAPACKE_cge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
/* Call LAPACK function and adjust info */
LAPACK_cgelsd( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, s, &rcond, rank,
work, &lwork, rwork, iwork, &info );
@@ -94,8 +94,8 @@ lapack_int LAPACKE_cgelsd_work( int matrix_layout, lapack_int m, lapack_int n,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
ldb );
/* Release memory and exit */
LAPACKE_free( b_t );
@@ -103,11 +103,11 @@ exit_level_1:
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgelsd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelsd_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgelsd_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelsd_work", info );
}
return info;
}
+8 -8
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgelss( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgelss)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int nrhs, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* b,
lapack_int ldb, float* s, float rcond,
@@ -44,19 +44,19 @@ lapack_int LAPACKE_cgelss( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgelss", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelss", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, a, lda ) ) {
return -5;
}
if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
return -7;
}
if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( 1, &rcond, 1 ) ) {
return -10;
}
}
@@ -68,7 +68,7 @@ lapack_int LAPACKE_cgelss( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Query optimal working array(s) size */
info = LAPACKE_cgelss_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
info = API_SUFFIX(LAPACKE_cgelss_work)( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
rcond, rank, &work_query, lwork, rwork );
if( info != 0 ) {
goto exit_level_1;
@@ -82,7 +82,7 @@ lapack_int LAPACKE_cgelss( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgelss_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
info = API_SUFFIX(LAPACKE_cgelss_work)( matrix_layout, m, n, nrhs, a, lda, b, ldb, s,
rcond, rank, work, lwork, rwork );
/* Release memory and exit */
LAPACKE_free( work );
@@ -90,7 +90,7 @@ exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgelss", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelss", info );
}
return info;
}
+9 -9
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgelss_work( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgelss_work)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int nrhs, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* b,
lapack_int ldb, float* s, float rcond,
@@ -55,12 +55,12 @@ lapack_int LAPACKE_cgelss_work( int matrix_layout, lapack_int m, lapack_int n,
/* Check leading dimension(s) */
if( lda < n ) {
info = -6;
LAPACKE_xerbla( "LAPACKE_cgelss_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelss_work", info );
return info;
}
if( ldb < nrhs ) {
info = -8;
LAPACKE_xerbla( "LAPACKE_cgelss_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelss_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -84,8 +84,8 @@ lapack_int LAPACKE_cgelss_work( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_1;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
LAPACKE_cge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
/* Call LAPACK function and adjust info */
LAPACK_cgelss( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, s, &rcond, rank,
work, &lwork, rwork, &info );
@@ -93,8 +93,8 @@ lapack_int LAPACKE_cgelss_work( int matrix_layout, lapack_int m, lapack_int n,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
ldb );
/* Release memory and exit */
LAPACKE_free( b_t );
@@ -102,11 +102,11 @@ exit_level_1:
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgelss_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelss_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgelss_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelss_work", info );
}
return info;
}
+8 -8
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgelsy( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgelsy)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int nrhs, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* b,
lapack_int ldb, lapack_int* jpvt, float rcond,
@@ -44,19 +44,19 @@ lapack_int LAPACKE_cgelsy( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgelsy", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelsy", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, a, lda ) ) {
return -5;
}
if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
return -7;
}
if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
if( API_SUFFIX(LAPACKE_s_nancheck)( 1, &rcond, 1 ) ) {
return -10;
}
}
@@ -68,7 +68,7 @@ lapack_int LAPACKE_cgelsy( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Query optimal working array(s) size */
info = LAPACKE_cgelsy_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, jpvt,
info = API_SUFFIX(LAPACKE_cgelsy_work)( matrix_layout, m, n, nrhs, a, lda, b, ldb, jpvt,
rcond, rank, &work_query, lwork, rwork );
if( info != 0 ) {
goto exit_level_1;
@@ -82,7 +82,7 @@ lapack_int LAPACKE_cgelsy( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgelsy_work( matrix_layout, m, n, nrhs, a, lda, b, ldb, jpvt,
info = API_SUFFIX(LAPACKE_cgelsy_work)( matrix_layout, m, n, nrhs, a, lda, b, ldb, jpvt,
rcond, rank, work, lwork, rwork );
/* Release memory and exit */
LAPACKE_free( work );
@@ -90,7 +90,7 @@ exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgelsy", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelsy", info );
}
return info;
}
+9 -9
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgelsy_work( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgelsy_work)( int matrix_layout, lapack_int m, lapack_int n,
lapack_int nrhs, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* b,
lapack_int ldb, lapack_int* jpvt, float rcond,
@@ -55,12 +55,12 @@ lapack_int LAPACKE_cgelsy_work( int matrix_layout, lapack_int m, lapack_int n,
/* Check leading dimension(s) */
if( lda < n ) {
info = -6;
LAPACKE_xerbla( "LAPACKE_cgelsy_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelsy_work", info );
return info;
}
if( ldb < nrhs ) {
info = -8;
LAPACKE_xerbla( "LAPACKE_cgelsy_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelsy_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -84,8 +84,8 @@ lapack_int LAPACKE_cgelsy_work( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_1;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
LAPACKE_cge_trans( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, MAX(m,n), nrhs, b, ldb, b_t, ldb_t );
/* Call LAPACK function and adjust info */
LAPACK_cgelsy( &m, &n, &nrhs, a_t, &lda_t, b_t, &ldb_t, jpvt, &rcond,
rank, work, &lwork, rwork, &info );
@@ -93,8 +93,8 @@ lapack_int LAPACKE_cgelsy_work( int matrix_layout, lapack_int m, lapack_int n,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
LAPACKE_cge_trans( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, MAX(m,n), nrhs, b_t, ldb_t, b,
ldb );
/* Release memory and exit */
LAPACKE_free( b_t );
@@ -102,11 +102,11 @@ exit_level_1:
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgelsy_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelsy_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgelsy_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgelsy_work", info );
}
return info;
}
+8 -8
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgemlq( int matrix_layout, char side, char trans,
lapack_int API_SUFFIX(LAPACKE_cgemlq)( int matrix_layout, char side, char trans,
lapack_int m, lapack_int n, lapack_int k,
const lapack_complex_float* a, lapack_int lda,
const lapack_complex_float* t, lapack_int tsize,
@@ -43,25 +43,25 @@ lapack_int LAPACKE_cgemlq( int matrix_layout, char side, char trans,
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgemlq", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemlq", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, k, m, a, lda ) ) {
return -7;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, c, ldc ) ) {
return -10;
}
if( LAPACKE_c_nancheck( tsize, t, 1 ) ) {
if( API_SUFFIX(LAPACKE_c_nancheck)( tsize, t, 1 ) ) {
return -9;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cgemlq_work( matrix_layout, side, trans, m, n, k, a, lda,
info = API_SUFFIX(LAPACKE_cgemlq_work)( matrix_layout, side, trans, m, n, k, a, lda,
t, tsize, c, ldc, &work_query, lwork );
if( info != 0 ) {
goto exit_level_0;
@@ -74,13 +74,13 @@ lapack_int LAPACKE_cgemlq( int matrix_layout, char side, char trans,
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cgemlq_work( matrix_layout, side, trans, m, n, k, a, lda,
info = API_SUFFIX(LAPACKE_cgemlq_work)( matrix_layout, side, trans, m, n, k, a, lda,
t, tsize, c, ldc, work, lwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgemlq", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemlq", info );
}
return info;
}
+10 -10
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgemlq_work( int matrix_layout, char side, char trans,
lapack_int API_SUFFIX(LAPACKE_cgemlq_work)( int matrix_layout, char side, char trans,
lapack_int m, lapack_int n, lapack_int k,
const lapack_complex_float* a, lapack_int lda,
const lapack_complex_float* t, lapack_int tsize,
@@ -51,18 +51,18 @@ lapack_int LAPACKE_cgemlq_work( int matrix_layout, char side, char trans,
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
r = LAPACKE_lsame( side, 'l' ) ? m : n;
r = API_SUFFIX(LAPACKE_lsame)( side, 'l' ) ? m : n;
lda_t = MAX(1,k);
ldc_t = MAX(1,m);
/* Check leading dimension(s) */
if( lda < r ) {
info = -8;
LAPACKE_xerbla( "LAPACKE_cgemlq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemlq_work", info );
return info;
}
if( ldc < n ) {
info = -11;
LAPACKE_xerbla( "LAPACKE_cgemlq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemlq_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -72,7 +72,7 @@ lapack_int LAPACKE_cgemlq_work( int matrix_layout, char side, char trans,
return (info < 0) ? (info - 1) : info;
}
/* Allocate memory for temporary array(s) */
if( LAPACKE_lsame( side, 'l' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( side, 'l' ) ) {
a_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) );
} else {
a_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
@@ -87,8 +87,8 @@ lapack_int LAPACKE_cgemlq_work( int matrix_layout, char side, char trans,
goto exit_level_1;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, k, m, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, c, ldc, c_t, ldc_t );
/* Call LAPACK function and adjust info */
LAPACK_cgemlq( &side, &trans, &m, &n, &k, a_t, &lda_t, t, &tsize,
c_t, &ldc_t, work, &lwork, &info );
@@ -96,18 +96,18 @@ lapack_int LAPACKE_cgemlq_work( int matrix_layout, char side, char trans,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
/* Release memory and exit */
LAPACKE_free( c_t );
exit_level_1:
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgemlq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemlq_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgemlq_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemlq_work", info );
}
return info;
}
+9 -9
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgemqr( int matrix_layout, char side, char trans,
lapack_int API_SUFFIX(LAPACKE_cgemqr)( int matrix_layout, char side, char trans,
lapack_int m, lapack_int n, lapack_int k,
const lapack_complex_float* a, lapack_int lda,
const lapack_complex_float* t, lapack_int tsize,
@@ -44,26 +44,26 @@ lapack_int LAPACKE_cgemqr( int matrix_layout, char side, char trans,
lapack_complex_float work_query;
lapack_int r;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgemqr", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemqr", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
r = LAPACKE_lsame( side, 'l' ) ? m : n;
if( LAPACKE_cge_nancheck( matrix_layout, r, k, a, lda ) ) {
r = API_SUFFIX(LAPACKE_lsame)( side, 'l' ) ? m : n;
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, r, k, a, lda ) ) {
return -7;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, c, ldc ) ) {
return -10;
}
if( LAPACKE_c_nancheck( tsize, t, 1 ) ) {
if( API_SUFFIX(LAPACKE_c_nancheck)( tsize, t, 1 ) ) {
return -9;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cgemqr_work( matrix_layout, side, trans, m, n, k, a, lda,
info = API_SUFFIX(LAPACKE_cgemqr_work)( matrix_layout, side, trans, m, n, k, a, lda,
t, tsize, c, ldc, &work_query, lwork );
if( info != 0 ) {
goto exit_level_0;
@@ -77,13 +77,13 @@ lapack_int LAPACKE_cgemqr( int matrix_layout, char side, char trans,
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cgemqr_work( matrix_layout, side, trans, m, n, k, a, lda,
info = API_SUFFIX(LAPACKE_cgemqr_work)( matrix_layout, side, trans, m, n, k, a, lda,
t, tsize, c, ldc, work, lwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgemqr", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemqr", info );
}
return info;
}
+9 -9
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgemqr_work( int matrix_layout, char side, char trans,
lapack_int API_SUFFIX(LAPACKE_cgemqr_work)( int matrix_layout, char side, char trans,
lapack_int m, lapack_int n, lapack_int k,
const lapack_complex_float* a, lapack_int lda,
const lapack_complex_float* t, lapack_int tsize,
@@ -51,18 +51,18 @@ lapack_int LAPACKE_cgemqr_work( int matrix_layout, char side, char trans,
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
r = LAPACKE_lsame( side, 'l' ) ? m : n;
r = API_SUFFIX(LAPACKE_lsame)( side, 'l' ) ? m : n;
lda_t = MAX(1,r);
ldc_t = MAX(1,m);
/* Check leading dimension(s) */
if( lda < k ) {
info = -8;
LAPACKE_xerbla( "LAPACKE_cgemqr_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemqr_work", info );
return info;
}
if( ldc < n ) {
info = -11;
LAPACKE_xerbla( "LAPACKE_cgemqr_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemqr_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -85,8 +85,8 @@ lapack_int LAPACKE_cgemqr_work( int matrix_layout, char side, char trans,
goto exit_level_1;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, r, k, a, lda, a_t, lda_t );
LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, r, k, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, c, ldc, c_t, ldc_t );
/* Call LAPACK function and adjust info */
LAPACK_cgemqr( &side, &trans, &m, &n, &k, a_t, &lda_t, t, &tsize,
c_t, &ldc_t, work, &lwork, &info );
@@ -94,18 +94,18 @@ lapack_int LAPACKE_cgemqr_work( int matrix_layout, char side, char trans,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
/* Release memory and exit */
LAPACKE_free( c_t );
exit_level_1:
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgemqr_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemqr_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgemqr_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemqr_work", info );
}
return info;
}
+9 -9
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgemqrt( int matrix_layout, char side, char trans,
lapack_int API_SUFFIX(LAPACKE_cgemqrt)( int matrix_layout, char side, char trans,
lapack_int m, lapack_int n, lapack_int k,
lapack_int nb, const lapack_complex_float* v,
lapack_int ldv, const lapack_complex_float* t,
@@ -43,21 +43,21 @@ lapack_int LAPACKE_cgemqrt( int matrix_layout, char side, char trans,
lapack_int info = 0;
lapack_complex_float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgemqrt", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemqrt", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
( LAPACKE_lsame( side, 'R' ) ? n : 0 );
if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
nrows_v = API_SUFFIX(LAPACKE_lsame)( side, 'L' ) ? m :
( API_SUFFIX(LAPACKE_lsame)( side, 'R' ) ? n : 0 );
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, c, ldc ) ) {
return -12;
}
if( LAPACKE_cge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, nb, k, t, ldt ) ) {
return -10;
}
if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, nrows_v, k, v, ldv ) ) {
return -8;
}
}
@@ -70,13 +70,13 @@ lapack_int LAPACKE_cgemqrt( int matrix_layout, char side, char trans,
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cgemqrt_work( matrix_layout, side, trans, m, n, k, nb, v, ldv,
info = API_SUFFIX(LAPACKE_cgemqrt_work)( matrix_layout, side, trans, m, n, k, nb, v, ldv,
t, ldt, c, ldc, work );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgemqrt", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemqrt", info );
}
return info;
}
+10 -10
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgemqrt_work( int matrix_layout, char side, char trans,
lapack_int API_SUFFIX(LAPACKE_cgemqrt_work)( int matrix_layout, char side, char trans,
lapack_int m, lapack_int n, lapack_int k,
lapack_int nb, const lapack_complex_float* v,
lapack_int ldv, const lapack_complex_float* t,
@@ -57,17 +57,17 @@ lapack_int LAPACKE_cgemqrt_work( int matrix_layout, char side, char trans,
/* Check leading dimension(s) */
if( ldc < n ) {
info = -13;
LAPACKE_xerbla( "LAPACKE_cgemqrt_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemqrt_work", info );
return info;
}
if( ldt < nb ) {
info = -11;
LAPACKE_xerbla( "LAPACKE_cgemqrt_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemqrt_work", info );
return info;
}
if( ldv < k ) {
info = -9;
LAPACKE_xerbla( "LAPACKE_cgemqrt_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemqrt_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
@@ -90,9 +90,9 @@ lapack_int LAPACKE_cgemqrt_work( int matrix_layout, char side, char trans,
goto exit_level_2;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, ldv, k, v, ldv, v_t, ldv_t );
LAPACKE_cge_trans( matrix_layout, ldt, nb, t, ldt, t_t, ldt_t );
LAPACKE_cge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, ldv, k, v, ldv, v_t, ldv_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, ldt, nb, t, ldt, t_t, ldt_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, c, ldc, c_t, ldc_t );
/* Call LAPACK function and adjust info */
LAPACK_cgemqrt( &side, &trans, &m, &n, &k, &nb, v_t, &ldv_t, t_t,
&ldt_t, c_t, &ldc_t, work, &info );
@@ -100,7 +100,7 @@ lapack_int LAPACKE_cgemqrt_work( int matrix_layout, char side, char trans,
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc );
/* Release memory and exit */
LAPACKE_free( c_t );
exit_level_2:
@@ -109,11 +109,11 @@ exit_level_1:
LAPACKE_free( v_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgemqrt_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemqrt_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgemqrt_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgemqrt_work", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgeqlf( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgeqlf)( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* tau )
{
@@ -41,19 +41,19 @@ lapack_int LAPACKE_cgeqlf( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgeqlf", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeqlf", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, a, lda ) ) {
return -4;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cgeqlf_work( matrix_layout, m, n, a, lda, tau, &work_query,
info = API_SUFFIX(LAPACKE_cgeqlf_work)( matrix_layout, m, n, a, lda, tau, &work_query,
lwork );
if( info != 0 ) {
goto exit_level_0;
@@ -67,12 +67,12 @@ lapack_int LAPACKE_cgeqlf( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cgeqlf_work( matrix_layout, m, n, a, lda, tau, work, lwork );
info = API_SUFFIX(LAPACKE_cgeqlf_work)( matrix_layout, m, n, a, lda, tau, work, lwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgeqlf", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeqlf", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgeqlf_work( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgeqlf_work)( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* tau,
lapack_complex_float* work, lapack_int lwork )
@@ -50,7 +50,7 @@ lapack_int LAPACKE_cgeqlf_work( int matrix_layout, lapack_int m, lapack_int n,
/* Check leading dimension(s) */
if( lda < n ) {
info = -5;
LAPACKE_xerbla( "LAPACKE_cgeqlf_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeqlf_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
@@ -66,23 +66,23 @@ lapack_int LAPACKE_cgeqlf_work( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_cgeqlf( &m, &n, a_t, &lda_t, tau, work, &lwork, &info );
if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
/* Release memory and exit */
LAPACKE_free( a_t );
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgeqlf_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeqlf_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_cgeqlf_work", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeqlf_work", info );
}
return info;
}
+6 -6
View File
@@ -32,7 +32,7 @@
#include "lapacke_utils.h"
lapack_int LAPACKE_cgeqp3( int matrix_layout, lapack_int m, lapack_int n,
lapack_int API_SUFFIX(LAPACKE_cgeqp3)( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_int* jpvt, lapack_complex_float* tau )
{
@@ -42,13 +42,13 @@ lapack_int LAPACKE_cgeqp3( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgeqp3", -1 );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeqp3", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, a, lda ) ) {
return -4;
}
}
@@ -60,7 +60,7 @@ lapack_int LAPACKE_cgeqp3( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_0;
}
/* Query optimal working array(s) size */
info = LAPACKE_cgeqp3_work( matrix_layout, m, n, a, lda, jpvt, tau,
info = API_SUFFIX(LAPACKE_cgeqp3_work)( matrix_layout, m, n, a, lda, jpvt, tau,
&work_query, lwork, rwork );
if( info != 0 ) {
goto exit_level_1;
@@ -74,7 +74,7 @@ lapack_int LAPACKE_cgeqp3( int matrix_layout, lapack_int m, lapack_int n,
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgeqp3_work( matrix_layout, m, n, a, lda, jpvt, tau, work,
info = API_SUFFIX(LAPACKE_cgeqp3_work)( matrix_layout, m, n, a, lda, jpvt, tau, work,
lwork, rwork );
/* Release memory and exit */
LAPACKE_free( work );
@@ -82,7 +82,7 @@ exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgeqp3", info );
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgeqp3", info );
}
return info;
}

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