Also modify the way the CBLAS mangling was generated...now CBLAS follows LAPACKE model
Details on MAKEFILE build
To compile CBLAS library from the LAPACK folder:
- make cblaslib --> create the cblas lib
- make cblas_testing --> compile BLAS Ref if necessary, build exe, then run exe
Details on CMAKE build
Now you have an option to select CBLAS
If CBLAS is check the Library is built and if BUILD_TESTING is enable, test and example are built and run
following
--> modification of all make.inc
--> more clean up
--> debugging on other platforms
** PLEASE TRY and SEND FEEDBACK - Thanks - Julie **
CACHE STRING "Linker flags for shared libs" FORCE)
endif( NOT BLAS_FOUND )
+
+# --------------------------------------------------
+# CBLAS
+option(CBLAS "Build CBLAS" OFF)
+
+if(CBLAS)
+ add_subdirectory(cblas)
+endif(CBLAS)
+
+# --------------------------------------------------
+# XBLAS
+
option(USE_XBLAS "Build extended precision (needs XBLAS)" OFF)
if (USE_XBLAS)
find_library(XBLAS_LIBRARY NAMES xblas)
option(USE_OPTIMIZED_LAPACK "Whether or not to use an optimized LAPACK library instead of included netlib LAPACK" OFF)
+# --------------------------------------------------
+# LAPACK
# User did not provide a LAPACK Library but specified to search for one
if( USE_OPTIMIZED_LAPACK )
find_package( LAPACK )
list(GET ALL_TARGETS 0 _lapack_config_install_guard_target)
endif()
+# Include cblas in targets exported from the build tree.
+if(CBLAS)
+ set(ALL_TARGETS ${ALL_TARGETS} cblas)
+endif(CBLAS)
+
# Include lapacke in targets exported from the build tree.
if(LAPACKE)
set(ALL_TARGETS ${ALL_TARGETS} lapacke)
lib: lapacklib tmglib
#lib: blaslib variants lapacklib tmglib
-clean: cleanlib cleantesting cleanblas_testing
+clean: cleanlib cleantesting cleanblas_testing cleancblas_testing
lapack_install:
( cd INSTALL; $(MAKE); ./testlsame; ./testslamch; ./testdlamch; \
blaslib:
( cd BLAS/SRC; $(MAKE) )
+cblaslib:
+ ( cd cblas/src; $(MAKE) )
+
lapacklib: lapack_install
( cd SRC; $(MAKE) )
lapackelib: lapacklib
( cd lapacke; $(MAKE) )
+cblas_example: cblaslib blaslib
+ ( cd cblas/examples; $(MAKE) )
+
lapacke_example: lapackelib
( cd lapacke/example; $(MAKE) )
./xblat3d < dblat3.in ; \
./xblat3c < cblat3.in ; \
./xblat3z < zblat3.in )
+
+cblas_testing: blaslib
+ ( cd cblas ; $(MAKE) cblas_testing)
+ ( cd cblas ; $(MAKE) runtst)
+
+
+
html:
@echo "LAPACK HTML PAGES GENRATION with Doxygen"
doxygen DOCS/Doxyfile
cleanlib:
( cd INSTALL; $(MAKE) clean )
( cd BLAS/SRC; $(MAKE) clean )
+ ( cd CBLAS; $(MAKE) clean )
( cd SRC; $(MAKE) clean )
( cd SRC/VARIANTS; $(MAKE) clean )
( cd TESTING/MATGEN; $(MAKE) clean )
( cd BLAS/TESTING; $(MAKE) -f Makeblat3 clean )
( cd BLAS; rm -f xblat* )
+cleancblas_testing:
+ ( cd CBLAS; $(MAKE) cleanexe )
+
cleantesting:
( cd TESTING/LIN; $(MAKE) clean )
( cd TESTING/EIG; $(MAKE) clean )
( cd TESTING; rm -f xlin* xeig* )
-cleanall: cleanlib cleanblas_testing cleantesting
+cleanall: cleanlib cleanblas_testing cleancblas_testing cleantesting
rm -f *.a TESTING/*.out INSTALL/test* BLAS/*.out
-cmake_minimum_required(VERSION 2.8.10)
-project(CBLAS C)
-enable_language(Fortran)
+message(STATUS "CBLAS enable")
+enable_language(C)
+
+set(LAPACK_INSTALL_EXPORT_NAME cblas-targets)
+
+# Create a header file cblas.h for the routines called in my C programs
+include(FortranCInterface)
+FortranCInterface_HEADER( ${CMAKE_CURRENT_SOURCE_DIR}/include/cblas_mangling.h
+ MACRO_NAMESPACE "F77_"
+ SYMBOL_NAMESPACE "F77_" )
+
+# Old way to detect mangling
+#include(FortranMangling)
+#FORTRAN_MANGLING(CDEFS)
+#set(CDEFS ${CDEFS} CACHE STRING "Fortran Mangling" FORCE)
+#MESSAGE(STATUS "=========")
+
+# --------------------------------------------------
+# Compiler Flags
+#ADD_DEFINITIONS( "-D${CDEFS}")
+
include_directories( include )
+add_subdirectory(include)
add_subdirectory(src)
+macro(append_subdir_files variable dirname)
+get_directory_property(holder DIRECTORY ${dirname} DEFINITION ${variable})
+foreach(depfile ${holder})
+ list(APPEND ${variable} "${dirname}/${depfile}")
+endforeach()
+endmacro()
+
+append_subdir_files(CBLAS_INCLUDE "include")
+INSTALL( FILES ${CBLAS_INCLUDE} DESTINATION include )
+
+# --------------------------------------------------
+message(STATUS "BUILD TESTING : ${BUILD_TESTING}" )
+if(BUILD_TESTING)
+ add_subdirectory(testing)
+ add_subdirectory(examples)
+endif(BUILD_TESTING)
+
+INSTALL( FILES ${CBLAS_INCLUDE} DESTINATION include )
+
+
+if(NOT BLAS_FOUND)
+ set(ALL_TARGETS ${ALL_TARGETS} blas)
+endif(NOT BLAS_FOUND)
+
+# Export cblas targets from the
+# install tree, if any.
+set(_cblas_config_install_guard_target "")
+if(ALL_TARGETS)
+ install(EXPORT cblas-targets
+ DESTINATION lib/cmake/cblas-${LAPACK_VERSION})
+ # Choose one of the cblas targets to use as a guard for
+ # cblas-config.cmake to load targets from the install tree.
+ list(GET ALL_TARGETS 0 _cblas_config_install_guard_target)
+endif()
+
+# Export cblas targets from the build tree, if any.
+set(_cblas_config_build_guard_target "")
+if(ALL_TARGETS)
+ export(TARGETS ${ALL_TARGETS} FILE cblas-targets.cmake)
+
+ # Choose one of the cblas targets to use as a guard
+ # for cblas-config.cmake to load targets from the build tree.
+ list(GET ALL_TARGETS 0 _cblas_config_build_guard_target)
+endif()
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/cblas-config-version.cmake.in
+ ${LAPACK_BINARY_DIR}/cblas-config-version.cmake @ONLY)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/cblas-config-build.cmake.in
+ ${LAPACK_BINARY_DIR}/cblas-config.cmake @ONLY)
+
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cblas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc)
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc
+ DESTINATION ${PKG_CONFIG_DIR}
+ )
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cblas-config-install.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/cblas-config.cmake @ONLY)
+install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/cblas-config.cmake
+ ${LAPACK_BINARY_DIR}/cblas-config-version.cmake
+ DESTINATION lib/cmake/cblas-${LAPACK_VERSION}
+ )
+
+#install(EXPORT cblas-targets
+# DESTINATION lib/cmake/cblas-${LAPACK_VERSION})
+
-dlvl = ./.
-include $(dlvl)/Makefile.in
+include ../make.inc
-all: alllib alltst
+all:
+ cd include && cp cblas_mangling_with_flags.h cblas_mangling.h
+ cd src && $(MAKE) all
-help:
- @ echo "Make sure you are using correct Makefile.in for your system."
- @ echo "At this level, assuming you have downloded all necessary "
- @ echo "files and made an archive file of BLAS routines for your "
- @ echo "system."
- @ echo " "
- @ echo "The Makefile compiles the routines of CBLAS (C interface of "
- @ echo "BLAS) and testers for all the precisions. "
- @ echo "If there is no directory for archives in CBLAS/lib, it "
- @ echo "creates new directory with the name of the platform of your "
- @ echo "machine."
- @ echo " "
- @ echo "To compile, you have to type as follows"
- @ echo "make <target>"
- @ echo " where <target> is one of:"
- @ echo "slib1 --- make an archive of level 1 REAL."
- @ echo "dlib1 --- make an archive of level 1 DOUBLE PRECISION."
- @ echo "clib1 --- make an archive of level 1 COMPLEX."
- @ echo "zlib1 --- make an archive of level 1 COMPLEX*16."
- @ echo "alllib1 - make an archive of level 1 all precisions."
- @ echo " "
- @ echo "slib2 --- make an archive of level 2 REAL."
- @ echo "dlib2 --- make an archive of level 2 DOUBLE PRECSION."
- @ echo "clib2 --- make an archive of level 2 COMPLEX."
- @ echo "zlib2 --- make an archive of level 2 COMPLEX*16."
- @ echo "alllib2 - make an archive of level 2 all precisions."
- @ echo " "
- @ echo "slib3 --- make an archive of level 3 REAL."
- @ echo "dlib3 --- make an archive of level 3 DOUBLE PRECISION ."
- @ echo "clib3 --- make an archive of level 3 COMPLEX."
- @ echo "zlib3 --- make an archive of level 3 COMPLEX*16."
- @ echo "alllib3 - make an archive of level 3 all precisions."
- @ echo " "
- @ echo "alllib -- make an archive for all precisions."
- @ echo " "
- @ echo "stest1 -- Compiles the tester for level 1 REAL."
- @ echo "dtest1 -- Compiles the tester for level 1 DOUBLE PRECISION. "
- @ echo "ctest1 -- Compiles the tester for level 1 COMPLEX."
- @ echo "ztest1 -- Compiles the tester for level 1 COMPLEX*16."
- @ echo "alltst1 - Compiles testers for all precisions of level 1."
- @ echo " "
- @ echo "stest2 -- Compiles the tester for level 2 REAL."
- @ echo "dtest2 -- Compiles the tester for level 2 DOUBLE PRECISION. "
- @ echo "ctest2 -- Compiles the tester for level 2 COMPLEX."
- @ echo "ztest2 -- Compiles the tester for level 2 COMPLEX*16."
- @ echo "alltst2 - Compiles testers for all precisions of level 2."
- @ echo " "
- @ echo "stest3 -- Compiles the tester for level 3 REAL."
- @ echo "dtest3 -- Compiles the tester for level 3 DOUBLE PRECISON. "
- @ echo "ctest3 -- Compiles the tester for level 3 COMPLEX."
- @ echo "ztest3 -- Compiles the tester for level 3 COMPLEX*16."
- @ echo "alltst3 - Compiles testers for all precisions of level 3."
- @ echo " "
- @ echo "alltst -- Compiles testers for all CBLAS routines."
- @ echo "runtst -- Execute testers for all CBLAS routines."
- @ echo " "
- @ echo "all ----- Creates a library and testers for ALL."
- @ echo " "
- @ echo "clean --- Erase all the .o and excutable files"
- @ echo "cleanlib -- Erase all the .o files"
- @ echo "cleanexe -- Erase all the excutable files"
- @ echo "rmlib --- Remove a library file."
- @ echo " "
- @ echo "example -- Creates example1 and example2"
- @ echo "example1 -- A small example to exercise the interface "
- @ echo "example2 -- Test that cblas_xerbla() is working correctly"
- @ echo " "
- @ echo " ------- Warning ------- "
- @ echo "If you want just to make a tester, make sure you have"
- @ echo "already made an archive file out of CBLAS routines."
- @ echo " "
- @ echo "Written by Keita Teranishi"
- @ echo "3/4/98 "
+clean: cleanlib
-# In general, the Makefile call other Makefiles in the sub-directories.
-
-
-clean:
- ( cd testing && make clean )
- ( cd src && make clean )
- rm -f *.o cblas_ex1 cblas_ex2
-
-cleanobj:
- ( cd testing && make cleanobj )
- ( cd src && make clean )
+cleanlib:
+ cd src && $(MAKE) clean
cleanexe:
- ( cd testing && make cleanexe )
+ cd testing && $(MAKE) cleanexe
-rmlib:
- ( rm -f $(CBLIB) )
-slib1: sreal1
-dlib1: dreal1
-clib1: scplx1
-zlib1: dcplx1
-slib2: sreal2
-dlib2: dreal2
-clib2: scplx2
-zlib2: dcplx2
-slib3: sreal3
-dlib3: dreal3
-clib3: scplx3
-zlib3: dcplx3
-alllib1: allprecision1
-alllib2: allprecision2
-alllib3: allprecision3
-alllib: allprecision
+cleanall: clean cleanexe
+ rm -f $(CBLASLIB)
+ cd examples && rm -f *.o cblas_ex1 cblas_ex2
+cblas_testing:
+ cd testing && $(MAKE) all
-sreal1:
- ( cd src && make slib1)
-dreal1:
- ( cd src && make dlib1)
-scplx1:
- ( cd src && make clib1)
-dcplx1:
- ( cd src && make zlib1)
-allprecision1:
- ( cd src && make all1)
-sreal2:
- ( cd src && make slib2)
-dreal2:
- ( cd src && make dlib2)
-scplx2:
- ( cd src && make clib2)
-dcplx2:
- ( cd src && make zlib2)
-allprecision2:
- ( cd src && make all2)
-sreal3:
- ( cd src && make slib3)
-dreal3:
- ( cd src && make dlib3)
-scplx3:
- ( cd src && make clib3)
-dcplx3:
- ( cd src && make zlib3)
-allprecision3:
- ( cd src && make all3)
-allprecision:
- ( cd src && make all)
-
-stest1:
- ( cd testing && make stest1 )
-dtest1:
- ( cd testing && make dtest1 )
-ctest1:
- ( cd testing && make ctest1 )
-ztest1:
- ( cd testing && make ztest1 )
-alltst1:
- ( cd testing && make all1 )
-stest2:
- ( cd testing && make stest2 )
-dtest2:
- ( cd testing && make dtest2 )
-ctest2:
- ( cd testing && make ctest2 )
-ztest2:
- ( cd testing && make ztest2 )
-alltst2:
- ( cd testing && make all2 )
-stest3:
- ( cd testing && make stest3 )
-dtest3:
- ( cd testing && make dtest3 )
-ctest3:
- ( cd testing && make ctest3 )
-ztest3:
- ( cd testing && make ztest3 )
-alltst3:
- ( cd testing && make all3 )
-alltst:
- ( cd testing && make all )
runtst:
- ( cd testing && make run )
+ cd testing && $(MAKE) run
-example: alllib
- ( cd examples && make all )
-example1: alllib
- ( cd examples && make example1 )
-example2: alllib
- ( cd examples && make example1 )
-
-
-cleanall:
- ( cd src && rm -f a.out core *.o $(CBLIB) )
- ( cd testing && rm -f *.out core *.o x[sdcz]cblat[123] )
- ( cd examples && rm -f *.o cblas_ex1 cblas_ex2 )
+example: all
+ cd examples && make all
+++ /dev/null
-#
-# Makefile.ALPHA
-#
-#
-# If you compile, change the name to Makefile.in.
-#
-#
-
-#-----------------------------------------------------------------------------
-# Shell
-#-----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-#-----------------------------------------------------------------------------
-# Platform
-#-----------------------------------------------------------------------------
-
-PLAT = ALPHA
-
-#-----------------------------------------------------------------------------
-# Libraries and includs
-#-----------------------------------------------------------------------------
-
-BLLIB = libblas.a
-CBLIB = ../lib/cblas_$(PLAT).a
-
-#-----------------------------------------------------------------------------
-# Compilers
-#-----------------------------------------------------------------------------
-
-CC = cc
-FC = f77
-LOADER = $(FC)
-
-#-----------------------------------------------------------------------------
-# Flags for Compilers
-#-----------------------------------------------------------------------------
-
-CFLAGS = -std1 -I/usr/include -assume aligned_objects -DADD_
-FFLAGS = -f -u
-LOADFLAGS =
-
-#-----------------------------------------------------------------------------
-# Archive programs and flags
-#-----------------------------------------------------------------------------
-
-ARCH = ar
-ARCHFLAGS = r
-RANLIB = ranlib
+++ /dev/null
-#
-# Makefile.ALPHA
-#
-#
-# If you compile, change the name to Makefile.in.
-#
-#
-
-#-----------------------------------------------------------------------------
-# Shell
-#-----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-#-----------------------------------------------------------------------------
-# Platform
-#-----------------------------------------------------------------------------
-
-PLAT = HPPA
-
-#-----------------------------------------------------------------------------
-# Libraries and includs
-#-----------------------------------------------------------------------------
-
-BLLIB = libblas.a
-CBLIB = ../lib/cblas_$(PLAT).a
-
-#-----------------------------------------------------------------------------
-# Compilers
-#-----------------------------------------------------------------------------
-
-CC = cc
-FC = f77
-LOADER = $(FC)
-
-#-----------------------------------------------------------------------------
-# Flags for Compilers
-#-----------------------------------------------------------------------------
-
-CFLAGS = +O4 -Aa -DNOCHANGE +e
-FFLAGS = +O4
-LOADFLAGS =
-
-#-----------------------------------------------------------------------------
-# Archive programs and flags
-#-----------------------------------------------------------------------------
-
-ARCH = ar
-ARCHFLAGS = r
-RANLIB = echo
+++ /dev/null
-#
-# Makefile.LINUX
-#
-#
-# If you compile, change the name to Makefile.in.
-#
-#
-
-#-----------------------------------------------------------------------------
-# Shell
-#-----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-#-----------------------------------------------------------------------------
-# Platform
-#-----------------------------------------------------------------------------
-
-PLAT = LINUX
-
-#-----------------------------------------------------------------------------
-# Libraries and includs
-#-----------------------------------------------------------------------------
-
-BLLIB = libblas.a
-CBLIB = ../lib/cblas_$(PLAT).a
-
-#-----------------------------------------------------------------------------
-# Compilers
-#-----------------------------------------------------------------------------
-
-CC = gcc
-FC = gfortran
-LOADER = $(FC)
-
-#-----------------------------------------------------------------------------
-# Flags for Compilers
-#-----------------------------------------------------------------------------
-
-CFLAGS = -O3 -DADD_
-FFLAGS = -O3
-
-#-----------------------------------------------------------------------------
-# Archive programs and flags
-#-----------------------------------------------------------------------------
-
-ARCH = ar
-ARCHFLAGS = r
-RANLIB = echo
+++ /dev/null
-#
-# Makefile.SGI64
-#
-#
-# If you compile, change the name to Makefile.in.
-#
-#
-
-#-----------------------------------------------------------------------------
-# Shell
-#-----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-#-----------------------------------------------------------------------------
-# Platform
-#-----------------------------------------------------------------------------
-
-PLAT = SGI64
-
-#-----------------------------------------------------------------------------
-# Libraries and includs
-#-----------------------------------------------------------------------------
-
-BLLIB = libblas.a
-CBLIB = ../lib/cblas_$(PLAT).a
-
-#-----------------------------------------------------------------------------
-# Compilers
-#-----------------------------------------------------------------------------
-
-CC = cc
-FC = f77
-LOADER = $(FC)
-
-#-----------------------------------------------------------------------------
-# Flags for Compilers
-#-----------------------------------------------------------------------------
-
-CFLAGS = -O3 -DADD_ -64 -mips4 -r10000
-FFLAGS = -O3 -64 -mips4 -r10000
-LOADFLAGS = -64 -mips4 -r10000
-
-#-----------------------------------------------------------------------------
-# Archive programs and flags
-#-----------------------------------------------------------------------------
-
-ARCH = ar
-ARCHFLAGS = cr
-RANLIB = echo
+++ /dev/null
-#
-# Makefile.SUN4
-#
-#
-# If you compile, change the name to Makefile.in.
-#
-#
-
-#-----------------------------------------------------------------------------
-# Shell
-#-----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-#-----------------------------------------------------------------------------
-# Platform
-#-----------------------------------------------------------------------------
-
-PLAT = SUN4
-
-#-----------------------------------------------------------------------------
-# Libraries and includs
-#-----------------------------------------------------------------------------
-
-BLLIB = libblas.a
-CBLIB = ../lib/cblas_$(PLAT).a
-
-#-----------------------------------------------------------------------------
-# Compilers
-#-----------------------------------------------------------------------------
-
-CC = gcc
-FC = f77
-LOADER = $(FC)
-
-#-----------------------------------------------------------------------------
-# Flags for Compilers
-#-----------------------------------------------------------------------------
-
-CFLAGS = -g -DADD_
-FFLAGS = -g -u
-LOADFLAGS =
-
-#-----------------------------------------------------------------------------
-# Archive programs and flags
-#-----------------------------------------------------------------------------
-
-ARCH = ar
-ARCHFLAGS = r
-RANLIB = ranlib
+++ /dev/null
-#
-# Makefile.SUN4SOL2
-#
-#
-# If you compile, change the name to Makefile.in.
-#
-#
-
-#-----------------------------------------------------------------------------
-# Shell
-#-----------------------------------------------------------------------------
-
-SHELL = /bin/sh
-
-#-----------------------------------------------------------------------------
-# Platform
-#-----------------------------------------------------------------------------
-
-PLAT = SUN4SOL2
-
-#-----------------------------------------------------------------------------
-# Libraries and includs
-#-----------------------------------------------------------------------------
-
-BLLIB = libblas.a
-CBLIB = ../lib/cblas_$(PLAT).a
-
-#-----------------------------------------------------------------------------
-# Compilers
-#-----------------------------------------------------------------------------
-
-CC = gcc
-FC = f77
-LOADER = $(FC)
-
-#-----------------------------------------------------------------------------
-# Flags for Compilers
-#-----------------------------------------------------------------------------
-
-CFLAGS = -g -DADD_ -ansi -pedantic -Wall
-FFLAGS = -g -u
-LOADFLAGS =
-
-#-----------------------------------------------------------------------------
-# Archive programs and flags
-#-----------------------------------------------------------------------------
-
-ARCH = ar
-ARCHFLAGS = r
-RANLIB = echo
INSTALLATION
- Please execute the following first:
-
- prompt> ln -s Makefile.ARCH Makefile.in
-
- where ARCH is one of ALPHA, HPPA, LINUX, SGI64, SUN4, SUN4SOL2, or
- your own version (which should be trivial to do for other architectures).
- Make sure to set these variables appropriately in your Makefile.ARCH:
+ Make sure to set these variables appropriately in your Make.inc in the LAPACK folder:
- CBDIR is the directory where you unpacked the tar file
- BLLIB is your Legacy BLAS library
+ CBLASLIB is your CBLAS library
+ BLASLIB is your Legacy BLAS library (by default the Reference BLAS shipped within LAPACK)
Then type:
- prompt> make help
+ prompt> make
+
+ which will create the CBLAS library.
+
+CREATING THE TESTERS
+
+ type:
+
+ prompt> make cblas_testing
- which will give you a detailed listing of targets to make.
+ This will create the BLAS library if necessary, then compile the CBLAS testings.
EXECUTING THE TESTERS
- Type:
-
-./testing/xscblat1
-./testing/xdcblat1
-./testing/xccblat1
-./testing/xzcblat1
-./testing/xscblat2 < testing/sin2
-./testing/xdcblat2 < testing/din2
-./testing/xccblat2 < testing/cin2
-./testing/xzcblat2 < testing/zin2
-./testing/xscblat3 < testing/sin3
-./testing/xdcblat3 < testing/din3
-./testing/xccblat3 < testing/cin3
-./testing/xzcblat3 < testing/zin3
-_______________________________________________________________________________
+ type:
+
+ prompt> make runtst
+
+ _______________________________________________________________________________
This package contains C interface to Legacy BLAS.
- If you want to know how to use makefile, type 'make help.'
Written by Keita Teranishi (5/20/98)
_______________________________________________________________________________
Fixed the i?amax error that I reported three years ago: standard dictates
IAMAX return vals in range 0 <= iamax < N, but reference was mistakenly
returning like F77: 0 < iamax <= N.
+_______________________________________________________________________________
+
+Updated by Julie Langou (08/22/2014):
+
+Integrate CBLAS package into LAPACK
+Improve headers for mangling
\ No newline at end of file
--- /dev/null
+prefix=@prefix@
+libdir=@libdir@
+
+Name: lapacke
+Description: C Standard Interface to BLAS Linear Algebra PACKage
+Version: @LAPACK_VERSION@
+URL: http://www.netlib.org/lapack/
+Libs: -L${libdir} -lcblas
+Requires: blas
--- /dev/null
+# Load the LAPACK package with which we were built.
+set(LAPACK_DIR "@LAPACK_BINARY_DIR@")
+find_package(LAPACK NO_MODULE)
+
+# Load lapack targets from the build tree, including lapacke targets.
+if(NOT TARGET lapacke)
+ include("@LAPACK_BINARY_DIR@/lapack-targets.cmake")
+endif()
+
+# Report lapacke header search locations.
+set(CBLAS_INCLUDE_DIRS "@LAPACK_SOURCE_DIR@/cblas/include")
+
+# Report lapacke libraries.
+set(CBLAS_LIBRARIES cblas)
--- /dev/null
+# Compute locations from <prefix>/lib/cmake/lapacke-<v>/<self>.cmake
+get_filename_component(_CBLAS_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+get_filename_component(_CBLAS_PREFIX "${_CBLAS_SELF_DIR}" PATH)
+get_filename_component(_CBLAS_PREFIX "${_CBLAS_PREFIX}" PATH)
+get_filename_component(_CBLAS_PREFIX "${_CBLAS_PREFIX}" PATH)
+
+# Load the LAPACK package with which we were built.
+set(LAPACK_DIR "${_CBLAS_PREFIX}/lib/cmake/lapack-@LAPACK_VERSION@")
+find_package(LAPACK NO_MODULE)
+
+# Load lapacke targets from the install tree.
+if(NOT TARGET cblas)
+ include(${_CBLAS_SELF_DIR}/cblas-targets.cmake)
+endif()
+
+# Report lapacke header search locations.
+set(CBLAS_INCLUDE_DIRS ${_CBLAS_PREFIX}/include)
+
+# Report lapacke libraries.
+set(CBLAS_LIBRARIES cblas)
+
+unset(_CBLAS_PREFIX)
+unset(_CBLAS_SELF_DIR)
--- /dev/null
+set(PACKAGE_VERSION "@LAPACK_VERSION@")
+if(NOT ${PACKAGE_FIND_VERSION} VERSION_GREATER ${PACKAGE_VERSION})
+ set(PACKAGE_VERSION_COMPATIBLE 1)
+ if(${PACKAGE_FIND_VERSION} VERSION_EQUAL ${PACKAGE_VERSION})
+ set(PACKAGE_VERSION_EXACT 1)
+ endif()
+endif()
+
--- /dev/null
+add_executable(xexample1_CBLAS cblas_example1.c )
+add_executable(xexample2_CBLAS cblas_example2.c )
+
+target_link_libraries(xexample1_CBLAS cblas ${BLAS_LIBRARIES})
+target_link_libraries(xexample2_CBLAS cblas ${BLAS_LIBRARIES})
+
+add_test(example1_CBLAS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample1_CBLAS)
+add_test(example2_CBLAS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample2_CBLAS)
-dlvl = ./.
-include $(dlvl)/../Makefile.in
+include ../../make.inc
all: example1 example2
example1:
$(CC) -c $(CFLAGS) -I../include cblas_example1.c
- $(LOADER) -o cblas_ex1 cblas_example1.o $(CBLIB) $(BLLIB)
+ $(LOADER) -o cblas_ex1 cblas_example1.o $(CBLASLIB) $(BLASLIB)
example2:
$(CC) -c $(CFLAGS) -I../include cblas_example2.c
- $(LOADER) -o cblas_ex2 cblas_example2.o $(CBLIB) $(BLLIB)
+ $(LOADER) -o cblas_ex2 cblas_example2.o $(CBLASLIB) $(BLASLIB)
cleanall:
rm -f *.o cblas_ex1 cblas_ex2
free(a);
free(x);
free(y);
- return 1;
+ return 0;
}
}
}
- return 1;
+ return 0;
}
--- /dev/null
+SET (CBLAS_INCLUDE cblas.h cblas_f77.h cblas_test.h cblas_mangling.h)
+message(STATUS "Include CBLAS_INCLUDE = ${CBLAS_INCLUDE}")
+
+file(COPY ${CBLAS_INCLUDE} DESTINATION ${LAPACK_BINARY_DIR}/include)
\ No newline at end of file
typedef CBLAS_LAYOUT CBLAS_ORDER; /* this for backward compatibility with CBLAS_ORDER */
+#include "cblas_mangling.h"
+
/*
* ===========================================================================
* Prototypes for level 1 BLAS functions (complex are recast as routines)
*/
#ifndef CBLAS_F77_H
-#define CBLAS_f77_H
+#define CBLAS_F77_H
#ifdef CRAY
#include <fortran.h>
#define FINT2 int *
#endif
-#if defined(ADD_)
/*
* Level 1 BLAS
*/
-#define F77_xerbla xerbla_
- #define F77_srotg srotg_
- #define F77_srotmg srotmg_
- #define F77_srot srot_
- #define F77_srotm srotm_
- #define F77_drotg drotg_
- #define F77_drotmg drotmg_
- #define F77_drot drot_
- #define F77_drotm drotm_
- #define F77_sswap sswap_
- #define F77_scopy scopy_
- #define F77_saxpy saxpy_
- #define F77_isamax_sub isamaxsub_
- #define F77_dswap dswap_
- #define F77_dcopy dcopy_
- #define F77_daxpy daxpy_
- #define F77_idamax_sub idamaxsub_
- #define F77_cswap cswap_
- #define F77_ccopy ccopy_
- #define F77_caxpy caxpy_
- #define F77_icamax_sub icamaxsub_
- #define F77_zswap zswap_
- #define F77_zcopy zcopy_
- #define F77_zaxpy zaxpy_
- #define F77_izamax_sub izamaxsub_
- #define F77_sdot_sub sdotsub_
- #define F77_ddot_sub ddotsub_
- #define F77_dsdot_sub dsdotsub_
- #define F77_sscal sscal_
- #define F77_dscal dscal_
- #define F77_cscal cscal_
- #define F77_zscal zscal_
- #define F77_csscal csscal_
- #define F77_zdscal zdscal_
- #define F77_cdotu_sub cdotusub_
- #define F77_cdotc_sub cdotcsub_
- #define F77_zdotu_sub zdotusub_
- #define F77_zdotc_sub zdotcsub_
- #define F77_snrm2_sub snrm2sub_
- #define F77_sasum_sub sasumsub_
- #define F77_dnrm2_sub dnrm2sub_
- #define F77_dasum_sub dasumsub_
- #define F77_scnrm2_sub scnrm2sub_
- #define F77_scasum_sub scasumsub_
- #define F77_dznrm2_sub dznrm2sub_
- #define F77_dzasum_sub dzasumsub_
- #define F77_sdsdot_sub sdsdotsub_
-/*
- * Level 2 BLAS
- */
- #define F77_ssymv ssymv_
- #define F77_ssbmv ssbmv_
- #define F77_sspmv sspmv_
- #define F77_sger sger_
- #define F77_ssyr ssyr_
- #define F77_sspr sspr_
- #define F77_ssyr2 ssyr2_
- #define F77_sspr2 sspr2_
- #define F77_dsymv dsymv_
- #define F77_dsbmv dsbmv_
- #define F77_dspmv dspmv_
- #define F77_dger dger_
- #define F77_dsyr dsyr_
- #define F77_dspr dspr_
- #define F77_dsyr2 dsyr2_
- #define F77_dspr2 dspr2_
- #define F77_chemv chemv_
- #define F77_chbmv chbmv_
- #define F77_chpmv chpmv_
- #define F77_cgeru cgeru_
- #define F77_cgerc cgerc_
- #define F77_cher cher_
- #define F77_chpr chpr_
- #define F77_cher2 cher2_
- #define F77_chpr2 chpr2_
- #define F77_zhemv zhemv_
- #define F77_zhbmv zhbmv_
- #define F77_zhpmv zhpmv_
- #define F77_zgeru zgeru_
- #define F77_zgerc zgerc_
- #define F77_zher zher_
- #define F77_zhpr zhpr_
- #define F77_zher2 zher2_
- #define F77_zhpr2 zhpr2_
- #define F77_sgemv sgemv_
- #define F77_sgbmv sgbmv_
- #define F77_strmv strmv_
- #define F77_stbmv stbmv_
- #define F77_stpmv stpmv_
- #define F77_strsv strsv_
- #define F77_stbsv stbsv_
- #define F77_stpsv stpsv_
- #define F77_dgemv dgemv_
- #define F77_dgbmv dgbmv_
- #define F77_dtrmv dtrmv_
- #define F77_dtbmv dtbmv_
- #define F77_dtpmv dtpmv_
- #define F77_dtrsv dtrsv_
- #define F77_dtbsv dtbsv_
- #define F77_dtpsv dtpsv_
- #define F77_cgemv cgemv_
- #define F77_cgbmv cgbmv_
- #define F77_ctrmv ctrmv_
- #define F77_ctbmv ctbmv_
- #define F77_ctpmv ctpmv_
- #define F77_ctrsv ctrsv_
- #define F77_ctbsv ctbsv_
- #define F77_ctpsv ctpsv_
- #define F77_zgemv zgemv_
- #define F77_zgbmv zgbmv_
- #define F77_ztrmv ztrmv_
- #define F77_ztbmv ztbmv_
- #define F77_ztpmv ztpmv_
- #define F77_ztrsv ztrsv_
- #define F77_ztbsv ztbsv_
- #define F77_ztpsv ztpsv_
-/*
- * Level 3 BLAS
- */
- #define F77_chemm chemm_
- #define F77_cherk cherk_
- #define F77_cher2k cher2k_
- #define F77_zhemm zhemm_
- #define F77_zherk zherk_
- #define F77_zher2k zher2k_
- #define F77_sgemm sgemm_
- #define F77_ssymm ssymm_
- #define F77_ssyrk ssyrk_
- #define F77_ssyr2k ssyr2k_
- #define F77_strmm strmm_
- #define F77_strsm strsm_
- #define F77_dgemm dgemm_
- #define F77_dsymm dsymm_
- #define F77_dsyrk dsyrk_
- #define F77_dsyr2k dsyr2k_
- #define F77_dtrmm dtrmm_
- #define F77_dtrsm dtrsm_
- #define F77_cgemm cgemm_
- #define F77_csymm csymm_
- #define F77_csyrk csyrk_
- #define F77_csyr2k csyr2k_
- #define F77_ctrmm ctrmm_
- #define F77_ctrsm ctrsm_
- #define F77_zgemm zgemm_
- #define F77_zsymm zsymm_
- #define F77_zsyrk zsyrk_
- #define F77_zsyr2k zsyr2k_
- #define F77_ztrmm ztrmm_
- #define F77_ztrsm ztrsm_
-#elif defined(UPCASE)
-/*
- * Level 1 BLAS
- */
-#define F77_xerbla XERBLA
- #define F77_srotg SROTG
- #define F77_srotmg SROTMG
- #define F77_srot SROT
- #define F77_srotm SROTM
- #define F77_drotg DROTG
- #define F77_drotmg DROTMG
- #define F77_drot DROT
- #define F77_drotm DROTM
- #define F77_sswap SSWAP
- #define F77_scopy SCOPY
- #define F77_saxpy SAXPY
- #define F77_isamax_sub ISAMAXSUB
- #define F77_dswap DSWAP
- #define F77_dcopy DCOPY
- #define F77_daxpy DAXPY
- #define F77_idamax_sub IDAMAXSUB
- #define F77_cswap CSWAP
- #define F77_ccopy CCOPY
- #define F77_caxpy CAXPY
- #define F77_icamax_sub ICAMAXSUB
- #define F77_zswap ZSWAP
- #define F77_zcopy ZCOPY
- #define F77_zaxpy ZAXPY
- #define F77_izamax_sub IZAMAXSUB
- #define F77_sdot_sub SDOTSUB
- #define F77_ddot_sub DDOTSUB
- #define F77_dsdot_sub DSDOTSUB
- #define F77_sscal SSCAL
- #define F77_dscal DSCAL
- #define F77_cscal CSCAL
- #define F77_zscal ZSCAL
- #define F77_csscal CSSCAL
- #define F77_zdscal ZDSCAL
- #define F77_cdotu_sub CDOTUSUB
- #define F77_cdotc_sub CDOTCSUB
- #define F77_zdotu_sub ZDOTUSUB
- #define F77_zdotc_sub ZDOTCSUB
- #define F77_snrm2_sub SNRM2SUB
- #define F77_sasum_sub SASUMSUB
- #define F77_dnrm2_sub DNRM2SUB
- #define F77_dasum_sub DASUMSUB
- #define F77_scnrm2_sub SCNRM2SUB
- #define F77_scasum_sub SCASUMSUB
- #define F77_dznrm2_sub DZNRM2SUB
- #define F77_dzasum_sub DZASUMSUB
- #define F77_sdsdot_sub SDSDOTSUB
-/*
- * Level 2 BLAS
- */
- #define F77_ssymv SSYMV
- #define F77_ssbmv SSBMV
- #define F77_sspmv SSPMV
- #define F77_sger SGER
- #define F77_ssyr SSYR
- #define F77_sspr SSPR
- #define F77_ssyr2 SSYR2
- #define F77_sspr2 SSPR2
- #define F77_dsymv DSYMV
- #define F77_dsbmv DSBMV
- #define F77_dspmv DSPMV
- #define F77_dger DGER
- #define F77_dsyr DSYR
- #define F77_dspr DSPR
- #define F77_dsyr2 DSYR2
- #define F77_dspr2 DSPR2
- #define F77_chemv CHEMV
- #define F77_chbmv CHBMV
- #define F77_chpmv CHPMV
- #define F77_cgeru CGERU
- #define F77_cgerc CGERC
- #define F77_cher CHER
- #define F77_chpr CHPR
- #define F77_cher2 CHER2
- #define F77_chpr2 CHPR2
- #define F77_zhemv ZHEMV
- #define F77_zhbmv ZHBMV
- #define F77_zhpmv ZHPMV
- #define F77_zgeru ZGERU
- #define F77_zgerc ZGERC
- #define F77_zher ZHER
- #define F77_zhpr ZHPR
- #define F77_zher2 ZHER2
- #define F77_zhpr2 ZHPR2
- #define F77_sgemv SGEMV
- #define F77_sgbmv SGBMV
- #define F77_strmv STRMV
- #define F77_stbmv STBMV
- #define F77_stpmv STPMV
- #define F77_strsv STRSV
- #define F77_stbsv STBSV
- #define F77_stpsv STPSV
- #define F77_dgemv DGEMV
- #define F77_dgbmv DGBMV
- #define F77_dtrmv DTRMV
- #define F77_dtbmv DTBMV
- #define F77_dtpmv DTPMV
- #define F77_dtrsv DTRSV
- #define F77_dtbsv DTBSV
- #define F77_dtpsv DTPSV
- #define F77_cgemv CGEMV
- #define F77_cgbmv CGBMV
- #define F77_ctrmv CTRMV
- #define F77_ctbmv CTBMV
- #define F77_ctpmv CTPMV
- #define F77_ctrsv CTRSV
- #define F77_ctbsv CTBSV
- #define F77_ctpsv CTPSV
- #define F77_zgemv ZGEMV
- #define F77_zgbmv ZGBMV
- #define F77_ztrmv ZTRMV
- #define F77_ztbmv ZTBMV
- #define F77_ztpmv ZTPMV
- #define F77_ztrsv ZTRSV
- #define F77_ztbsv ZTBSV
- #define F77_ztpsv ZTPSV
-/*
- * Level 3 BLAS
- */
- #define F77_chemm CHEMM
- #define F77_cherk CHERK
- #define F77_cher2k CHER2K
- #define F77_zhemm ZHEMM
- #define F77_zherk ZHERK
- #define F77_zher2k ZHER2K
- #define F77_sgemm SGEMM
- #define F77_ssymm SSYMM
- #define F77_ssyrk SSYRK
- #define F77_ssyr2k SSYR2K
- #define F77_strmm STRMM
- #define F77_strsm STRSM
- #define F77_dgemm DGEMM
- #define F77_dsymm DSYMM
- #define F77_dsyrk DSYRK
- #define F77_dsyr2k DSYR2K
- #define F77_dtrmm DTRMM
- #define F77_dtrsm DTRSM
- #define F77_cgemm CGEMM
- #define F77_csymm CSYMM
- #define F77_csyrk CSYRK
- #define F77_csyr2k CSYR2K
- #define F77_ctrmm CTRMM
- #define F77_ctrsm CTRSM
- #define F77_zgemm ZGEMM
- #define F77_zsymm ZSYMM
- #define F77_zsyrk ZSYRK
- #define F77_zsyr2k ZSYR2K
- #define F77_ztrmm ZTRMM
- #define F77_ztrsm ZTRSM
-#elif defined(NOCHANGE)
-/*
- * Level 1 BLAS
- */
-#define F77_xerbla xerbla
- #define F77_srotg srotg
- #define F77_srotmg srotmg
- #define F77_srot srot
- #define F77_srotm srotm
- #define F77_drotg drotg
- #define F77_drotmg drotmg
- #define F77_drot drot
- #define F77_drotm drotm
- #define F77_sswap sswap
- #define F77_scopy scopy
- #define F77_saxpy saxpy
- #define F77_isamax_sub isamaxsub
- #define F77_dswap dswap
- #define F77_dcopy dcopy
- #define F77_daxpy daxpy
- #define F77_idamax_sub idamaxsub
- #define F77_cswap cswap
- #define F77_ccopy ccopy
- #define F77_caxpy caxpy
- #define F77_icamax_sub icamaxsub
- #define F77_zswap zswap
- #define F77_zcopy zcopy
- #define F77_zaxpy zaxpy
- #define F77_izamax_sub izamaxsub
- #define F77_sdot_sub sdotsub
- #define F77_ddot_sub ddotsub
- #define F77_dsdot_sub dsdotsub
- #define F77_sscal sscal
- #define F77_dscal dscal
- #define F77_cscal cscal
- #define F77_zscal zscal
- #define F77_csscal csscal
- #define F77_zdscal zdscal
- #define F77_cdotu_sub cdotusub
- #define F77_cdotc_sub cdotcsub
- #define F77_zdotu_sub zdotusub
- #define F77_zdotc_sub zdotcsub
- #define F77_snrm2_sub snrm2sub
- #define F77_sasum_sub sasumsub
- #define F77_dnrm2_sub dnrm2sub
- #define F77_dasum_sub dasumsub
- #define F77_scnrm2_sub scnrm2sub
- #define F77_scasum_sub scasumsub
- #define F77_dznrm2_sub dznrm2sub
- #define F77_dzasum_sub dzasumsub
- #define F77_sdsdot_sub sdsdotsub
+
+#define F77_xerbla F77_GLOBAL(xerbla,XERBLA)
+#define F77_srotg F77_GLOBAL(srotg,SROTG)
+#define F77_srotmg F77_GLOBAL(srotmg,SROTMG)
+#define F77_srot F77_GLOBAL(srot,SROT)
+#define F77_srotm F77_GLOBAL(srotm,SROTM)
+#define F77_drotg F77_GLOBAL(drotg,DROTG)
+#define F77_drotmg F77_GLOBAL(drotmg,DROTMG)
+#define F77_drot F77_GLOBAL(drot,DROT)
+#define F77_drotm F77_GLOBAL(drotm,DROTM)
+#define F77_sswap F77_GLOBAL(sswap,SSWAP)
+#define F77_scopy F77_GLOBAL(scopy,SCOPY)
+#define F77_saxpy F77_GLOBAL(saxpy,SAXPY)
+#define F77_isamax_sub F77_GLOBAL(isamaxsub,ISAMAXSUB)
+#define F77_dswap F77_GLOBAL(dswap,DSWAP)
+#define F77_dcopy F77_GLOBAL(dcopy,DCOPY)
+#define F77_daxpy F77_GLOBAL(daxpy,DAXPY)
+#define F77_idamax_sub F77_GLOBAL(idamaxsub,IDAMAXSUB)
+#define F77_cswap F77_GLOBAL(cswap,CSWAP)
+#define F77_ccopy F77_GLOBAL(ccopy,CCOPY)
+#define F77_caxpy F77_GLOBAL(caxpy,CAXPY)
+#define F77_icamax_sub F77_GLOBAL(icamaxsub,ICAMAXSUB)
+#define F77_zswap F77_GLOBAL(zswap,ZSWAP)
+#define F77_zcopy F77_GLOBAL(zcopy,ZCOPY)
+#define F77_zaxpy F77_GLOBAL(zaxpy,ZAXPY)
+#define F77_izamax_sub F77_GLOBAL(izamaxsub,IZAMAXSUB)
+#define F77_sdot_sub F77_GLOBAL(sdotsub,SDOTSUB)
+#define F77_ddot_sub F77_GLOBAL(ddotsub,DDOTSUB)
+#define F77_dsdot_sub F77_GLOBAL(dsdotsub,DSDOTSUB)
+#define F77_sscal F77_GLOBAL(sscal,SSCAL)
+#define F77_dscal F77_GLOBAL(dscal,DSCAL)
+#define F77_cscal F77_GLOBAL(cscal,CSCAL)
+#define F77_zscal F77_GLOBAL(zscal,ZSCAL)
+#define F77_csscal F77_GLOBAL(csscal,CSSCAL)
+#define F77_zdscal F77_GLOBAL(zdscal,ZDSCAL)
+#define F77_cdotu_sub F77_GLOBAL(cdotusub,CDOTUSUB)
+#define F77_cdotc_sub F77_GLOBAL(cdotcsub,CDOTCSUB)
+#define F77_zdotu_sub F77_GLOBAL(zdotusub,ZDOTUSUB)
+#define F77_zdotc_sub F77_GLOBAL(zdotcsub,ZDOTCSUB)
+#define F77_snrm2_sub F77_GLOBAL(snrm2sub,SNRM2SUB)
+#define F77_sasum_sub F77_GLOBAL(sasumsub,SASUMSUB)
+#define F77_dnrm2_sub F77_GLOBAL(dnrm2sub,DNRM2SUB)
+#define F77_dasum_sub F77_GLOBAL(dasumsub,DASUMSUB)
+#define F77_scnrm2_sub F77_GLOBAL(scnrm2sub,SCNRM2SUB)
+#define F77_scasum_sub F77_GLOBAL(scasumsub,SCASUMSUB)
+#define F77_dznrm2_sub F77_GLOBAL(dznrm2sub,DZNRM2SUB)
+#define F77_dzasum_sub F77_GLOBAL(dzasumsub,DZASUMSUB)
+#define F77_sdsdot_sub F77_GLOBAL(sdsdotsub,SDSDOTSUB)
/*
* Level 2 BLAS
*/
- #define F77_ssymv ssymv
- #define F77_ssbmv ssbmv
- #define F77_sspmv sspmv
- #define F77_sger sger
- #define F77_ssyr ssyr
- #define F77_sspr sspr
- #define F77_ssyr2 ssyr2
- #define F77_sspr2 sspr2
- #define F77_dsymv dsymv
- #define F77_dsbmv dsbmv
- #define F77_dspmv dspmv
- #define F77_dger dger
- #define F77_dsyr dsyr
- #define F77_dspr dspr
- #define F77_dsyr2 dsyr2
- #define F77_dspr2 dspr2
- #define F77_chemv chemv
- #define F77_chbmv chbmv
- #define F77_chpmv chpmv
- #define F77_cgeru cgeru
- #define F77_cgerc cgerc
- #define F77_cher cher
- #define F77_chpr chpr
- #define F77_cher2 cher2
- #define F77_chpr2 chpr2
- #define F77_zhemv zhemv
- #define F77_zhbmv zhbmv
- #define F77_zhpmv zhpmv
- #define F77_zgeru zgeru
- #define F77_zgerc zgerc
- #define F77_zher zher
- #define F77_zhpr zhpr
- #define F77_zher2 zher2
- #define F77_zhpr2 zhpr2
- #define F77_sgemv sgemv
- #define F77_sgbmv sgbmv
- #define F77_strmv strmv
- #define F77_stbmv stbmv
- #define F77_stpmv stpmv
- #define F77_strsv strsv
- #define F77_stbsv stbsv
- #define F77_stpsv stpsv
- #define F77_dgemv dgemv
- #define F77_dgbmv dgbmv
- #define F77_dtrmv dtrmv
- #define F77_dtbmv dtbmv
- #define F77_dtpmv dtpmv
- #define F77_dtrsv dtrsv
- #define F77_dtbsv dtbsv
- #define F77_dtpsv dtpsv
- #define F77_cgemv cgemv
- #define F77_cgbmv cgbmv
- #define F77_ctrmv ctrmv
- #define F77_ctbmv ctbmv
- #define F77_ctpmv ctpmv
- #define F77_ctrsv ctrsv
- #define F77_ctbsv ctbsv
- #define F77_ctpsv ctpsv
- #define F77_zgemv zgemv
- #define F77_zgbmv zgbmv
- #define F77_ztrmv ztrmv
- #define F77_ztbmv ztbmv
- #define F77_ztpmv ztpmv
- #define F77_ztrsv ztrsv
- #define F77_ztbsv ztbsv
- #define F77_ztpsv ztpsv
+#define F77_ssymv F77_GLOBAL(ssymv,SSYMY)
+#define F77_ssbmv F77_GLOBAL(ssbmv,SSMBV)
+#define F77_sspmv F77_GLOBAL(sspmv,SSPMV)
+#define F77_sger F77_GLOBAL(sger,SGER)
+#define F77_ssyr F77_GLOBAL(ssyr,SSYR)
+#define F77_sspr F77_GLOBAL(sspr,SSPR)
+#define F77_ssyr2 F77_GLOBAL(ssyr2,SSYR2)
+#define F77_sspr2 F77_GLOBAL(sspr2,SSPR2)
+#define F77_dsymv F77_GLOBAL(dsymv,DSYMV)
+#define F77_dsbmv F77_GLOBAL(dsbmv,DSBMV)
+#define F77_dspmv F77_GLOBAL(dspmv,DSPMV)
+#define F77_dger F77_GLOBAL(dger,DGER)
+#define F77_dsyr F77_GLOBAL(dsyr,DSYR)
+#define F77_dspr F77_GLOBAL(dspr,DSPR)
+#define F77_dsyr2 F77_GLOBAL(dsyr2,DSYR2)
+#define F77_dspr2 F77_GLOBAL(dspr2,DSPR2)
+#define F77_chemv F77_GLOBAL(chemv,CHEMV)
+#define F77_chbmv F77_GLOBAL(chbmv,CHBMV)
+#define F77_chpmv F77_GLOBAL(chpmv,CHPMV)
+#define F77_cgeru F77_GLOBAL(cgeru,CGERU)
+#define F77_cgerc F77_GLOBAL(cgerc,CGERC)
+#define F77_cher F77_GLOBAL(cher,CHER)
+#define F77_chpr F77_GLOBAL(chpr,CHPR)
+#define F77_cher2 F77_GLOBAL(cher2,CHER2)
+#define F77_chpr2 F77_GLOBAL(chpr2,CHPR2)
+#define F77_zhemv F77_GLOBAL(zhemv,ZHEMV)
+#define F77_zhbmv F77_GLOBAL(zhbmv,ZHBMV)
+#define F77_zhpmv F77_GLOBAL(zhpmv,ZHPMV)
+#define F77_zgeru F77_GLOBAL(zgeru,ZGERU)
+#define F77_zgerc F77_GLOBAL(zgerc,ZGERC)
+#define F77_zher F77_GLOBAL(zher,ZHER)
+#define F77_zhpr F77_GLOBAL(zhpr,ZHPR)
+#define F77_zher2 F77_GLOBAL(zher2,ZHER2)
+#define F77_zhpr2 F77_GLOBAL(zhpr2,ZHPR2)
+#define F77_sgemv F77_GLOBAL(sgemv,SGEMV)
+#define F77_sgbmv F77_GLOBAL(sgbmv,SGBMV)
+#define F77_strmv F77_GLOBAL(strmv,STRMV)
+#define F77_stbmv F77_GLOBAL(stbmv,STBMV)
+#define F77_stpmv F77_GLOBAL(stpmv,STPMV)
+#define F77_strsv F77_GLOBAL(strsv,STRSV)
+#define F77_stbsv F77_GLOBAL(stbsv,STBSV)
+#define F77_stpsv F77_GLOBAL(stpsv,STPSV)
+#define F77_dgemv F77_GLOBAL(dgemv,DGEMV)
+#define F77_dgbmv F77_GLOBAL(dgbmv,DGBMV)
+#define F77_dtrmv F77_GLOBAL(dtrmv,DTRMV)
+#define F77_dtbmv F77_GLOBAL(dtbmv,DTBMV)
+#define F77_dtpmv F77_GLOBAL(dtpmv,DTRMV)
+#define F77_dtrsv F77_GLOBAL(dtrsv,DTRSV)
+#define F77_dtbsv F77_GLOBAL(dtbsv,DTBSV)
+#define F77_dtpsv F77_GLOBAL(dtpsv,DTPSV)
+#define F77_cgemv F77_GLOBAL(cgemv,CGEMV)
+#define F77_cgbmv F77_GLOBAL(cgbmv,CGBMV)
+#define F77_ctrmv F77_GLOBAL(ctrmv,CTRMV)
+#define F77_ctbmv F77_GLOBAL(ctbmv,CTBMV)
+#define F77_ctpmv F77_GLOBAL(ctpmv,CTPMV)
+#define F77_ctrsv F77_GLOBAL(ctrsv,CTRSV)
+#define F77_ctbsv F77_GLOBAL(ctbsv,CTBSV)
+#define F77_ctpsv F77_GLOBAL(ctpsv,CTPSV)
+#define F77_zgemv F77_GLOBAL(zgemv,ZGEMV)
+#define F77_zgbmv F77_GLOBAL(zgbmv,ZGBMV)
+#define F77_ztrmv F77_GLOBAL(ztrmv,ZTRMV)
+#define F77_ztbmv F77_GLOBAL(ztbmv,ZTBMV)
+#define F77_ztpmv F77_GLOBAL(ztpmv,ZTPMV)
+#define F77_ztrsv F77_GLOBAL(ztrsv,ZTRSV)
+#define F77_ztbsv F77_GLOBAL(ztbsv,ZTBSV)
+#define F77_ztpsv F77_GLOBAL(ztpsv,ZTPSV)
/*
* Level 3 BLAS
*/
- #define F77_chemm chemm
- #define F77_cherk cherk
- #define F77_cher2k cher2k
- #define F77_zhemm zhemm
- #define F77_zherk zherk
- #define F77_zher2k zher2k
- #define F77_sgemm sgemm
- #define F77_ssymm ssymm
- #define F77_ssyrk ssyrk
- #define F77_ssyr2k ssyr2k
- #define F77_strmm strmm
- #define F77_strsm strsm
- #define F77_dgemm dgemm
- #define F77_dsymm dsymm
- #define F77_dsyrk dsyrk
- #define F77_dsyr2k dsyr2k
- #define F77_dtrmm dtrmm
- #define F77_dtrsm dtrsm
- #define F77_cgemm cgemm
- #define F77_csymm csymm
- #define F77_csyrk csyrk
- #define F77_csyr2k csyr2k
- #define F77_ctrmm ctrmm
- #define F77_ctrsm ctrsm
- #define F77_zgemm zgemm
- #define F77_zsymm zsymm
- #define F77_zsyrk zsyrk
- #define F77_zsyr2k zsyr2k
- #define F77_ztrmm ztrmm
- #define F77_ztrsm ztrsm
-#endif
+#define F77_chemm F77_GLOBAL(chemm,CHEMM)
+#define F77_cherk F77_GLOBAL(cherk,CHERK)
+#define F77_cher2k F77_GLOBAL(cher2k,CHER2K)
+#define F77_zhemm F77_GLOBAL(zhemm,ZHEMM)
+#define F77_zherk F77_GLOBAL(zherk,ZHERK)
+#define F77_zher2k F77_GLOBAL(zher2k,ZHER2K)
+#define F77_sgemm F77_GLOBAL(sgemm,SGEMM)
+#define F77_ssymm F77_GLOBAL(ssymm,SSYMM)
+#define F77_ssyrk F77_GLOBAL(ssyrk,SSYRK)
+#define F77_ssyr2k F77_GLOBAL(ssyr2k,SSYR2K)
+#define F77_strmm F77_GLOBAL(strmm,STRMM)
+#define F77_strsm F77_GLOBAL(strsm,STRSM)
+#define F77_dgemm F77_GLOBAL(dgemm,DGEMM)
+#define F77_dsymm F77_GLOBAL(dsymm,DSYMM)
+#define F77_dsyrk F77_GLOBAL(dsyrk,DSYRK)
+#define F77_dsyr2k F77_GLOBAL(dsyr2k,DSYR2K)
+#define F77_dtrmm F77_GLOBAL(dtrmm,DTRMM)
+#define F77_dtrsm F77_GLOBAL(dtrsm,DTRSM)
+#define F77_cgemm F77_GLOBAL(cgemm,CGEMM)
+#define F77_csymm F77_GLOBAL(csymm,CSYMM)
+#define F77_csyrk F77_GLOBAL(csyrk,CSYRK)
+#define F77_csyr2k F77_GLOBAL(csyr2k,CSYR2K)
+#define F77_ctrmm F77_GLOBAL(ctrmm,CTRMM)
+#define F77_ctrsm F77_GLOBAL(ctrsm,CTRSM)
+#define F77_zgemm F77_GLOBAL(zgemm,ZGEMM)
+#define F77_zsymm F77_GLOBAL(zsymm,ZSYMM)
+#define F77_zsyrk F77_GLOBAL(zsyrk,ZSYRK)
+#define F77_zsyr2k F77_GLOBAL(zsyr2k,ZSYR2K)
+#define F77_ztrmm F77_GLOBAL(ztrmm,ZTRMM)
+#define F77_ztrsm F77_GLOBAL(ztrsm,ZTRSM)
#ifdef __cplusplus
extern "C" {
#endif
- void F77_xerbla(FCHAR, void *);
+void F77_xerbla(FCHAR, void *);
/*
* Level 1 Fortran Prototypes
*/
--- /dev/null
+#ifndef F77_HEADER_INCLUDED
+#define F77_HEADER_INCLUDED
+
+#ifndef F77_GLOBAL
+#if defined(F77_GLOBAL_PATTERN_LC) || defined(ADD_)
+#define F77_GLOBAL(lcname,UCNAME) lcname##_
+#elif defined(F77_GLOBAL_PATTERN_UC) || defined(UPPER)
+#define F77_GLOBAL(lcname,UCNAME) UCNAME
+#elif defined(F77_GLOBAL_PATTERN_MC) || defined(NOCHANGE)
+#define F77_GLOBAL(lcname,UCNAME) lcname
+#else
+#define F77_GLOBAL(lcname,UCNAME) lcname##_
+#endif
+#endif
+
+#endif
+
--- /dev/null
+/*
+ * cblas_test.h
+ * Written by Keita Teranishi
+ */
+#ifndef CBLAS_TEST_H
+#define CBLAS_TEST_H
+#include "cblas.h"
+#include "cblas_mangling.h"
+
+#define TRUE 1
+#define PASSED 1
+#define TEST_ROW_MJR 1
+
+#define FALSE 0
+#define FAILED 0
+#define TEST_COL_MJR 0
+
+#define INVALID -1
+#define UNDEFINED -1
+
+typedef struct { float real; float imag; } CBLAS_TEST_COMPLEX;
+typedef struct { double real; double imag; } CBLAS_TEST_ZOMPLEX;
+
+#define F77_xerbla F77_GLOBAL(xerbla,XERBLA)
+/*
+ * Level 1 BLAS
+ */
+#define F77_srotg F77_GLOBAL(srotgtest,SROTGTEST)
+#define F77_srotmg F77_GLOBAL(srotmgtest,SROTMGTEST)
+#define F77_srot F77_GLOBAL(srottest,SROTTEST)
+#define F77_srotm F77_GLOBAL(srotmtest,SROTMTEST)
+#define F77_drotg F77_GLOBAL(drotgtest,DROTGTEST)
+#define F77_drotmg F77_GLOBAL(drotmgtest,DROTMGTEST)
+#define F77_drot F77_GLOBAL(drottest,DROTTEST)
+#define F77_drotm F77_GLOBAL(drotmtest,DROTMTEST)
+#define F77_sswap F77_GLOBAL(sswaptest,SSWAPTEST)
+#define F77_scopy F77_GLOBAL(scopytest,SCOPYTEST)
+#define F77_saxpy F77_GLOBAL(saxpytest,SAXPYTEST)
+#define F77_isamax F77_GLOBAL(isamaxtest,ISAMAXTEST)
+#define F77_dswap F77_GLOBAL(dswaptest,DSWAPTEST)
+#define F77_dcopy F77_GLOBAL(dcopytest,DCOPYTEST)
+#define F77_daxpy F77_GLOBAL(daxpytest,DAXPYTEST)
+#define F77_idamax F77_GLOBAL(idamaxtest,IDAMAXTEST)
+#define F77_cswap F77_GLOBAL(cswaptest,CSWAPTEST)
+#define F77_ccopy F77_GLOBAL(ccopytest,CCOPYTEST)
+#define F77_caxpy F77_GLOBAL(caxpytest,CAXPYTEST)
+#define F77_icamax F77_GLOBAL(icamaxtest,ICAMAXTEST)
+#define F77_zswap F77_GLOBAL(zswaptest,ZSWAPTEST)
+#define F77_zcopy F77_GLOBAL(zcopytest,ZCOPYTEST)
+#define F77_zaxpy F77_GLOBAL(zaxpytest,ZAXPYTEST)
+#define F77_izamax F77_GLOBAL(izamaxtest,IZAMAXTEST)
+#define F77_sdot F77_GLOBAL(sdottest,SDOTTEST)
+#define F77_ddot F77_GLOBAL(ddottest,DDOTTEST)
+#define F77_dsdot F77_GLOBAL(dsdottest,DSDOTTEST)
+#define F77_sscal F77_GLOBAL(sscaltest,SSCALTEST)
+#define F77_dscal F77_GLOBAL(dscaltest,DSCALTEST)
+#define F77_cscal F77_GLOBAL(cscaltest,CSCALTEST)
+#define F77_zscal F77_GLOBAL(zscaltest,ZSCALTEST)
+#define F77_csscal F77_GLOBAL(csscaltest,CSSCALTEST)
+#define F77_zdscal F77_GLOBAL(zdscaltest,ZDSCALTEST)
+#define F77_cdotu F77_GLOBAL(cdotutest,CDOTUTEST)
+#define F77_cdotc F77_GLOBAL(cdotctest,CDOTCTEST)
+#define F77_zdotu F77_GLOBAL(zdotutest,ZDOTUTEST)
+#define F77_zdotc F77_GLOBAL(zdotctest,ZDOTCTEST)
+#define F77_snrm2 F77_GLOBAL(snrm2test,SNRM2TEST)
+#define F77_sasum F77_GLOBAL(sasumtest,SASUMTEST)
+#define F77_dnrm2 F77_GLOBAL(dnrm2test,DNRM2TEST)
+#define F77_dasum F77_GLOBAL(dasumtest,DASUMTEST)
+#define F77_scnrm2 F77_GLOBAL(scnrm2test,SCNRM2TEST)
+#define F77_scasum F77_GLOBAL(scasumtest,SCASUMTEST)
+#define F77_dznrm2 F77_GLOBAL(dznrm2test,DZNRM2TEST)
+#define F77_dzasum F77_GLOBAL(dzasumtest,DZASUMTEST)
+#define F77_sdsdot F77_GLOBAL(sdsdottest, SDSDOTTEST)
+/*
+ * Level 2 BLAS
+ */
+#define F77_s2chke F77_GLOBAL(cs2chke,CS2CHKE)
+#define F77_d2chke F77_GLOBAL(cd2chke,CD2CHKE)
+#define F77_c2chke F77_GLOBAL(cc2chke,CC2CHKE)
+#define F77_z2chke F77_GLOBAL(cz2chke,CZ2CHKE)
+#define F77_ssymv F77_GLOBAL(cssymv,CSSYMV)
+#define F77_ssbmv F77_GLOBAL(cssbmv,CSSBMV)
+#define F77_sspmv F77_GLOBAL(csspmv,CSSPMV)
+#define F77_sger F77_GLOBAL(csger,CSGER)
+#define F77_ssyr F77_GLOBAL(cssyr,CSSYR)
+#define F77_sspr F77_GLOBAL(csspr,CSSPR)
+#define F77_ssyr2 F77_GLOBAL(cssyr2,CSSYR2)
+#define F77_sspr2 F77_GLOBAL(csspr2,CSSPR2)
+#define F77_dsymv F77_GLOBAL(cdsymv,CDSYMV)
+#define F77_dsbmv F77_GLOBAL(cdsbmv,CDSBMV)
+#define F77_dspmv F77_GLOBAL(cdspmv,CDSPMV)
+#define F77_dger F77_GLOBAL(cdger,CDGER)
+#define F77_dsyr F77_GLOBAL(cdsyr,CDSYR)
+#define F77_dspr F77_GLOBAL(cdspr,CDSPR)
+#define F77_dsyr2 F77_GLOBAL(cdsyr2,CDSYR2)
+#define F77_dspr2 F77_GLOBAL(cdspr2,CDSPR2)
+#define F77_chemv F77_GLOBAL(cchemv,CCHEMV)
+#define F77_chbmv F77_GLOBAL(cchbmv,CCHBMV)
+#define F77_chpmv F77_GLOBAL(cchpmv,CCHPMV)
+#define F77_cgeru F77_GLOBAL(ccgeru,CCGERU)
+#define F77_cgerc F77_GLOBAL(ccgerc,CCGERC)
+#define F77_cher F77_GLOBAL(ccher,CCHER)
+#define F77_chpr F77_GLOBAL(cchpr,CCHPR)
+#define F77_cher2 F77_GLOBAL(ccher2,CCHER2)
+#define F77_chpr2 F77_GLOBAL(cchpr2,CCHPR2)
+#define F77_zhemv F77_GLOBAL(czhemv,CZHEMV)
+#define F77_zhbmv F77_GLOBAL(czhbmv,CZHBMV)
+#define F77_zhpmv F77_GLOBAL(czhpmv,CZHPMV)
+#define F77_zgeru F77_GLOBAL(czgeru,CZGERU)
+#define F77_zgerc F77_GLOBAL(czgerc,CZGERC)
+#define F77_zher F77_GLOBAL(czher,CZHER)
+#define F77_zhpr F77_GLOBAL(czhpr,CZHPR)
+#define F77_zher2 F77_GLOBAL(czher2,CZHER2)
+#define F77_zhpr2 F77_GLOBAL(czhpr2,CZHPR2)
+#define F77_sgemv F77_GLOBAL(csgemv,CSGEMV)
+#define F77_sgbmv F77_GLOBAL(csgbmv,CSGBMV)
+#define F77_strmv F77_GLOBAL(cstrmv,CSTRMV)
+#define F77_stbmv F77_GLOBAL(cstbmv,CSTBMV)
+#define F77_stpmv F77_GLOBAL(cstpmv,CSTPMV)
+#define F77_strsv F77_GLOBAL(cstrsv,CSTRSV)
+#define F77_stbsv F77_GLOBAL(cstbsv,CSTBSV)
+#define F77_stpsv F77_GLOBAL(cstpsv,CSTPSV)
+#define F77_dgemv F77_GLOBAL(cdgemv,CDGEMV)
+#define F77_dgbmv F77_GLOBAL(cdgbmv,CDGBMV)
+#define F77_dtrmv F77_GLOBAL(cdtrmv,CDTRMV)
+#define F77_dtbmv F77_GLOBAL(cdtbmv,CDTBMV)
+#define F77_dtpmv F77_GLOBAL(cdtpmv,CDTPMV)
+#define F77_dtrsv F77_GLOBAL(cdtrsv,CDTRSV)
+#define F77_dtbsv F77_GLOBAL(cdtbsv,CDTBSV)
+#define F77_dtpsv F77_GLOBAL(cdtpsv,CDTPSV)
+#define F77_cgemv F77_GLOBAL(ccgemv,CCGEMV)
+#define F77_cgbmv F77_GLOBAL(ccgbmv,CCGBMV)
+#define F77_ctrmv F77_GLOBAL(cctrmv,CCTRMV)
+#define F77_ctbmv F77_GLOBAL(cctbmv,CCTPMV)
+#define F77_ctpmv F77_GLOBAL(cctpmv,CCTPMV)
+#define F77_ctrsv F77_GLOBAL(cctrsv,CCTRSV)
+#define F77_ctbsv F77_GLOBAL(cctbsv,CCTBSV)
+#define F77_ctpsv F77_GLOBAL(cctpsv,CCTPSV)
+#define F77_zgemv F77_GLOBAL(czgemv,CZGEMV)
+#define F77_zgbmv F77_GLOBAL(czgbmv,CZGBMV)
+#define F77_ztrmv F77_GLOBAL(cztrmv,CZTRMV)
+#define F77_ztbmv F77_GLOBAL(cztbmv,CZTBMV)
+#define F77_ztpmv F77_GLOBAL(cztpmv,CZTPMV)
+#define F77_ztrsv F77_GLOBAL(cztrsv,CZTRSV)
+#define F77_ztbsv F77_GLOBAL(cztbsv,CZTBSV)
+#define F77_ztpsv F77_GLOBAL(cztpsv,CZTPSV)
+/*
+ * Level 3 BLAS
+ */
+#define F77_s3chke F77_GLOBAL(cs3chke,CS3CHKE)
+#define F77_d3chke F77_GLOBAL(cd3chke,CD3CHKE)
+#define F77_c3chke F77_GLOBAL(cc3chke,CC3CHKE)
+#define F77_z3chke F77_GLOBAL(cz3chke,CZ3CHKE)
+#define F77_chemm F77_GLOBAL(cchemm,CCHEMM)
+#define F77_cherk F77_GLOBAL(ccherk,CCHERK)
+#define F77_cher2k F77_GLOBAL(ccher2k,CCHER2K)
+#define F77_zhemm F77_GLOBAL(czhemm,CZHEMM)
+#define F77_zherk F77_GLOBAL(czherk,CZHERK)
+#define F77_zher2k F77_GLOBAL(czher2k,CZHER2K)
+#define F77_sgemm F77_GLOBAL(csgemm,CSGEMM)
+#define F77_ssymm F77_GLOBAL(cssymm,CSSYMM)
+#define F77_ssyrk F77_GLOBAL(cssyrk,CSSYRK)
+#define F77_ssyr2k F77_GLOBAL(cssyr2k,CSSYR2K)
+#define F77_strmm F77_GLOBAL(cstrmm,CSTRMM)
+#define F77_strsm F77_GLOBAL(cstrsm,CSTRSM)
+#define F77_dgemm F77_GLOBAL(cdgemm,CDGEMM)
+#define F77_dsymm F77_GLOBAL(cdsymm,CDSYMM)
+#define F77_dsyrk F77_GLOBAL(cdsyrk,CDSYRK)
+#define F77_dsyr2k F77_GLOBAL(cdsyr2k,CDSYR2K)
+#define F77_dtrmm F77_GLOBAL(cdtrmm,CDTRMM)
+#define F77_dtrsm F77_GLOBAL(cdtrsm,CDTRSM)
+#define F77_cgemm F77_GLOBAL(ccgemm,CCGEMM)
+#define F77_csymm F77_GLOBAL(ccsymm,CCSYMM)
+#define F77_csyrk F77_GLOBAL(ccsyrk,CCSYRK)
+#define F77_csyr2k F77_GLOBAL(ccsyr2k,CCSYR2K)
+#define F77_ctrmm F77_GLOBAL(cctrmm,CCTRMM)
+#define F77_ctrsm F77_GLOBAL(cctrsm,CCTRSM)
+#define F77_zgemm F77_GLOBAL(czgemm,CZGEMM)
+#define F77_zsymm F77_GLOBAL(czsymm,CZSYMM)
+#define F77_zsyrk F77_GLOBAL(czsyrk,CZSYRK)
+#define F77_zsyr2k F77_GLOBAL(czsyr2k,CZSYR2K)
+#define F77_ztrmm F77_GLOBAL(cztrmm,CZTRMM)
+#define F77_ztrsm F77_GLOBAL(cztrsm, CZTRSM)
+
+void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans);
+void get_uplo_type(char *type, CBLAS_UPLO *uplo);
+void get_diag_type(char *type, CBLAS_DIAG *diag);
+void get_side_type(char *type, CBLAS_SIDE *side);
+
+#endif /* CBLAS_TEST_H */
set(ALLOBJ ${ZLEV1} ${ZLEV2} ${ZLEV3} ${ERRHAND})
endif(CBLAS_COMPLEX16)
+message(STATUS "Include CBLAS_INCLUDE = ${CBLAS_INCLUDE}")
+
add_library(cblas ${ALLOBJ})
-if(UNIX)
- target_link_libraries(cblas m)
-endif()
-target_link_libraries(cblas)
-install(TARGETS cblas DESTINATION lib)
\ No newline at end of file
+target_link_libraries(cblas ${BLAS_LIBRARIES} )
+lapack_install_library(cblas)
# This Makefile compiles the CBLAS routines
#
-dlvl = ../.
-include $(dlvl)/Makefile.in
+include ../../make.inc
#
# Erase all object and archive files
#
+all: cblaslib
+
clean:
rm -f *.o a.out core
# Single real precision
slib1: $(slev1) $(sclev1)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(slev1) $(sclev1)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(slev1) $(sclev1)
+ $(RANLIB) $(CBLASLIB)
# Double real precision
dlib1: $(dlev1)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(dlev1)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(dlev1)
+ $(RANLIB) $(CBLASLIB)
# Single complex precision
clib1: $(clev1) $(sclev1)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(clev1) $(sclev1)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(clev1) $(sclev1)
+ $(RANLIB) $(CBLASLIB)
# Double complex precision
zlib1: $(zlev1)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(zlev1)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(zlev1)
+ $(RANLIB) $(CBLASLIB)
# All precisions
all1: $(alev1)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(alev1)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(alev1)
+ $(RANLIB) $(CBLASLIB)
#
#
# Single real precision
slib2: $(slev2) $(errhand)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(slev2) $(errhand)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(slev2) $(errhand)
+ $(RANLIB) $(CBLASLIB)
# Double real precision
dlib2: $(dlev2) $(errhand)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(dlev2) $(errhand)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(dlev2) $(errhand)
+ $(RANLIB) $(CBLASLIB)
# Single complex precision
clib2: $(clev2) $(errhand)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(clev2) $(errhand)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(clev2) $(errhand)
+ $(RANLIB) $(CBLASLIB)
# Double complex precision
zlib2: $(zlev2) $(errhand)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(zlev2) $(errhand)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(zlev2) $(errhand)
+ $(RANLIB) $(CBLASLIB)
# All precisions
all2: $(alev2) $(errhand)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(alev2) $(errhand)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(alev2) $(errhand)
+ $(RANLIB) $(CBLASLIB)
#
#
# CBLAS routines
# Single real precision
slib3: $(slev3) $(errhand)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(slev3) $(errhand)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(slev3) $(errhand)
+ $(RANLIB) $(CBLASLIB)
# Double real precision
dlib3: $(dlev3) $(errhand)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(dlev3) $(errhand)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(dlev3) $(errhand)
+ $(RANLIB) $(CBLASLIB)
# Single complex precision
clib3: $(clev3) $(errhand)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(clev3) $(errhand)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(clev3) $(errhand)
+ $(RANLIB) $(CBLASLIB)
# Single complex precision
zlib3: $(zlev3) $(errhand)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(zlev3) $(errhand)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(zlev3) $(errhand)
+ $(RANLIB) $(CBLASLIB)
# All precisions
all3: $(alev3) $(errhand)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(alev3)
- $(RANLIB) $(CBLIB)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(alev3)
+ $(RANLIB) $(CBLASLIB)
# All levels and precisions
-all: $(alev)
- $(ARCH) $(ARCHFLAGS) $(CBLIB) $(alev)
- $(RANLIB) $(CBLIB)
-
+cblaslib: $(alev)
+ $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(alev)
+ $(RANLIB) $(CBLASLIB)
-.SUFFIXES: .o .c .f
+FRC:
+ @FRC=$(FRC)
.c.o:
- $(CC) $(CFLAGS) -I../include -c $*.c
-.f.o:
- $(FC) $(FFLAGS) -c $*.f
+ $(CC) -c $(CFLAGS) -I ../include -o $@ $<
+
+.f.o:
+ $(FORTRAN) $(OPTS) -c $< -o $@
--- /dev/null
+#######################################################################
+# This CMakeLists.txt creates the test programs for the CBLAS routines.
+#
+#######################################################################
+
+macro(add_cblas_test output input target)
+ set(TEST_INPUT "${LAPACK_SOURCE_DIR}/cblas/testing/${input}")
+ set(TEST_OUTPUT "${LAPACK_BINARY_DIR}/cblas/testing/${output}")
+ set(testName "${target}")
+
+ if(EXISTS "${TEST_INPUT}")
+ add_test(NAME CBLAS-${testName} COMMAND "${CMAKE_COMMAND}"
+ -DTEST=$<TARGET_FILE:${target}>
+ -DINPUT=${TEST_INPUT}
+ -DOUTPUT=${TEST_OUTPUT}
+ -DINTDIR=${CMAKE_CFG_INTDIR}
+ -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake")
+ else()
+ string(REPLACE "." "_" input_name ${input})
+ add_test(NAME CBLAS-${testName} COMMAND "${CMAKE_COMMAND}"
+ -DTEST=$<TARGET_FILE:${target}>
+ -DOUTPUT=${TEST_OUTPUT}
+ -DINTDIR=${CMAKE_CFG_INTDIR}
+ -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake")
+ endif()
+endmacro(add_cblas_test)
+
+
+# Object files for single real precision
+SET( STESTL1O c_sblas1.c)
+
+SET( STESTL2O c_sblas2.c c_s2chke.c auxiliary.c c_xerbla.c)
+SET( STESTL2O c_sblas2.c c_s2chke.c auxiliary.c c_xerbla.c)
+SET( STESTL3O c_sblas3.c c_s3chke.c auxiliary.c c_xerbla.c)
+
+# Object files for double real precision
+SET( DTESTL1O c_dblas1.c)
+SET( DTESTL2O c_dblas2.c c_d2chke.c auxiliary.c c_xerbla.c)
+SET( DTESTL3O c_dblas3.c c_d3chke.c auxiliary.c c_xerbla.c)
+
+# Object files for single complex precision
+SET( CTESTL1O c_cblat1.f c_cblas1.c)
+SET( CTESTL2O c_cblas2.c c_c2chke.c auxiliary.c c_xerbla.c)
+SET( CTESTL3O c_cblas3.c c_c3chke.c auxiliary.c c_xerbla.c)
+
+# Object files for double complex precision
+SET( ZTESTL1O c_zblas1.c)
+SET( ZTESTL2O c_zblas2.c c_z2chke.c auxiliary.c c_xerbla.c)
+SET( ZTESTL3O c_zblas3.c c_z3chke.c auxiliary.c c_xerbla.c)
+
+
+
+if(BUILD_SINGLE)
+ add_executable(xscblat1 c_sblat1.f ${STESTL1O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
+ add_executable(xscblat2 c_sblat2.f ${STESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
+ add_executable(xscblat3 c_sblat3.f ${STESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
+
+ target_link_libraries(xscblat1 cblas ${BLAS_LIBRARIES})
+ target_link_libraries(xscblat2 cblas ${BLAS_LIBRARIES})
+ target_link_libraries(xscblat3 cblas ${BLAS_LIBRARIES})
+
+ add_cblas_test(stest1.out "" xscblat1)
+ add_cblas_test(stest2.out sin2 xscblat2)
+ add_cblas_test(stest3.out sin3 xscblat3)
+
+endif()
+
+if(BUILD_DOUBLE)
+
+ add_executable(xdcblat1 c_dblat1.f ${DTESTL1O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
+ add_executable(xdcblat2 c_dblat2.f ${DTESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
+ add_executable(xdcblat3 c_dblat3.f ${DTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
+
+ target_link_libraries(xdcblat1 cblas ${BLAS_LIBRARIES})
+ target_link_libraries(xdcblat2 cblas ${BLAS_LIBRARIES})
+ target_link_libraries(xdcblat3 cblas ${BLAS_LIBRARIES})
+
+ add_cblas_test(dtest1.out "" xdcblat1)
+ add_cblas_test(dtest2.out din2 xdcblat2)
+ add_cblas_test(dtest3.out din3 xdcblat3)
+
+endif()
+
+if(BUILD_COMPLEX)
+
+ add_executable(xccblat1 c_cblat1.f ${CTESTL1O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
+ add_executable(xccblat2 c_cblat2.f ${CTESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
+ add_executable(xccblat3 c_cblat3.f ${CTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
+
+ target_link_libraries(xccblat1 cblas ${BLAS_LIBRARIES})
+ target_link_libraries(xccblat2 cblas ${BLAS_LIBRARIES})
+ target_link_libraries(xccblat3 cblas ${BLAS_LIBRARIES})
+
+ add_cblas_test(ctest1.out "" xccblat1)
+ add_cblas_test(ctest2.out cin2 xccblat2)
+ add_cblas_test(ctest3.out cin3 xccblat3)
+
+endif()
+
+if(BUILD_COMPLEX16)
+
+ add_executable(xzcblat1 c_zblat1.f ${ZTESTL1O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
+ add_executable(xzcblat2 c_zblat2.f ${ZTESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
+ add_executable(xzcblat3 c_zblat3.f ${ZTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
+
+ target_link_libraries(xzcblat1 cblas ${BLAS_LIBRARIES})
+ target_link_libraries(xzcblat2 cblas ${BLAS_LIBRARIES})
+ target_link_libraries(xzcblat3 cblas ${BLAS_LIBRARIES})
+
+ add_cblas_test(ztest1.out "" xzcblat1)
+ add_cblas_test(ztest2.out zin2 xzcblat2)
+ add_cblas_test(ztest3.out zin3 xzcblat3)
+
+endif()
# The Makefile compiles c wrappers and testers for CBLAS.
#
-dlvl = ../.
-include $(dlvl)/Makefile.in
+include ../../make.inc
# Archive files necessary to compile
-LIB = $(CBLIB) $(BLLIB)
+LIB = $(CBLASLIB) $(BLASLIB)
# Object files for single real precision
stestl1o = c_sblas1.o
# Single real
xscblat1: $(stestl1o) c_sblat1.o
- $(LOADER) $(LOADFLAGS) -o xscblat1 c_sblat1.o $(stestl1o) $(LIB)
+ $(LOADER) $(LOADOPTS) -o xscblat1 c_sblat1.o $(stestl1o) $(LIB)
xscblat2: $(stestl2o) c_sblat2.o
- $(LOADER) $(LOADFLAGS) -o xscblat2 c_sblat2.o $(stestl2o) $(LIB)
+ $(LOADER) $(LOADOPTS) -o xscblat2 c_sblat2.o $(stestl2o) $(LIB)
xscblat3: $(stestl3o) c_sblat3.o
- $(LOADER) $(LOADFLAGS) -o xscblat3 c_sblat3.o $(stestl3o) $(LIB)
+ $(LOADER) $(LOADOPTS) -o xscblat3 c_sblat3.o $(stestl3o) $(LIB)
# Double real
xdcblat1: $(dtestl1o) c_dblat1.o
- $(LOADER) $(LOADFLAGS) -o xdcblat1 c_dblat1.o $(dtestl1o) $(LIB)
+ $(LOADER) $(LOADOPTS) -o xdcblat1 c_dblat1.o $(dtestl1o) $(LIB)
xdcblat2: $(dtestl2o) c_dblat2.o
- $(LOADER) $(LOADFLAGS) -o xdcblat2 c_dblat2.o $(dtestl2o) $(LIB)
+ $(LOADER) $(LOADOPTS) -o xdcblat2 c_dblat2.o $(dtestl2o) $(LIB)
xdcblat3: $(dtestl3o) c_dblat3.o
- $(LOADER) $(LOADFLAGS) -o xdcblat3 c_dblat3.o $(dtestl3o) $(LIB)
+ $(LOADER) $(LOADOPTS) -o xdcblat3 c_dblat3.o $(dtestl3o) $(LIB)
# Single complex
xccblat1: $(ctestl1o) c_cblat1.o
- $(LOADER) $(LOADFLAGS) -o xccblat1 c_cblat1.o $(ctestl1o) $(LIB)
+ $(LOADER) $(LOADOPTS) -o xccblat1 c_cblat1.o $(ctestl1o) $(LIB)
xccblat2: $(ctestl2o) c_cblat2.o
- $(LOADER) $(LOADFLAGS) -o xccblat2 c_cblat2.o $(ctestl2o) $(LIB)
+ $(LOADER) $(LOADOPTS) -o xccblat2 c_cblat2.o $(ctestl2o) $(LIB)
xccblat3: $(ctestl3o) c_cblat3.o
- $(LOADER) $(LOADFLAGS) -o xccblat3 c_cblat3.o $(ctestl3o) $(LIB)
+ $(LOADER) $(LOADOPTS) -o xccblat3 c_cblat3.o $(ctestl3o) $(LIB)
# Double complex
xzcblat1: $(ztestl1o) c_zblat1.o
- $(LOADER) $(LOADFLAGS) -o xzcblat1 c_zblat1.o $(ztestl1o) $(LIB)
+ $(LOADER) $(LOADOPTS) -o xzcblat1 c_zblat1.o $(ztestl1o) $(LIB)
xzcblat2: $(ztestl2o) c_zblat2.o
- $(LOADER) $(LOADFLAGS) -o xzcblat2 c_zblat2.o $(ztestl2o) $(LIB)
+ $(LOADER) $(LOADOPTS) -o xzcblat2 c_zblat2.o $(ztestl2o) $(LIB)
xzcblat3: $(ztestl3o) c_zblat3.o
- $(LOADER) $(LOADFLAGS) -o xzcblat3 c_zblat3.o $(ztestl3o) $(LIB)
+ $(LOADER) $(LOADOPTS) -o xzcblat3 c_zblat3.o $(ztestl3o) $(LIB)
# RUN TESTS
run:
- @echo "--> TESTING BLAS 1 - SINGLE PRECISION <--"
+ @echo "--> TESTING CBLAS 1 - SINGLE PRECISION <--"
@./xscblat1 > stest1.out
- @echo "--> TESTING BLAS 1 - DOUBLE PRECISION <--"
+ @echo "--> TESTING CBLAS 1 - DOUBLE PRECISION <--"
@./xdcblat1 > dtest1.out
- @echo "--> TESTING BLAS 1 - COMPLEX PRECISION <--"
+ @echo "--> TESTING CBLAS 1 - COMPLEX PRECISION <--"
@./xccblat1 > ctest1.out
- @echo "--> TESTING BLAS 1 - DOUBLE COMPLEX PRECISION <--"
+ @echo "--> TESTING CBLAS 1 - DOUBLE COMPLEX PRECISION <--"
@./xzcblat1 > ztest1.out
- @echo "--> TESTING BLAS 2 - SINGLE PRECISION <--"
+ @echo "--> TESTING CBLAS 2 - SINGLE PRECISION <--"
@./xscblat2 < sin2 > stest2.out
- @echo "--> TESTING BLAS 2 - DOUBLE PRECISION <--"
+ @echo "--> TESTING CBLAS 2 - DOUBLE PRECISION <--"
@./xdcblat2 < din2 > dtest2.out
- @echo "--> TESTING BLAS 2 - COMPLEX PRECISION <--"
+ @echo "--> TESTING CBLAS 2 - COMPLEX PRECISION <--"
@./xccblat2 < cin2 > ctest2.out
- @echo "--> TESTING BLAS 2 - DOUBLE COMPLEX PRECISION <--"
+ @echo "--> TESTING CBLAS 2 - DOUBLE COMPLEX PRECISION <--"
@./xzcblat2 < zin2 > ztest2.out
- @echo "--> TESTING BLAS 3 - SINGLE PRECISION <--"
+ @echo "--> TESTING CBLAS 3 - SINGLE PRECISION <--"
@./xscblat3 < sin3 > stest3.out
- @echo "--> TESTING BLAS 3 - DOUBLE PRECISION <--"
+ @echo "--> TESTING CBLAS 3 - DOUBLE PRECISION <--"
@./xdcblat3 < din3 > dtest3.out
- @echo "--> TESTING BLAS 3 - COMPLEX PRECISION <--"
+ @echo "--> TESTING CBLAS 3 - COMPLEX PRECISION <--"
@./xccblat3 < cin3 > ctest3.out
- @echo "--> TESTING BLAS 3 - DOUBLE COMPLEX PRECISION <--"
+ @echo "--> TESTING CBLAS 3 - DOUBLE COMPLEX PRECISION <--"
@./xzcblat3 < zin3 > ztest3.out
.SUFFIXES: .o .f .c
-.f.o:
- $(FC) $(FFLAGS) -c $*.f
.c.o:
- $(CC) -I../include $(CFLAGS) -c $*.c
+ $(CC) -c $(CFLAGS) -I ../include -o $@ $<
+
+.f.o:
+ $(FORTRAN) $(OPTS) -c $< -o $@
+++ /dev/null
-/*
- * cblas_test.h
- * Written by Keita Teranishi
- */
-#ifndef CBLAS_TEST_H
-#define CBLAS_TEST_H
-#include "cblas.h"
-
-#define TRUE 1
-#define PASSED 1
-#define TEST_ROW_MJR 1
-
-#define FALSE 0
-#define FAILED 0
-#define TEST_COL_MJR 0
-
-#define INVALID -1
-#define UNDEFINED -1
-
-typedef struct { float real; float imag; } CBLAS_TEST_COMPLEX;
-typedef struct { double real; double imag; } CBLAS_TEST_ZOMPLEX;
-
-#if defined(ADD_)
- #define F77_xerbla xerbla_
-/*
- * Level 1 BLAS
- */
- #define F77_srotg srotgtest_
- #define F77_srotmg srotmgtest_
- #define F77_srot srottest_
- #define F77_srotm srotmtest_
- #define F77_drotg drotgtest_
- #define F77_drotmg drotmgtest_
- #define F77_drot drottest_
- #define F77_drotm drotmtest_
- #define F77_sswap sswaptest_
- #define F77_scopy scopytest_
- #define F77_saxpy saxpytest_
- #define F77_isamax isamaxtest_
- #define F77_dswap dswaptest_
- #define F77_dcopy dcopytest_
- #define F77_daxpy daxpytest_
- #define F77_idamax idamaxtest_
- #define F77_cswap cswaptest_
- #define F77_ccopy ccopytest_
- #define F77_caxpy caxpytest_
- #define F77_icamax icamaxtest_
- #define F77_zswap zswaptest_
- #define F77_zcopy zcopytest_
- #define F77_zaxpy zaxpytest_
- #define F77_izamax izamaxtest_
- #define F77_sdot sdottest_
- #define F77_ddot ddottest_
- #define F77_dsdot dsdottest_
- #define F77_sscal sscaltest_
- #define F77_dscal dscaltest_
- #define F77_cscal cscaltest_
- #define F77_zscal zscaltest_
- #define F77_csscal csscaltest_
- #define F77_zdscal zdscaltest_
- #define F77_cdotu cdotutest_
- #define F77_cdotc cdotctest_
- #define F77_zdotu zdotutest_
- #define F77_zdotc zdotctest_
- #define F77_snrm2 snrm2test_
- #define F77_sasum sasumtest_
- #define F77_dnrm2 dnrm2test_
- #define F77_dasum dasumtest_
- #define F77_scnrm2 scnrm2test_
- #define F77_scasum scasumtest_
- #define F77_dznrm2 dznrm2test_
- #define F77_dzasum dzasumtest_
- #define F77_sdsdot sdsdottest_
-/*
- * Level 2 BLAS
- */
- #define F77_s2chke cs2chke_
- #define F77_d2chke cd2chke_
- #define F77_c2chke cc2chke_
- #define F77_z2chke cz2chke_
- #define F77_ssymv cssymv_
- #define F77_ssbmv cssbmv_
- #define F77_sspmv csspmv_
- #define F77_sger csger_
- #define F77_ssyr cssyr_
- #define F77_sspr csspr_
- #define F77_ssyr2 cssyr2_
- #define F77_sspr2 csspr2_
- #define F77_dsymv cdsymv_
- #define F77_dsbmv cdsbmv_
- #define F77_dspmv cdspmv_
- #define F77_dger cdger_
- #define F77_dsyr cdsyr_
- #define F77_dspr cdspr_
- #define F77_dsyr2 cdsyr2_
- #define F77_dspr2 cdspr2_
- #define F77_chemv cchemv_
- #define F77_chbmv cchbmv_
- #define F77_chpmv cchpmv_
- #define F77_cgeru ccgeru_
- #define F77_cgerc ccgerc_
- #define F77_cher ccher_
- #define F77_chpr cchpr_
- #define F77_cher2 ccher2_
- #define F77_chpr2 cchpr2_
- #define F77_zhemv czhemv_
- #define F77_zhbmv czhbmv_
- #define F77_zhpmv czhpmv_
- #define F77_zgeru czgeru_
- #define F77_zgerc czgerc_
- #define F77_zher czher_
- #define F77_zhpr czhpr_
- #define F77_zher2 czher2_
- #define F77_zhpr2 czhpr2_
- #define F77_sgemv csgemv_
- #define F77_sgbmv csgbmv_
- #define F77_strmv cstrmv_
- #define F77_stbmv cstbmv_
- #define F77_stpmv cstpmv_
- #define F77_strsv cstrsv_
- #define F77_stbsv cstbsv_
- #define F77_stpsv cstpsv_
- #define F77_dgemv cdgemv_
- #define F77_dgbmv cdgbmv_
- #define F77_dtrmv cdtrmv_
- #define F77_dtbmv cdtbmv_
- #define F77_dtpmv cdtpmv_
- #define F77_dtrsv cdtrsv_
- #define F77_dtbsv cdtbsv_
- #define F77_dtpsv cdtpsv_
- #define F77_cgemv ccgemv_
- #define F77_cgbmv ccgbmv_
- #define F77_ctrmv cctrmv_
- #define F77_ctbmv cctbmv_
- #define F77_ctpmv cctpmv_
- #define F77_ctrsv cctrsv_
- #define F77_ctbsv cctbsv_
- #define F77_ctpsv cctpsv_
- #define F77_zgemv czgemv_
- #define F77_zgbmv czgbmv_
- #define F77_ztrmv cztrmv_
- #define F77_ztbmv cztbmv_
- #define F77_ztpmv cztpmv_
- #define F77_ztrsv cztrsv_
- #define F77_ztbsv cztbsv_
- #define F77_ztpsv cztpsv_
-/*
- * Level 3 BLAS
- */
- #define F77_s3chke cs3chke_
- #define F77_d3chke cd3chke_
- #define F77_c3chke cc3chke_
- #define F77_z3chke cz3chke_
- #define F77_chemm cchemm_
- #define F77_cherk ccherk_
- #define F77_cher2k ccher2k_
- #define F77_zhemm czhemm_
- #define F77_zherk czherk_
- #define F77_zher2k czher2k_
- #define F77_sgemm csgemm_
- #define F77_ssymm cssymm_
- #define F77_ssyrk cssyrk_
- #define F77_ssyr2k cssyr2k_
- #define F77_strmm cstrmm_
- #define F77_strsm cstrsm_
- #define F77_dgemm cdgemm_
- #define F77_dsymm cdsymm_
- #define F77_dsyrk cdsyrk_
- #define F77_dsyr2k cdsyr2k_
- #define F77_dtrmm cdtrmm_
- #define F77_dtrsm cdtrsm_
- #define F77_cgemm ccgemm_
- #define F77_csymm ccsymm_
- #define F77_csyrk ccsyrk_
- #define F77_csyr2k ccsyr2k_
- #define F77_ctrmm cctrmm_
- #define F77_ctrsm cctrsm_
- #define F77_zgemm czgemm_
- #define F77_zsymm czsymm_
- #define F77_zsyrk czsyrk_
- #define F77_zsyr2k czsyr2k_
- #define F77_ztrmm cztrmm_
- #define F77_ztrsm cztrsm_
-#elif defined(UPCASE)
- #define F77_xerbla XERBLA
-/*
- * Level 1 BLAS
- */
- #define F77_srotg SROTGTEST
- #define F77_srotmg SROTMGTEST
- #define F77_srot SROTCTEST
- #define F77_srotm SROTMTEST
- #define F77_drotg DROTGTEST
- #define F77_drotmg DROTMGTEST
- #define F77_drot DROTTEST
- #define F77_drotm DROTMTEST
- #define F77_sswap SSWAPTEST
- #define F77_scopy SCOPYTEST
- #define F77_saxpy SAXPYTEST
- #define F77_isamax ISAMAXTEST
- #define F77_dswap DSWAPTEST
- #define F77_dcopy DCOPYTEST
- #define F77_daxpy DAXPYTEST
- #define F77_idamax IDAMAXTEST
- #define F77_cswap CSWAPTEST
- #define F77_ccopy CCOPYTEST
- #define F77_caxpy CAXPYTEST
- #define F77_icamax ICAMAXTEST
- #define F77_zswap ZSWAPTEST
- #define F77_zcopy ZCOPYTEST
- #define F77_zaxpy ZAXPYTEST
- #define F77_izamax IZAMAXTEST
- #define F77_sdot SDOTTEST
- #define F77_ddot DDOTTEST
- #define F77_dsdot DSDOTTEST
- #define F77_sscal SSCALTEST
- #define F77_dscal DSCALTEST
- #define F77_cscal CSCALTEST
- #define F77_zscal ZSCALTEST
- #define F77_csscal CSSCALTEST
- #define F77_zdscal ZDSCALTEST
- #define F77_cdotu CDOTUTEST
- #define F77_cdotc CDOTCTEST
- #define F77_zdotu ZDOTUTEST
- #define F77_zdotc ZDOTCTEST
- #define F77_snrm2 SNRM2TEST
- #define F77_sasum SASUMTEST
- #define F77_dnrm2 DNRM2TEST
- #define F77_dasum DASUMTEST
- #define F77_scnrm2 SCNRM2TEST
- #define F77_scasum SCASUMTEST
- #define F77_dznrm2 DZNRM2TEST
- #define F77_dzasum DZASUMTEST
- #define F77_sdsdot SDSDOTTEST
-/*
- * Level 2 BLAS
- */
- #define F77_s2chke CS2CHKE
- #define F77_d2chke CD2CHKE
- #define F77_c2chke CC2CHKE
- #define F77_z2chke CZ2CHKE
- #define F77_ssymv CSSYMV
- #define F77_ssbmv CSSBMV
- #define F77_sspmv CSSPMV
- #define F77_sger CSGER
- #define F77_ssyr CSSYR
- #define F77_sspr CSSPR
- #define F77_ssyr2 CSSYR2
- #define F77_sspr2 CSSPR2
- #define F77_dsymv CDSYMV
- #define F77_dsbmv CDSBMV
- #define F77_dspmv CDSPMV
- #define F77_dger CDGER
- #define F77_dsyr CDSYR
- #define F77_dspr CDSPR
- #define F77_dsyr2 CDSYR2
- #define F77_dspr2 CDSPR2
- #define F77_chemv CCHEMV
- #define F77_chbmv CCHBMV
- #define F77_chpmv CCHPMV
- #define F77_cgeru CCGERU
- #define F77_cgerc CCGERC
- #define F77_cher CCHER
- #define F77_chpr CCHPR
- #define F77_cher2 CCHER2
- #define F77_chpr2 CCHPR2
- #define F77_zhemv CZHEMV
- #define F77_zhbmv CZHBMV
- #define F77_zhpmv CZHPMV
- #define F77_zgeru CZGERU
- #define F77_zgerc CZGERC
- #define F77_zher CZHER
- #define F77_zhpr CZHPR
- #define F77_zher2 CZHER2
- #define F77_zhpr2 CZHPR2
- #define F77_sgemv CSGEMV
- #define F77_sgbmv CSGBMV
- #define F77_strmv CSTRMV
- #define F77_stbmv CSTBMV
- #define F77_stpmv CSTPMV
- #define F77_strsv CSTRSV
- #define F77_stbsv CSTBSV
- #define F77_stpsv CSTPSV
- #define F77_dgemv CDGEMV
- #define F77_dgbmv CDGBMV
- #define F77_dtrmv CDTRMV
- #define F77_dtbmv CDTBMV
- #define F77_dtpmv CDTPMV
- #define F77_dtrsv CDTRSV
- #define F77_dtbsv CDTBSV
- #define F77_dtpsv CDTPSV
- #define F77_cgemv CCGEMV
- #define F77_cgbmv CCGBMV
- #define F77_ctrmv CCTRMV
- #define F77_ctbmv CCTBMV
- #define F77_ctpmv CCTPMV
- #define F77_ctrsv CCTRSV
- #define F77_ctbsv CCTBSV
- #define F77_ctpsv CCTPSV
- #define F77_zgemv CZGEMV
- #define F77_zgbmv CZGBMV
- #define F77_ztrmv CZTRMV
- #define F77_ztbmv CZTBMV
- #define F77_ztpmv CZTPMV
- #define F77_ztrsv CZTRSV
- #define F77_ztbsv CZTBSV
- #define F77_ztpsv CZTPSV
-/*
- * Level 3 BLAS
- */
- #define F77_s3chke CS3CHKE
- #define F77_d3chke CD3CHKE
- #define F77_c3chke CC3CHKE
- #define F77_z3chke CZ3CHKE
- #define F77_chemm CCHEMM
- #define F77_cherk CCHERK
- #define F77_cher2k CCHER2K
- #define F77_zhemm CZHEMM
- #define F77_zherk CZHERK
- #define F77_zher2k CZHER2K
- #define F77_sgemm CSGEMM
- #define F77_ssymm CSSYMM
- #define F77_ssyrk CSSYRK
- #define F77_ssyr2k CSSYR2K
- #define F77_strmm CSTRMM
- #define F77_strsm CSTRSM
- #define F77_dgemm CDGEMM
- #define F77_dsymm CDSYMM
- #define F77_dsyrk CDSYRK
- #define F77_dsyr2k CDSYR2K
- #define F77_dtrmm CDTRMM
- #define F77_dtrsm CDTRSM
- #define F77_cgemm CCGEMM
- #define F77_csymm CCSYMM
- #define F77_csyrk CCSYRK
- #define F77_csyr2k CCSYR2K
- #define F77_ctrmm CCTRMM
- #define F77_ctrsm CCTRSM
- #define F77_zgemm CZGEMM
- #define F77_zsymm CZSYMM
- #define F77_zsyrk CZSYRK
- #define F77_zsyr2k CZSYR2K
- #define F77_ztrmm CZTRMM
- #define F77_ztrsm CZTRSM
-#elif defined(NOCHANGE)
- #define F77_xerbla xerbla
-/*
- * Level 1 BLAS
- */
- #define F77_srotg srotgtest
- #define F77_srotmg srotmgtest
- #define F77_srot srottest
- #define F77_srotm srotmtest
- #define F77_drotg drotgtest
- #define F77_drotmg drotmgtest
- #define F77_drot drottest
- #define F77_drotm drotmtest
- #define F77_sswap sswaptest
- #define F77_scopy scopytest
- #define F77_saxpy saxpytest
- #define F77_isamax isamaxtest
- #define F77_dswap dswaptest
- #define F77_dcopy dcopytest
- #define F77_daxpy daxpytest
- #define F77_idamax idamaxtest
- #define F77_cswap cswaptest
- #define F77_ccopy ccopytest
- #define F77_caxpy caxpytest
- #define F77_icamax icamaxtest
- #define F77_zswap zswaptest
- #define F77_zcopy zcopytest
- #define F77_zaxpy zaxpytest
- #define F77_izamax izamaxtest
- #define F77_sdot sdottest
- #define F77_ddot ddottest
- #define F77_dsdot dsdottest
- #define F77_sscal sscaltest
- #define F77_dscal dscaltest
- #define F77_cscal cscaltest
- #define F77_zscal zscaltest
- #define F77_csscal csscaltest
- #define F77_zdscal zdscaltest
- #define F77_cdotu cdotutest
- #define F77_cdotc cdotctest
- #define F77_zdotu zdotutest
- #define F77_zdotc zdotctest
- #define F77_snrm2 snrm2test
- #define F77_sasum sasumtest
- #define F77_dnrm2 dnrm2test
- #define F77_dasum dasumtest
- #define F77_scnrm2 scnrm2test
- #define F77_scasum scasumtest
- #define F77_dznrm2 dznrm2test
- #define F77_dzasum dzasumtest
- #define F77_sdsdot sdsdottest
-/*
- * Level 2 BLAS
- */
- #define F77_s2chke cs2chke
- #define F77_d2chke cd2chke
- #define F77_c2chke cc2chke
- #define F77_z2chke cz2chke
- #define F77_ssymv cssymv
- #define F77_ssbmv cssbmv
- #define F77_sspmv csspmv
- #define F77_sger csger
- #define F77_ssyr cssyr
- #define F77_sspr csspr
- #define F77_ssyr2 cssyr2
- #define F77_sspr2 csspr2
- #define F77_dsymv cdsymv
- #define F77_dsbmv cdsbmv
- #define F77_dspmv cdspmv
- #define F77_dger cdger
- #define F77_dsyr cdsyr
- #define F77_dspr cdspr
- #define F77_dsyr2 cdsyr2
- #define F77_dspr2 cdspr2
- #define F77_chemv cchemv
- #define F77_chbmv cchbmv
- #define F77_chpmv cchpmv
- #define F77_cgeru ccgeru
- #define F77_cgerc ccgerc
- #define F77_cher ccher
- #define F77_chpr cchpr
- #define F77_cher2 ccher2
- #define F77_chpr2 cchpr2
- #define F77_zhemv czhemv
- #define F77_zhbmv czhbmv
- #define F77_zhpmv czhpmv
- #define F77_zgeru czgeru
- #define F77_zgerc czgerc
- #define F77_zher czher
- #define F77_zhpr czhpr
- #define F77_zher2 czher2
- #define F77_zhpr2 czhpr2
- #define F77_sgemv csgemv
- #define F77_sgbmv csgbmv
- #define F77_strmv cstrmv
- #define F77_stbmv cstbmv
- #define F77_stpmv cstpmv
- #define F77_strsv cstrsv
- #define F77_stbsv cstbsv
- #define F77_stpsv cstpsv
- #define F77_dgemv cdgemv
- #define F77_dgbmv cdgbmv
- #define F77_dtrmv cdtrmv
- #define F77_dtbmv cdtbmv
- #define F77_dtpmv cdtpmv
- #define F77_dtrsv cdtrsv
- #define F77_dtbsv cdtbsv
- #define F77_dtpsv cdtpsv
- #define F77_cgemv ccgemv
- #define F77_cgbmv ccgbmv
- #define F77_ctrmv cctrmv
- #define F77_ctbmv cctbmv
- #define F77_ctpmv cctpmv
- #define F77_ctrsv cctrsv
- #define F77_ctbsv cctbsv
- #define F77_ctpsv cctpsv
- #define F77_zgemv czgemv
- #define F77_zgbmv czgbmv
- #define F77_ztrmv cztrmv
- #define F77_ztbmv cztbmv
- #define F77_ztpmv cztpmv
- #define F77_ztrsv cztrsv
- #define F77_ztbsv cztbsv
- #define F77_ztpsv cztpsv
-/*
- * Level 3 BLAS
- */
- #define F77_s3chke cs3chke
- #define F77_d3chke cd3chke
- #define F77_c3chke cc3chke
- #define F77_z3chke cz3chke
- #define F77_chemm cchemm
- #define F77_cherk ccherk
- #define F77_cher2k ccher2k
- #define F77_zhemm czhemm
- #define F77_zherk czherk
- #define F77_zher2k czher2k
- #define F77_sgemm csgemm
- #define F77_ssymm cssymm
- #define F77_ssyrk cssyrk
- #define F77_ssyr2k cssyr2k
- #define F77_strmm cstrmm
- #define F77_strsm cstrsm
- #define F77_dgemm cdgemm
- #define F77_dsymm cdsymm
- #define F77_dsyrk cdsyrk
- #define F77_dsyr2k cdsyr2k
- #define F77_dtrmm cdtrmm
- #define F77_dtrsm cdtrsm
- #define F77_cgemm ccgemm
- #define F77_csymm ccsymm
- #define F77_csyrk ccsyrk
- #define F77_csyr2k ccsyr2k
- #define F77_ctrmm cctrmm
- #define F77_ctrsm cctrsm
- #define F77_zgemm czgemm
- #define F77_zsymm czsymm
- #define F77_zsyrk czsyrk
- #define F77_zsyr2k czsyr2k
- #define F77_ztrmm cztrmm
- #define F77_ztrsm cztrsm
-#endif
-
-void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans);
-void get_uplo_type(char *type, CBLAS_UPLO *uplo);
-void get_diag_type(char *type, CBLAS_DIAG *diag);
-void get_side_type(char *type, CBLAS_SIDE *side);
-
-#endif /* CBLAS_TEST_H */